Gtk-WARNING with display when using sudo in nx

0

I am using nxclient on my Windows machine to connect to a Linux server which is running RHE. I am able to run all programs with GUI correctly. However, when I run the same programs with sudo, I get the following

error:(SciTE:25243): Gtk-WARNING **: cannot open display: :1066.0

There is no display connected to this machine, so I am gussing nx is setting my $DISPLAY to :1066.0?

Ari

Posted 2012-06-08T16:51:10.667

Reputation: 143

Answers

0

problem is that sudo changes you user context to root and root doesn't have a display set. try using kdesu (for kde) or beesu (for gnome) to launch your app

uSlackr

Posted 2012-06-08T16:51:10.667

Reputation: 8 755

Isn't beesu a wrapper around su? I was hoping to find a way that I can use sudo rather than using beesu and entering the root password. – Ari – 2012-06-08T20:05:03.967

What happens if you launch sudo with :1066 as a parameter? – uSlackr – 2012-06-08T20:23:55.343

I don't think that's a valid argument: sudo :1066.0 SciTE sudo: :1066.0: command not found – Ari – 2012-06-09T04:01:04.730

how about sudo Scite :1066? – uSlackr – 2012-06-09T19:25:58.667