LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-13-2004, 12:02 AM   #1
spuppett
Member
 
Registered: Feb 2003
Posts: 47

Rep: Reputation: 15
root emacs problems


when I try to run emacs as root I get this error

Code:
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 xhost, but it said no program found, i don't know where it is.

any insight would be helpful.

Thanks
 
Old 04-13-2004, 03:18 AM   #2
MarkBurke
LQ Newbie
 
Registered: Nov 2003
Location: Orange County, CA, USA
Distribution: aix, rhel, ubuntu
Posts: 24

Rep: Reputation: 0
Rats I had a longer reply, but it is missing, my mistake, try the commands below

set DISPLAY=localhost:0.0
export DISPLAY
setenv DISPLAY localhost:0.0
emacs

Substitute localhost for your computer name if necessary.

also

emacs -d localhost:0.0

works
generally /usr/X11R6/bin/xhost is the path
 
Old 04-13-2004, 03:20 AM   #3
MarkBurke
LQ Newbie
 
Registered: Nov 2003
Location: Orange County, CA, USA
Distribution: aix, rhel, ubuntu
Posts: 24

Rep: Reputation: 0
j@localhost j]$ alias emacs
bash: alias: emacs: not found
[j@localhost j]$ export DISPLAY=3lkj:0.0
[j@localhost j]$ alias emacs
bash: alias: emacs: not found
[j@localhost j]$ emacs
_X11TransSocketINETConnect: Can't get address for 3lkj
emacs: Cannot connect to X server 3lkj: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.

[j@localhost j]$ export DISPLAY=localhost:0.0
[j@localhost j]$ emacs
[j@localhost j]$ #works!
[j@localhost j]$
 
  


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
can't run emacs as root resist_r Linux - General 1 10-07-2005 06:54 PM
Emacs problems with SuSe 9.1 NNP Linux - Newbie 4 11-14-2004 02:08 PM
cant use emacs in root any more? |2ainman Linux - General 1 04-19-2004 10:07 PM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 08:31 AM
emacs won't load as root cuzzle Linux - Software 3 03-05-2004 01:49 PM


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