Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-20-2003, 01:51 PM
|
#1
|
|
Member
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201
Rep:
|
root user can't open display
I have been having problems with this for ages now...ane never figured out what's going on. The problem is that I can't run Gnome applications as root. Here is an example of what happens when the root user tries to run galeon:
bash-2.05a# galeon &
[1] 17824
bash-2.05a# Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Gtk-WARNING **: cannot open display: :0
[1]+ Exit 1 galeon
okay, so I don't need to run galeon as root anyway, but some apps such as ethereal do require superuser status.
Does anyone know what's going on here?
christo
|
|
|
|
01-20-2003, 01:57 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,827
|
run "xhost +localhost"
|
|
|
|
01-20-2003, 02:42 PM
|
#3
|
|
Member
Registered: Jun 2002
Location: London
Distribution: Slackware
Posts: 201
Original Poster
Rep:
|
thanks chris
chris
|
|
|
|
01-23-2003, 01:27 PM
|
#4
|
|
Member
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 81
Rep:
|
Hey chris...what if when I do xhost + and I get "xhost: not found"? I'm trying to start the VNC server on my box and when I start it, the log (../hostname:1.log) says, "xhost: unable to open display hostname:1"
|
|
|
|
01-23-2003, 01:37 PM
|
#5
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,827
|
well if that's a file not found error, mine is in /usr/X11R6/bin/xhost, so check you've nto got a path issue, assuming it's there somewhere - use whereis, find or locate.
|
|
|
|
01-23-2003, 01:57 PM
|
#6
|
|
Member
Registered: Feb 2002
Location: Erie, CO
Distribution: Red Hat 7.1
Posts: 81
Rep:
|
Sorry about the double post...
Anyhow, I found xhost (/usr/X/bin), but when I issue the command:
xhost +myhostname
I get:
/usr/X/bin/xhost: unable to open display ""
|
|
|
|
01-23-2003, 07:51 PM
|
#7
|
|
Member
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771
Rep:
|
Quote:
Originally posted by desbyleo
Sorry about the double post...
Anyhow, I found xhost (/usr/X/bin), but when I issue the command:
xhost +myhostname
I get:
/usr/X/bin/xhost: unable to open display ""
|
Try doing it as the user who runs the X server from within an xterm. You should be able to put it in your .xinitrc too, if one exists.
Or if you're running 'su -' to become root and running your app within the root shell,
export XAUTHORITY=~<xuser here>/.Xauthority
before your run your app. Put it in root's .profile if you want it to stick.
|
|
|
|
01-28-2003, 07:34 AM
|
#8
|
|
LQ Newbie
Registered: Jan 2003
Distribution: Debian / Gentoo
Posts: 1
Rep:
|
root user can't open display
edit your /etc/X11/gdm/gdm.conf
You'll find a line which start your X :
X -a-lot-of-options
add "-ac" to this line.
Restart your gdm
/etc/init.d/gdm stop
/etc/init.d/gdm start
log as normal user. Su as root
export your display :
export DISPLAY=:0
try with xterm.
JG.D.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:37 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|