Can't get gksudo to work for non-root user
Peter Garrett
peter.garrett at optusnet.com.au
Wed Jan 17 15:51:13 UTC 2007
On Wed, 17 Jan 2007 08:53:49 -0500
"Russell Blau" <russblau at hotmail.com> wrote:
> OK, then how does one run an X application as another user?
Have a look at
apt-cache show sux
Seriously :)
So
sudo aptitude install sux
peter at prospero:~ $ sux alterego xterm
Password:
< alterego's password>
[ usual complaints about MIT magic cookies and authorisation, but xterm
pops up anyway, with the user as alterego ]
If I switch user to "alterego" with "su alterego" on the command line, and
then try to run xterm, I get the expected
alterego at prospero:/home/peter$ xterm
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xterm Xt error: Can't open display: :0.0
"su" means "switch user" and requires the password of the user to which
you are switching - "sux" is the same but fixes the X authority issue.
Google "MIT magic cookies" if you want to be thoroughly confused ;-)
Also have a look at
http://www.faqs.org/docs/Linux-mini/Remote-X-Apps.html#ss7.1
With particular reference to
http://www.faqs.org/docs/Linux-mini/Remote-X-Apps.html#ss7.1
Peter
More information about the ubuntu-users
mailing list