[SWLUG] How can I run X apps as root?

Will Mc Donald wmcdonald at ntlworld.com
Thu Mar 25 14:57:11 UTC 2004


From: "Mark Summerfield" <mark at trolltech.com>
> Whenever I try to run gvim as root I get this:
> 
> $ vi
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> E233: cannot open displayXlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> 
> Is there some simple thing I can do to change this? (I'm using
> Debian/stable with KDE.) If the answer is RTFM then which man page?

If you're connecting using an X server on another machine (Xwin 32, Exceed, the one that comes with Cygwin etc.) then export the DISPLAY to the IP address/hostname of the machine running the X server, i.e.

# export DISPLAY=192.168.X.X:0

Assuming your $DISPLAY environment variable's correct I suspect the issue is Debian's stricter X security defaults. I remember a friend of mine having similar difficulties though I've yet to get round to tinkering with Debian myself. This sort of thing has always Just Worked on most of our RH machines.

Try messing about with/reading up on xhost for starters. Though I remember the problem being a bit deeper. 

Will.





More information about the Swlug mailing list