LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-08-2004, 02:42 PM   #1
GameboyHippo
Member
 
Registered: Mar 2003
Location: Bible Belt USA
Distribution: Debian
Posts: 91

Rep: Reputation: 15
root cannot connect to an X server in a terminal


Hi,

When I su to root in a konsole window and try to run an X app such as xeyes, xclock, kpackage, etc... I get the following error:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: :0.0

Yet if I'm the user logged in, it will simply run as expected. How do I allow other users that I su into to run programs on the xserver? Is there a way to "permenantly" configure my PC to do that? (i.e. is there a startup script or whatever).

Thanks,

JT
 
Old 02-08-2004, 03:15 PM   #2
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
This means that root is not on the list of allowed users for X. I believe that you can just do this command:

xhost +local:root

to allow the root user to 'connect' to the X windows system.
 
Old 02-08-2004, 05:07 PM   #3
r_jensen11
Senior Member
 
Registered: Apr 2003
Location: Minnesota, USA
Distribution: Slack 10.0 w/2.4.26
Posts: 1,032

Rep: Reputation: 45
It's because you're not using the root user's paths. If you log in as root from a login screen, then you shouldn't have any problems.
 
Old 02-09-2004, 01:50 AM   #4
GameboyHippo
Member
 
Registered: Mar 2003
Location: Bible Belt USA
Distribution: Debian
Posts: 91

Original Poster
Rep: Reputation: 15
Well the both replies seem to be correct. I already knew the second one, but I don't always like being logged in as root. Anyway, now that I added root to the xhost thingamabob, will it be permenant or will I have to do that everytime my computer happens to reboot?
 
Old 02-09-2004, 11:25 AM   #5
smith847be
Member
 
Registered: Jun 2003
Location: Hanover, New Hampshire, USA
Distribution: Debian Sid (Unstable)
Posts: 143

Rep: Reputation: 15
I think it's permanent. However, if it isn't, then you can just pick a random startup script in /etc/rc[whatever].d, and put that line in there.
 
  


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
using fedora to connect to m$ terminal server jbzy3000 Fedora 6 03-05-2005 10:19 AM
how to connect forked process to a specific terminal pcweirdo Linux - Software 2 02-22-2005 04:17 AM
Terminal emulator to connect to SCO server spyregyre Linux - Networking 3 12-15-2004 05:45 AM
Suse9.1, root can't connect to X-server nez Linux - Newbie 6 08-01-2004 10:20 PM
network card won't connect until I go to terminal RayBonz Linux - Networking 4 04-22-2001 05:58 PM


All times are GMT -5. The time now is 06:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration