XERROR: 'Xlib: connection to ":0.0" refused by server'
DebianThis forum is for the discussion of Debian Linux.
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.
XERROR: 'Xlib: connection to ":0.0" refused by server'
After I installed/converted to Debian Sarge. I get the following error message whenever I try to start a GUI-program from a Konsole in KDE. I am running a 2.6.8-2-686-smp kernel.
Are you trying to do this as the user who started the X session? If you are trying to do this as root or a user who didn't start the X session, then you need to do "xhost +localhost" before using "su" to switch to root or another user.
user@linuxpc:~$ xhost +localhost
localhost being added to access control list
user@linuxpc:~$ su
Password:
linuxpc:/home/user# kedit
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
kedit: cannot connect to X server :0.0
linuxpc:/home/user#
Need this to edit configfiles as root (in an easy way).
If I pop up a terminal an type kedit as user, then kedit starts fine...
To fix the xhost error you see sometimes when you try to run a program as root from a terminal:
edit your /etc/kde3/kdm/Xservers file
On the line that says:
:0 local@tty1 /usr/X11R6/bin/X -nolisten tcp
Change it to:
:0 local@tty1 /usr/X11R6/bin/X -ac -nolisten tcp
"Need this to edit configfiles as root (in an easy way)"
You could also right click desktop choose the run command and enter "kdesu kedit" then enter root password. Just another option I thought maybe of interest or help good luck
You can edit config files with a console only editor like nano/pico, emacs, vi/vim etc. You don't realy need to start a gui text editor, but if you are not familiar with the others then the "kdesu" command suggested above is ok to use.
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past lives...gd' night.
Distribution: Siduction, the only way to do Debian Unstable
To fix the xhost error you see sometimes when you try to run a program as root from a terminal:
edit your /etc/kde3/kdm/Xservers file
On the line that says:
:0 local@tty1 /usr/X11R6/bin/X -nolisten tcp
Change it to:
:0 local@tty1 /usr/X11R6/bin/X -ac -nolisten tcp
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.