LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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


Reply
  Search this Thread
Old 05-14-2005, 09:38 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
Xlib errors


I log into my box as nonroot.
I type gvim or firefox in the command line and it launches OK. Here is where it gets strange. I log in as root for a while, then switch back to the nonroot account. I type gvim again, and comes up with the errors:

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

E233: cannot open displayXlib: connection to ":0.0" refused by server
Xlib: No protocol specified

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

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
If I type firefox, the command line will act like it launched OK (which it shouldn't do without the "&". It just prompts me again and firefox never comes up.

Then if I switch to root again and try to launch either one, they'll work.


Any ideas? This has to be a common problem because this happens on my home machine, my laptop, and my work PC (unless I am configuring something wrong, and thinking I am doing it right).


thx,
 
Old 05-15-2005, 09:52 AM   #2
axobeauvi
Member
 
Registered: Apr 2003
Posts: 128

Rep: Reputation: 16
that is strange
what login manager do you use kdm,gdm .... try another one
check the permissions and ownership of .Xauhority
hope this helps a bit
 
Old 05-16-2005, 06:56 AM   #3
derrickhackman
LQ Newbie
 
Registered: Aug 2004
Location: MA
Distribution: SuSE
Posts: 17

Rep: Reputation: 0
I ran into similar issues and found that it had to do with the environment of the root user being different that the non-root user. I believe the fix was to export the DISPLAY environment variable. I was having issues when pulling up emacs as root and it not finding xlib, I had to use:
Code:
emacs -nw <myfile>
so that it did not force an x session.
 
Old 04-15-2006, 05:33 PM   #4
mlavannis
LQ Newbie
 
Registered: Apr 2006
Posts: 3

Rep: Reputation: 0
Xlib: connection to ":2.0" refused by server

You may not have permission to the Xauthority file locatd in your home directory. Do this to check:
> ls -l ~/.Xauthoriy

Make sure you have rw permissions

Next:
> xauth list

Make sure you have an entry in there for DISPLAY :2
(or whichever DISPLAY number interests you)

If not:

> xauth add <hostname:2> <protocol> <HEX magicnumber>
(you can also use> xauth add <hostname:2> . `mcookie`

You can google to find out other ways to generate a HEX magic number for xauth - there are many solutions out there.

Last edited by mlavannis; 04-23-2006 at 10:09 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xlib errors when trying to open graphical app from command line, 9.1 Personal Baddox SUSE / openSUSE 4 09-21-2005 11:31 PM
xlib errors hornet74 Linux - General 5 08-28-2004 05:27 AM
Xlib errors addisono Linux - Software 4 02-08-2004 08:30 PM
Xlib errors, X Windows Problems??? Please help... leeach Linux - Software 2 10-02-2003 06:10 PM
Xlib errors, X Windows Problems??? Please help... leeach General 0 10-02-2003 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:54 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