On Fri, 28 May 2004, Mike Hearn wrote:
On Thu, 2004-05-27 at 17:40 -0700, Bryce Harrington wrote:
- Run `xhost +`
================= By default my system was set up with xhost -, so that's why the Xlib errors were showing up. You can detect the current setting by running `xhost`. I'd recommend you add to your install script something that turns this on when the program is run, and restores to the original state when the script exits.
How is it possible to run any X programs at all as root if this is set? Is this the SuSE default, or is this something you have done?
Normally X will use MIT magic cookies in preference to xhost "authentication", so "xhost -" should not be a problem (from a security perspective, it's a sane default).
Xlib looks for cookies matching $DISPLAY in the file pointed to by $XAUTHORITY (normally this is ~/.Xauthority). As long as $XAUTHORITY points to a file that is readable and contains a cookie for the current display things should work fine. Check to make sure that $DISPLAY and/or $XAUTHORITY are not getting reset somehow.
Please do not use "xhost +".
Let me reiterate: unless you're comfortable with arbitrary remote hosts being able to get screen dumps, snoop keyboard input, or pretty much anything else they want with your X session, do not EVER use "xhost +".
-mental