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 12-29-2005, 09:27 AM   #1
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Problem with "xhost +localhost" not staying set


I have a pretty new install of Slackware 10.2 and I found I couldn't run graphical programs (well, Emacs was the only one I tried) as root, getting error messages like this:

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

emacs: Cannot connect to X server :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 found numerous threads saying to run "xhost +localhost" and this seems to fix the problem temporarily. If I reboot, then I get the same error and have to run xhost again.

How do I make the "xhost +localhost" setting permanent?

Thanks!
 
Old 12-29-2005, 09:50 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
You could try adding "xhost +localhost" to your .profile (~/.profile).
 
Old 12-29-2005, 09:55 AM   #3
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Original Poster
Rep: Reputation: Disabled
That seems to work, thanks! I had to create the file, as it didn't exist.
 
  


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
CUPS problem! "localhost:631, connection refused"!!! robbow52 Debian 5 03-04-2009 01:27 PM
"xhost +localhost" a no go (Ubuntu, Debian) Malibyte Ubuntu 2 12-18-2005 12:04 PM
problem with "telnet localhost 110" nshoboul Linux - Newbie 1 12-04-2003 09:08 AM
Please,the question with "xhost +localhost" fliny Linux - Networking 7 10-16-2003 07:47 PM
Samba problem - "telnet localhost 139" hangs whitefor Linux - Networking 1 09-23-2003 11:37 AM

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

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