LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-25-2003, 12:58 PM   #1
zovres
Member
 
Registered: Sep 2002
Posts: 184

Rep: Reputation: 30
Xlib: connection to ":0.0" refused by server


sometimes I get this error when I try to use mplayer or freecraft as a non-root user

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

I have this error since I've started using fluxbox
do you guys know a way to fix that?
 
Old 08-25-2003, 01:10 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
This usually only occurs when you are trying to run an X application from either a console or a terminal under an X session you didn't start as that user. Thoroughly confused?

If you logged in as root and typed:
startx
And then, opened up a terminal and typed:
su - username
And followed with:
xedit
You'd likely get that error as your user doesn't have permissions to run X applications in root's X session (same goes in reverse and parallel, nobody except the user who started the X session can execute X apps in it).

However, there is a workaround:

xhost+localhost

This should allow anyone on your local machine to run X apps in any X session, type that in before you 'startx' and it should render this ability available.

Another option is to startx as the user you are going to use to launch the app. If you don't want to close down the current X session:
CTRL ALT F2
to another console, login as the user, and type:
startx -- :1
This'll start an X session on tty8 and the old session'll be on tty7, to switch you type:
CTRL ALT F7/F8

This display is now known from the Xserver as 0:1

Cool
 
Old 08-25-2003, 01:45 PM   #3
zovres
Member
 
Registered: Sep 2002
Posts: 184

Original Poster
Rep: Reputation: 30
thx for that quick and complete reply
 
Old 08-25-2003, 01:48 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You're welcome, glad I could help

Cool
 
  


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 11 04-22-2015 10:17 AM
XERROR: 'Xlib: connection to ":0.0" refused by server' tsiMental Debian 11 02-16-2007 08: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


All times are GMT -5. The time now is 12:32 PM.

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