LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   root emacs problems (https://www.linuxquestions.org/questions/linux-newbie-8/root-emacs-problems-169403/)

spuppett 04-12-2004 11:02 PM

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

MarkBurke 04-13-2004 02:18 AM

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

MarkBurke 04-13-2004 02:20 AM

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]$


All times are GMT -5. The time now is 03:42 PM.