[ILUG] connection refused
Trevor Johnston
tjohnston at socc.ie
Sun Sep 2 18:48:33 IST 2001
On Sun, 2 Sep 2001, Paul O'Neil wrote:
> Small problem but how do i fix it? When I execute a program as root I get
> the following
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Error: Can't open display: :0.0
> if I execute as non-root I get permission denied. I know it has
> something to do with suid stuff but I'm confused how all that works.
It's actually not to do with suid stuff, more to do with who is authorised
to run programs on your X session. Somebody else can explain the exact
technical reasons why, but try entering the command "xhost localhost", in
an X terminal (a shell running in X) as the user who started the X
session. Not as root or any other users!
I haven't read up much on xhost, but basically it lets you choose what
hosts/machines are allowed to utilise your X server. Dunno how or why it
won't let other users on the local machine connect (eg. root), but the
above command will let any user on localhost (ie. the local machine) run a
program on your X session.
Trevor
More information about the ILUG
mailing list