Xlib: connection to ":0.0" refused by server Xlib: No protocol specified
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Sounds like you are trying to access X as a non-authorised user.
The only time I ever see those lines is when I have done "su" in a shell and then attempt to run a program.
If this is the problem, then make sure you are the correct user (i.e. the one you originally did startx with or logged in on a graphical login manager with)
If not, then try "xhost +" first.
to the left of the ':' is suppose to be the address of the windows client that is going to connect to linux Xserver. In my case I had to set an environment variable to it like this
setenv DISPLAY 10.2.55.8:0
this is prolly not what you need but you are definitly missing an ip address
Getting X11 forwarding through ssh working after running su
X authentication is based on cookies -- secret little pieces of random data that only you and the X server know... So, you need to let the other user in on what your cookie is. One way to do this is as follows:
Before you issue the su or sudo (but after having ssh'ed into the remote system if you are using ssh), request the cookie for the current DISPLAY that's connecting to your X server:
[QUOTE=mike.rose;3630530]X authentication is based on cookies -- secret little pieces of random data that only you and the X server know... So, you need to let the other user in on what your cookie is. One way to do this is as follows:
---------------------------------------------------------------
Thank you very much. It was annoying to have to change to root rather than access root through the x-terminal.
This worked for me - but how the hell did you figure it out?
I just wanted to thank mike.rose for the short but accurate description of how to overcome the problem withe X windows 'refused by server' error. It not only worked, but it now makes more sense.
I have a sort of similar problem.
I have VNCed to a machine, when logged in as the default user I am able to start xwindows, but as soon as I login as root.. export DISPLAY and try to open a xwindow I get this error:
[root@patton:/] xclock
Xlib: connection to "patton:6.0" refused by server
Xlib: No protocol specified
Error: Can't open display: patton:6
when I ssh from my local windows machine to the same host and use Cygwin for xWindow to connect to it.I am able to start the x-window on my local machine as a root,
ON VNC I tried above suggested command when logged in as a default user
xauth list $DISPLAY
but it returns nothing to me.
I had the same symptoms as you -- not seeing any entries from `xauth list $DISPLAY`. From the xauth man page it looks like you can do this to generate an xauth key for your display:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.