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.
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.
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.