LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-03-2003, 03:07 PM   #1
Bran6don
LQ Newbie
 
Registered: Feb 2003
Location: Houston, TX
Distribution: Slackware 8.1/ Mandrake 9.1
Posts: 5

Rep: Reputation: 0
simple X question


This should be a fairly simple question.

When I type "emacs test &" from my regular username, a new emacs windows opens up and everything works fine.

When I type the same thing fromt the root account, I get:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

I tried to run xhost, but I get the same error.

The display env variable for each account is :0.0

Anyone know what's up?
 
Old 02-03-2003, 06:12 PM   #2
jdc2048
Member
 
Registered: Jul 2002
Distribution: Redhat, Gentoo, Solaris, HP-UX, etc...
Posts: 391

Rep: Reputation: 30
How are you using the xhost command? Just running "xhost" will not change anything, it only displays which hosts are allowed to connect.

If you are logged in as a standard user, then using su to get root access, then trying to open an X window on your desktop then you will get this.

The way to get around it is to run "xhost +<hostname>"
not literally of course, you need to sub in your hostname for <hostname> or use "localhost" if you are doing this on the same machine.

Some might tell you to just use "xhost +", which is bad form, you should always specify the name of the host you wish to allow access to.

Last edited by jdc2048; 02-03-2003 at 06:13 PM.
 
  


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
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 02:03 PM
Installing Programs - A simple question from my simple mind jmp875 Linux - Newbie 6 02-18-2004 09:03 PM
Hopefully a Simple Question Arcane Kidd Linux - Newbie 5 01-17-2003 04:27 PM
Really Simple Question -- Please help! Cia420 Linux - General 3 05-07-2002 06:42 AM
simple question seeking simple answer enzo250gto Linux - Newbie 1 10-27-2001 04:08 AM

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

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