LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 02-13-2007, 09:11 AM   #1
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Rep: Reputation: 30
Question strange X connection / protocol error


Hello.

I boot, log into my non-root account via gdm and try to start a aterm. The window closes immediately, leaving me no error or anything, same thing with xterm. I logout and log into my root account via gdm. Now i can run both xterm and aterm perfectly, So i # su <non-root_account> and then try to run aterm again, giving me following error:

Code:
Lnex ~ # su phsythax
phsythax@Lnex /root $ aterm
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

aterm: can't open display :0.0
phsythax@Lnex /root $ xterm
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xterm Xt error: Can't open display: :0.0
What is wrong? I get the same error if i hit ctrl+alt+F1 and try to run aterm/xterm from the console (root acount).

I have no clue what to do. Help appreciated.

Last edited by phsythax; 02-13-2007 at 09:14 AM.
 
Old 02-13-2007, 09:19 AM   #2
David_g17
LQ Newbie
 
Registered: Nov 2003
Posts: 29

Rep: Reputation: 15
per http://www.experts-exchange.com/Oper..._20762091.html

it is most likely you are trying to run an app from a terminal as something like "root" -- in which case as your user you need to use "xhost +" command. You can read more about it by using "man xhost"

http://www.linuxquestions.org/questi...hreadid=331779

Last edited by David_g17; 02-13-2007 at 09:20 AM.
 
Old 02-13-2007, 09:50 AM   #3
phsythax
Member
 
Registered: Oct 2005
Location: Denmark
Distribution: Gentoo & XP pro for gaming
Posts: 152

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by David_g17
per http://www.experts-exchange.com/Oper..._20762091.html

it is most likely you are trying to run an app from a terminal as something like "root" -- in which case as your user you need to use "xhost +" command. You can read more about it by using "man xhost"

http://www.linuxquestions.org/questi...hreadid=331779
None of that worked; i couldn't even run xhost.
I also added the line in /root/.bashrc as mentioned here: http://www.linuxquestions.org/questi...82#post1685482

I dont understand why this suddenly happens. I have made no change to this kind of stuff whatsoever.
 
Old 02-13-2007, 09:54 AM   #4
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
You need to do the xhost+ as the user that opened the session.

KDM/GDM/.. Login as user

you want to allow others to access the X server:
xhost +
su - user2
xterm

if you log in as user and want to give root the access, its simpler because root has access to all files; just type this AS ROOT:
xauth merge ~user/.Xauthority

Last edited by nx5000; 02-13-2007 at 09:55 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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Connection refused error. Maybe kernel guru required? shy Programming 3 10-27-2004 11:35 AM
Error In Rsh Connection, poll:protocol failure in circuit set xhx321 Red Hat 5 04-20-2004 12:06 AM
Error In Rsh Connection, poll:protocol failure in circuit set xhx321 Linux - Networking 1 04-18-2004 06:34 AM
Internet Connection Sharing 'PROTOCOL NOT AVAILABLE' error phoenix07 Linux - Security 3 04-11-2004 11:31 PM
Strange connection error! DarkSTech Linux - Networking 2 03-05-2003 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:25 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
Open Source Consulting | Domain Registration