At Fri, 12 Mar 2004 14:35:31 +1100, mlh wrote: > On Fri, Mar 12, 2004 at 02:30:12PM +1100, Geoffrey Cowling wrote: > > Xlib: connection to ":0.0" refused by server > > Xlib: Client is not authorized to connect to Server > > ./setup: cannot connect to X server :0 > > so I have to logout as user and login as root on X11... > > Because of X authorisation (xauth). > > If you are the only using this box, do a > 'xhost localhost' before su'ing. This will > allow anyone on the local machine to connect.
For the special case of root (since root can read everyone's files), you're better off doing as others have suggested and setting XAUTHORITY to the relevant user's .Xauthority file. If your "gaining root" process doesn't change $HOME (eg sudo without -H, su with -m or -p), then it should find the right .Xauthority file ok anyway. -- - Gus -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
