I have 'xhost localhost' in my .xinitrc (maybe you'd need in in
.xinitrc.switchdesk?), which is perhaps less secure, but works in all
situations for me ...
"Thomas J. Hamman" wrote:
>
> On Wed, 07 Jul 1999, Chmouel Boudjnah wrote:
> > "Thomas J. Hamman" <[EMAIL PROTECTED]> writes:
> >
> > > When running in init 5 everything is fine, but if I run X with 'startx' in init
> > > 3, I get this message whenever I try to su to root and run a program:
> > > Xlib: connection to ":0.0" refused by server
> > > Xlib: Client is not authorized to connect to Server
> > > kpackage: cannot connect to X server :0
> > > What is the cause of this and how can it be changed? Or is it just expected
> > > that one should be in init 5 if they wish to use X and run programs from
> > > different users?
> >
> > put in your ~/.bashrc :
> >
> > [ -z $DISPLAY ] || {
> > export XAUTHORITY=$HOME/.Xauthority
> > }
> >
> > or upgrade to the last etcskel from cooker(*), and copy the
> > /etc/skel/.bashrc to your user directory.
> >
> > (*): http://www.linux-mandrake.com/cooker/
>
> Thanks for the quick response, I put that in my ~/.bashrc and it worked...
> partially. I can run most programs fine now but I still get an error if I try
> to run linuxconf, same message except with 'Error message from remadmin:' in
> front of each line:
>
> Error message from remadmin :Xlib: connection to ":0.0" refused by server
> Error message from remadmin :Xlib: Client is not authorized to connect to
>ServerError message from remadmin :
> Error message from remadmin :Gtk-WARNING **: cannot open display: :0
> remadmin (GUI frontend) exiting abnormaly
>
> It's not a big problem for me since I can run in init 5, but I thought I should
> mention that that addition to ~/.bashrc did not fix the problem for every
> program.
>
> -Tom