Re: su and X question
- From: "Casey T. Deccio" <casey@xxxxxxxxxx>
- Date: Wed, 12 Apr 2006 10:14:59 -0700
On Wed, 2006-04-12 at 18:49 +0200, Chris wrote:
Hello,
Hi I'd like to open X-applications like the in the example below from an su
Terminal, but get an Xlib connection error. I have set up sudo so that: sudo
kwrite /etc/fstab works, but how come it doesn't in a normal su Terminal?
Thanks,
Chris
athlon:/home/stoffel# kwrite /etc/fstab
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
kwrite: cannot connect to X server :0.0
The credentials for using an X server are found in the .Xauthority file
of each user's home directory. If you run 'xauth list' from the
non-privileged user account, you will see the credentials to the X
server you are working on. However, root does not have appropriate
credentials in its .Xauthority until they are granted.
When sudo is used, the HOME directory is not modified, so even though
root is running the program, the HOME is still that of the original
user, so the .Xauthority contains the appropriate credentials.
However, when using su, the HOME changes to root's home directory, and
the appropriate credentials do not exist in ~root/.Xauthority . 'man
xauth' for more details.
There is a wrapper package for su called sux, which grants the resulting
su user permissions to the current X server when sux is called.
Casey
--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
- Follow-Ups:
- Re: su and X question
- From: Chris
- Re: su and X question
- References:
- su and X question
- From: Chris
- su and X question
- Prev by Date: Re: Could not start kdeinit ... again !
- Next by Date: syslog
- Previous by thread: su and X question
- Next by thread: Re: su and X question
- Index(es):
Relevant Pages
|