Xmanager Forum

unable to run xwindows programs after changing to another user

Last post: Tuesday, July 22, 2003 4:07 PM by niels, 2 reply

 
Saturday, June 14, 2003 7:48 AM - Jerry Boggs

unable to run xwindows programs after changing to another user

 
I am logged in remotely to a linux box. If I "su" to root, or any other user, and attempt to run a Xwindows program this is what I get.

Error message from remadmin :Xlib: connection to "localhost:12.0" refused by server
Error message from remadmin :Xlib: Xssh: Invalid x11 authentication cookie!
Error message from remadmin :
Error message from remadmin :Gtk-WARNING **: cannot open display: localhost:12.0

This doesn't happen if I don't "su" to someone else.

Anybody know how to correct this problem?

Thanks.
Saturday, June 14, 2003 10:53 AM - Support

Re: unable to run xwindows programs after changing to another user

 
It is due to a security reason. When you connect to the Unix via SSH protocol, other users in the server cannot run X applications on your Xmanager to prevent unauthorized connections. If you really want to run an X application as another user, just do it in the Xstart.

Other methods are:

1. Copy $HOME/.Xauthority file into another user's home directory. This is required on every "su" command.

2. Use "ssh" command instead of "su".

----
Technical Support
Tuesday, July 22, 2003 4:07 PM - niels

Re: unable to run xwindows programs after changing to another user

 
check your DISPLAY environment variable, and your xauth cookies. You'll need to do an "xauth list" prior to su-ing, and then an "xauth add" of the appropriate cookies once you are root.