I tried it, and it works with su, but not su - or sudo -s
then I removed these lines, and guess what,
it still allows me to open a window with su, and su -
and sudo -s still fail, mysterious, huh?

In summary, sudo -s never allows me to start an X client.

On my another machine, I never had any problem with openning
a window after sudo -s, and I don't remember I did anything special,
and I don't need to run xhost + either.

try putting this in /root/.bashrc:

# allow root to run programs when another
# user is in X
if [ ! "$USER" = "root" ]; then
export XAUTHORITY=/home/$USER/.Xauthority
fi

or just run the export line.  now you should be able to su to root and
run an X11 client locally.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to