This is X-security mechanism - Magic Cookies.  By default, only the
person who started the X session can connect to the server.  I'm
guessing that you started X as a user then su'ed to root in an xterm, or
that you started X as root, and then the script runs as a different
user.  

There are two ways to allow access to an X-server:

        1) xhost.  See man xhost.  As an example, 'xhost +localhost'
           will allow anyone connected to your machine to connect to the
           server.  This method is not recommended, as it is a big 
           security issue.  There should be more about this is the FAQs
           'cos there was quite a lot on this list a couple of months
           ago.  (2) is better:

        2) If you just want root to be able to connect to the server, su
           to root in an xterm, then type:
                export XAUTHORITY=/home/<user>/.Xauthority
           If you always want to use this with the same user (eg if you 
           have a single-user machine, you can add this to (eg) the
           /root/bashrc or /root/bash_profile files, but you won't then
           be able to actually start X as root.

HTH
Rich              

Lance Hoffmeyer wrote:
> 
> I was trying to run a setup program in X.  I logged in as su and ran the 
> script.  This was the error message.  The Xlib: connection to ":0.0" refused 
> by server error is the same message I get when I try to run rvplayer. What 
> does the error mean and how do I fix it?
> 
> Spawning X setup utility for Chklogs package
> Xlib: connection to ":0.0" refused by server
> Xlib: Invalid MIT-MAGIC-COOKIE-1 key
> Application initialization failed: couldn't connect to display ":0"
> Error in startup script: invalid command name "wm"
> 
> Lance
> 
> --
> Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to