Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2001 09:09:55 -0500 (CDT)
From:      Conrad Sabatier <conrads@home.com>
To:        Chris Huisman <chuisman@telusplanet.net>
Cc:        FreeBSD Questions List <questions@FreeBSD.ORG>
Subject:   Re: Xlib connection
Message-ID:  <XFMail.20011015090955.conrads@home.com>
In-Reply-To: <3BCA57DE.E801912E@telusplanet.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On 15-Oct-2001 Chris Huisman wrote:
> Ok, I just changed the /etc/ttys file ttyv8 variable to on instead of
> off, now when I su to root and try to open up emacs I get the
> following error:
> 
>  Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> 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 don't know what's going on here.  Before I modified /etc/ttys
> everything was find.  I was able to su to root, and open up emacs no
> problem.

It's just a security measure to prevent anyone from hijacking your X
session.

I use a little hack in my .bashrc for root:

if [ $TERM = xterm-color ]
then
        cp ~conrads/.Xauthority /root
fi

I know there are more "correct" ways to do this, but this works for me.

-- 
Conrad Sabatier <conrads@home.com>

Sorry, no fortune this time.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20011015090955.conrads>