Alexander Dalloz wrote: > Am So, den 03.07.2005 schrieb Pete Toscano um 15:45: > > >>I tried adding it to my script, but got this: >> >>+ /usr/X11R6/bin/xhost +local:root >>/usr/X11R6/bin/xhost: unable to open display "" > > > Means, there is no $DISPLAY defined. Sounded promising, but didn't work. I tried setting the DISPLAY envar, but that didn't help. This time, though, I got a different error: + DISPLAY=:0.0 + export DISPLAY + /usr/X11R6/bin/xhost +local:root Xlib: connection to ":0.0" refused by server Xlib: No protocol specified >>>From what I can tell, it looks like you can't specify the display on the >>command line. I'm at a loss as to what else to do. I have no problem >>entering it from a terminal window though. After that, it works just fine. > > What do you understand as the difference between "command line" and > "terminal window"? Do you try to run your script in non-X mode (runlevel > 3)? True, I sometimes overload the meaning of "command line." In this case, from the xhost man page, it looks like you cannot set the display as a command argument as you can with xset ("-display"). Of course, as you pointed out, I still should be able to with the DISPLAY envar. If I run this new script from a virtual console prompt, it looks to run correctly, but the VC doesn't blank. As the script is written, it (unsuccessfully) tries to detect if it's being run from console or X, then do the appropriate command. The script sees that X is running, so it assumes that it needs to do the X blanking stuff (the stuff that I'm trying to get working anyway). In the VC, all the X commands (xhost and xset) work without returning an error. Unfortunately, I don't know if they have any affect as switching back to X would seem to also signal turning back on the screen. Maybe I should just try to find another ACPI screen blanking script :) or, since the bug at the root of this problem should hopefully be fixed soon, I can live with trying to remember to type "xhost +local:root" as root when I log in and startx. (My laptop always runs in run level 3.) Any other work-around ideas are greatly accepted, but I hate to keep bothering you with this. Thanks, pete