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 |
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.
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.
|
|
08-11-2005, 10:28 AM
|
#1
|
Member
Registered: May 2004
Posts: 166
Rep:
|
cannot open display as root
I am having this problem as root.
For instance, I want to install netscape in /usr/local, so I have to do this
as root. If I wanted to install it in my own directory, the windows pop up and
everthing is fine.
In the csh I do a
setenv DISPLAY :0.0
and it shows up when i do "env".
But I still get
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
GtkWarning** cannot open display: :0.0
|
|
|
08-11-2005, 10:31 AM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Run:
xhosts +
Which allow all users to run applications as themselves in an X environment logged in as another user.
You can specify users as well, man xhosts for more details.
|
|
|
08-11-2005, 10:40 AM
|
#3
|
Member
Registered: May 2004
Posts: 166
Original Poster
Rep:
|
I had tried xhosts plus even though I am on
a stan alone machine, but when I do that
it tells me it cannot open display :0.0!
|
|
|
08-11-2005, 10:40 AM
|
#4
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
export DISPLAY instead of setenv DISPLAY
|
|
|
08-11-2005, 10:47 AM
|
#5
|
Member
Registered: May 2004
Posts: 166
Original Poster
Rep:
|
First off. when I su to root and do an env
I do get DISPLAY :0.0 in the first place,
you do export in bash, and setenv in csh.
|
|
|
08-11-2005, 10:49 AM
|
#6
|
Member
Registered: May 2004
Posts: 166
Original Poster
Rep:
|
I should add, I cant get any man pages for
xhost, I assume that is because it's a network
thing, and my machine is stand-alone.
|
|
|
08-11-2005, 11:06 AM
|
#7
|
Member
Registered: May 2004
Posts: 166
Original Poster
Rep:
|
Solved it!
I had to do xhost +localhost as user before
changing to root
|
|
|
08-11-2005, 11:10 AM
|
#8
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Quote:
Originally posted by tethysgods
Solved it!
I had to do xhost +localhost as user before
changing to root
|
Well yeah, the user running X has to give the permissions, not the user trying to run the application in X..
|
|
|
08-11-2005, 11:50 AM
|
#9
|
Member
Registered: Oct 2004
Location: Iceland
Posts: 94
Rep:
|
but it's root...
|
|
|
04-13-2010, 01:33 PM
|
#10
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Rep:
|
Quote:
Originally Posted by tethysgods
Solved it!
I had to do xhost +localhost as user before
changing to root
|
I’ve run xhost +localhost as user it didn’t fix anything.
When I try to run xclock as user or root I end up with “Error: Can't open display: 0.0”
I'm running virtual server Debian/Lenny.
|
|
|
04-13-2010, 02:12 PM
|
#11
|
LQ Newbie
Registered: Apr 2010
Posts: 8
Rep:
|
Quote:
Originally Posted by lamachine
I’ve run xhost +localhost as user it didn’t fix anything.
When I try to run xclock as user or root I end up with “Error: Can't open display: 0.0”
I'm running virtual server Debian/Lenny.
|
I walked around with by enabling X11 forwarding on client side => ssh -X user@machine_ip.
The xclock shows gently up and and ./RUN_setup.sh brings the promising dialog box for my Java application.
|
|
|
04-14-2010, 01:44 AM
|
#12
|
Member
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 334
Rep:
|
Try this as user:
Code:
export XAUTHORITY=/home/user/.Xauthority
su
xclock
Regards,
Stefan
|
|
|
12-09-2010, 05:48 PM
|
#13
|
LQ Newbie
Registered: Jul 2004
Location: North Carolina
Distribution: Mandrake; Fedora
Posts: 8
Rep:
|
Failure under debian lenny
I'm running debian lenny under virtualbox: logged in
as user "foo", open a terminal and "su bar", then try
to use X-based apps.
Tried both the "xhost +localhost" and "setenv XAUTHORITY /home/foo/.Xauthority" (for both 'foo" and "bar"); neither
works (whether alone or in combination).
Never had this kind of trouble in over a decade with
RedHat/Fedora/RHEL, Mandrake/Mandriva, SuSE, PCLinuxOS,
CentOS. Frustrating... and a show-stopper for my using
debian.
|
|
|
12-10-2010, 07:31 AM
|
#14
|
Member
Registered: May 2004
Posts: 166
Original Poster
Rep:
|
Does this help at all.
I am sure you have already searched a fair bit, but is this any help?
http://www.xs4all.nl/~zweije/xauth-6.html
"Notice that some X servers (from XFree86) can be configured not to listen on the usual TCP port with the -nolisten tcp argument. Notably the default configuration of Debian GNU/Linux is to disable the X server listening on the TCP port. If you wish to use remote X on a Debian system, you should re-enable this by altering the way the X server is started. Look at /etc/X11/xinit/xserverrc for a start."
I must admit it doesn't mean much to me.
|
|
1 members found this post helpful.
|
12-10-2010, 04:16 PM
|
#15
|
LQ Newbie
Registered: Jul 2004
Location: North Carolina
Distribution: Mandrake; Fedora
Posts: 8
Rep:
|
Thanks -- it turned out what I need was in section 7, not 6: Debian locks things down so that you need to jump through hoops with xauth and .Xauthority to have cross-user display on a given machine. This is made easier by a "su" variant called, if you can believe it, "sux" ("su with X").
I had searched a fair bit, but google found so many false positives for my problem that I never got to the "xs4all" howto.
Thanks again -- Carlie
|
|
|
All times are GMT -5. The time now is 08:49 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
|
|