Re: Xlib: connection to ":0.0" refused by server?

[email protected]
Newsgroups gmane.linux.gentoo.newbies
Message-ID <[email protected]>
On Mon, Aug 26, 2002 at 01:20:24PM +0100, Toby Dickenson wrote:
> 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.

afaik, there's only a security problem when you type xhost +
it says: access control disabled, clients can connect from any host
but, when you type xhost +localhost only the localhost is allowed to
make connections. don't think that is a security hole. (if i'm not
mistaken)


> 
> 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.

in that case, make sure that X11 forwarding is enabled in your
sshd_config. default is disabled in gentoo

greetz,
stijn

> _______________________________________________
> gentoo-newbies mailing list
> [email protected]
> http://lists.gentoo.org/mailman/listinfo/gentoo-newbies
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.