LinuxQuestions.org
Help answer threads with 0 replies.
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, 11:58 AM   #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, 12:10 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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, 12: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, 12:48 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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 12 11-27-2018 01:30 PM
XERROR: 'Xlib: connection to ":0.0" refused by server' tsiMental Debian 11 02-16-2007 07:30 PM
Xlib: connection to ":0.0" refused by server Xlib: No protocol specified eyalkz Programming 1 03-02-2004 08:22 AM
Wine not working. Xlib: connection to ":0.0" refused by server Xerop Linux - General 1 02-18-2004 09:37 PM
What is "Xlib: connection to ":0.0" refused by server " rack201 Linux - Software 1 02-04-2004 07:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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