You are not logged in.
Everytime I try to open some X based program from Konsole as root (logged as another user in KDE) it gives me this error:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Gtk-WARNING **: cannot open display: :0.0
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
You have to merge the Xauthoruty cookies. Read the manpage to xauth (and look for the exmaple) or search google for "xauth merge root" and you'll find a lot of detailed descriptions. E.g. :
http://returntonature.com/pipermail/lin … 04529.html
Actually, I sometimes simpify it by simply copying the users's .Xauthority to /root/ :-) this works as long as root doesn't need to display anywhere else.
Offline
Another workaround is for the normal user to give permission for other users to use X on their display, then have root specify that he/she wants to use that display:
[john@limbo john]$ xhost +
access control disabled, clients can connect from any host
[john@limbo john]$ su -
Password:
[root@limbo root]# export DISPLAY=localhost:0.0
and once you are done:
[john@limbo john]$ xhost -
access control enabled, only authorized clients can connect
[john@limbo john]$
Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details
Offline
Or even better, install sudo and set it up correctly. Then you just need to type 'sudo program-to-run-as-root' and it'll display in X properly.
I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal
Offline
I didn't understand how to do the first thing. So I did what re_over_blue told me, but when I try to open a program it gives me this error.
Gtk-WARNING **: cannot open display: localhost
Then I can't do the command xhost -,and I can't open X program as my user anymore.
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
this may be a bit of a hack (not sure) but it works perfectly for me.
in my .bashrc (for users & root) I have the line:
xhost +localhost > /dev/null
Hapy.
Offline
kakabaratruskia,
Hi. The only help I can offer is to make sure that you are entering the commands correctly and as the correct user.
[john@limbo john]$ xhost +
access control disabled, clients can connect from any host
is run by the normal user. This tells X that the normal user will allow others to use his/her display.
[root@limbo root]# export DISPLAY=localhost:0.0
This is run as root. Make sure to include the 0.0 at the end of localhost (that should work in most cases if you are running a single X session). localhost is the machine that you want to use X on, and 0.0 specifies the X session. If you aren't sure what to put _after_ localhost, try this as a _normal_ user:
[john@limbo john]$ echo $DISPLAY
:0.0
Hope this clarifies my previous post.
Don't forget to post your PKGBUILD in your thread when you announce a new package in incoming.
see HERE for details
Offline