LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   xchat and root (https://www.linuxquestions.org/questions/linux-software-2/xchat-and-root-58117/)

php_rocks 05-04-2003 05:15 PM

xchat and root
 
hello,

when im logged in as root and need to run xchat i want to run it as another user, i thought the simple solution would be this command:

su -l myusername -c "xchat"

but when i run this is get the error:

Quote:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


(xchat:4394): Gtk-WARNING **: cannot open display:
any help?

thank you,
-sean

trickykid 05-04-2003 05:20 PM

Why not just log in as a regular user then run the program? You really shouldnt be logged in as root for everyday tasks, its a security risk.

Also, when your getting that error, is this running from a command line without X running or is X running? And is this over a remove connection or you physically at the machine?

david_ross 05-04-2003 05:21 PM

AFAIK you can't run an X app as a different user from the one that is logged in. I think you would need to start a second X session to do that.

acid_kewpie 05-04-2003 05:28 PM

yeah, ideally you shouldn't be in X as root in the first place, but run "xhost +localhost" and it will work fine...

david_ross 05-04-2003 05:36 PM

Would that not give everyone logged into the machine root access by running an application on that display?

acid_kewpie 05-04-2003 05:38 PM

yes. and that's what he wants.... i think xhost +username works too though


All times are GMT -5. The time now is 03:07 PM.