>From: [EMAIL PROTECTED]:[EMAIL PROTECTED] > >Chip Grandits <[EMAIL PROTECTED]> writes: >| As has been strongly encouraged, I spend most of my time on my linux box as >a >| mortal user. >| Every once in a while I need to go 'root-in' around some system >| files to set up >| a new application >| that I've downloaded (or for whatever reason?). >| Sure I can type >| $ su root >| at the promt and become root >| but I cannot use the x-server - any attempts result in a message >| >| Xlib: connection to :0.0 refused by server >| Xlib: Invalid MIT-MAGIC-COOKIE-1 key >| ... >| Also use xhost program... >| >| Imagine my horror to find I have an invalid magic cookie! Do I >| really have to >| use xhost in order >| to use an xwindows session started by another user? > >Yes, or you can use the authority file. Personally, what I do in this >situation is: > >% su - >Password: *********** >% cp ~user/.Xauthority ~/ >% <run X program> > >~/.Xauthority is the cookie file. I don't remember if you have to set >the DISPLAY variable? If so I do > >% export DISPLAY=:0 > >Replace "user" above with whatever user you log on as. Of course, if >you have what is essentially a single user system > >xhost + localhost > >is much simpler.
I have noticed this, as well. I never had this sort of problem on Red Hat or SuSE. I assume that it's something you can set (presumably a security issue, where the other systems are more permissive). However, as I'm most definitely not experienced in X admin, I've no idea what's going on (to be honest, I don't even know what these cookie things are supposed to be...) Can anybody explain? Actually, is there any good (beginner's) documentation on X (either online or in book form)? The only books I've ever seen are the O'Reilly ones, which seem to be out of print these days... Actually, good books on X programming would be very helpful with all the widget sets, it seems impossible to get any decent "beginner" level books (beginner in the widest sense - I know Windows programming, so GUI stuff is not new to me, but the differences are!). Paul.