hi, i used to start some applics that need root using su -c "myapplic" from a non-root Xsession. This does not work anymore with error in .Xauthority and "cannot connect to display :0" has anybody seen this? I have been through the man pages but no reference on configuring user access. any idea would be appreciated. thanks dan
kleindoofi wrote:
hi, i used to start some applics that need root using
su -c "myapplic"
from a non-root Xsession. This does not work anymore with error in .Xauthority and "cannot connect to display :0"
has anybody seen this? I have been through the man pages but no reference on configuring user access.
I'm not sure if this applies to your problem, but I usually do this to run an application as root in a user X session: ~ $ su -l Password: ~ # export DISPLAY=:0 ~ # ksysv& [1] 928 ~ # If I don't export DISPLAY, then I get: ~ $ su -l Password: ~ # ksysv& [1] 937 ~ # [1]+ Exit 1 ksysv ~ # In the above example, I get no error that ksysv couldn't open the display, but some other apps tell me this. -- _____________________ Christopher R. Carlen crcarl@inreach.com Linux 2.2.10
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 As you are not supposed to log in as root in GUI anyhow, this is the simplest way: su -c "cp /home/yourusername/.Xauthority /root ; yourapplication" Another way is: # these two lines you only need once for each of YOUR login sessions X=`xauth list :0` su -c "xauth add $X" # now doing su -c "xcalc" # is no problem :-) - -tosi
hi, i used to start some applics that need root using
su -c "myapplic"
from a non-root Xsession. This does not work anymore with error in .Xauthority and "cannot connect to display :0"
has anybody seen this? I have been through the man pages but no reference on configuring user access.
any idea would be appreciated.
thanks dan -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE6mAhH6mRH+PEpr2YRAopcAKCyh2XEYrSIgFGuoEZGdoUp0v4bOQCfdpqV NudHbWbAcnGd3D9e9XlVPAg= =7Dy2 -----END PGP SIGNATURE-----
participants (3)
-
Chris Carlen
-
kleindoofi
-
Tor Sigurdsson