LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-02-2005, 10:41 PM   #1
tsiMental
Member
 
Registered: Jan 2005
Location: Norway
Distribution: Ubuntu Hoary / Debian Sarge
Posts: 62

Rep: Reputation: 15
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.

Quote:
Xlib: connection to ":0.0" refused by server

Xlib: No protocol specified
Does anyone know how to fix this error?
 
Old 04-02-2005, 10:53 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 04-03-2005, 05:44 AM   #3
tsiMental
Member
 
Registered: Jan 2005
Location: Norway
Distribution: Ubuntu Hoary / Debian Sarge
Posts: 62

Original Poster
Rep: Reputation: 15
Tried it:
Quote:
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...
 
Old 04-03-2005, 09:48 AM   #4
Norb
LQ Newbie
 
Registered: Aug 2004
Location: The Derby
Distribution: Squeeze AMD64
Posts: 15

Rep: Reputation: 0
See if this helps, from the mepislover forums.

http://www.mepislovers.org/modules/n...=3083&forum=11

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

Got this info from http://www.mepis.org/node/view/4535 which Carlos provided the link for.
 
Old 04-03-2005, 10:06 AM   #5
Norb
LQ Newbie
 
Registered: Aug 2004
Location: The Derby
Distribution: Squeeze AMD64
Posts: 15

Rep: Reputation: 0
"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

norb
 
Old 04-03-2005, 11:18 AM   #6
macondo
Senior Member
 
Registered: Jul 2003
Location: Central America
Distribution: Slackwre64-current Devuan
Posts: 1,034

Rep: Reputation: 62
With your favorite editor, open /etc/profile

Example: # nano /etc/profile

and add this line:

export XAUTHORITY=/home/your_user_name/.Xauthority

inserting the username you're using in this box, obviously.

save/exit

logout/login

Last edited by macondo; 04-03-2005 at 11:24 AM.
 
Old 04-03-2005, 11:47 AM   #7
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 04-03-2005, 07:27 PM   #8
ironwalker
Member
 
Registered: Feb 2003
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
Posts: 506

Rep: Reputation: Disabled
Use "sux" instead of "su"
 
Old 04-05-2005, 10:50 PM   #9
tsiMental
Member
 
Registered: Jan 2005
Location: Norway
Distribution: Ubuntu Hoary / Debian Sarge
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by macondo
With your favorite editor, open /etc/profile

Example: # nano /etc/profile

and add this line:

export XAUTHORITY=/home/your_user_name/.Xauthority

inserting the username you're using in this box, obviously.

save/exit

logout/login
the file /root/.Xauthority does not exist... Does that matter?
 
Old 04-05-2005, 11:14 PM   #10
tsiMental
Member
 
Registered: Jan 2005
Location: Norway
Distribution: Ubuntu Hoary / Debian Sarge
Posts: 62

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by Norb
See if this helps, from the mepislover forums.

http://www.mepislovers.org/modules/n...=3083&forum=11

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

Got this info from http://www.mepis.org/node/view/4535 which Carlos provided the link for.
Tnx nurb!!! Works now, needed to reboot after I'd done this.

btw: "sux" didn't work in my Konsole...
 
Old 04-08-2005, 08:25 AM   #11
Norb
LQ Newbie
 
Registered: Aug 2004
Location: The Derby
Distribution: Squeeze AMD64
Posts: 15

Rep: Reputation: 0
Your Welcome

Norb
 
Old 02-16-2007, 08:30 PM   #12
jcconegundes
LQ Newbie
 
Registered: Feb 2007
Posts: 5

Rep: Reputation: 0
Unhappy

I don't have /etc/kde3/kdm/Xservers.

Code:
# cd /etc/kde3/kdm
# ls
backgroundrc  kdmrc  kdmrc.dpkg-dist  Xaccess  Xreset  Xsession  Xsetup  Xstartup  Xwilling
#
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Linux - Newbie 12 11-27-2018 02:30 PM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Programming 1 03-02-2004 09:22 AM
Wine not working. Xlib: connection to ":0.0" refused by server Xerop Linux - General 1 02-18-2004 10:37 PM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 08:49 AM
Mplayer: [Xlib: connection to ":0.0" refused by server] elluva Slackware 2 12-18-2003 07:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration