root cannot connect to an X server in a terminal
Hi,
When I su to root in a konsole window and try to run an X app such as xeyes, xclock, kpackage, etc... I get the following error: Xlib: connection to ":0.0" refused by server Xlib: No protocol specified Error: Can't open display: :0.0 Yet if I'm the user logged in, it will simply run as expected. How do I allow other users that I su into to run programs on the xserver? Is there a way to "permenantly" configure my PC to do that? (i.e. is there a startup script or whatever). Thanks, JT |
This means that root is not on the list of allowed users for X. I believe that you can just do this command:
xhost +local:root to allow the root user to 'connect' to the X windows system. |
It's because you're not using the root user's paths. If you log in as root from a login screen, then you shouldn't have any problems.
|
Well the both replies seem to be correct. I already knew the second one, but I don't always like being logged in as root. Anyway, now that I added root to the xhost thingamabob, will it be permenant or will I have to do that everytime my computer happens to reboot?
|
I think it's permanent. However, if it isn't, then you can just pick a random startup script in /etc/rc[whatever].d, and put that line in there.
|
All times are GMT -5. The time now is 07:21 AM. |