Re: Xlib: connection to ":0.0" refused by server?
Toby Dickenson <[email protected]>
| Newsgroups | gmane.linux.gentoo.newbies |
|---|---|
| Message-ID | <[email protected]> |
On Sunday 25 August 2002 23:24, [email protected] wrote: > On Sun, Aug 25, 2002 at 06:11:25PM -0400, Bob Paddock wrote: > > If I'm logged in as 'bob' and I su root, then try to start some thing > > like emacs I get this: > > > > > > root@bob cups # emacs error_log& > > [1] 6860 > > root@bob cups # 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. [This is the same machine!?] I you use 'su -' it will clear all environment variables such as DISPLAY, and you will be able to use a text mode emacs. > before you su, type 'xhost +localhost' Eeeek. It depends on the configuration of your machine (of course), but using xhost like that is likely to be a security problem. It means that any process on your machine can connect to your X server to snoop on your windows, record keystrokes, etc. You may want to look at ssh, which can perform secure X forwarding. 'ssh -l root localhost' will let you run X emacs as root, without the security hole.