Prev | Current Page 176 | Next

Chris Tyler

"X Power Tools"


It??™s very easy to write a script to turn off DPMS before starting an application and
to turn it on again afterward. This script also checks to see whether xscreensaver
(Section 6.13) is running, and if it is, exits xscreensaver for the duration of the
application:
#!/bin/bash
xset -dpms s off # disable dpms and X server screensaver
# determine if xscreensaver is running
if killall -signal 0 xscreensaver >/dev/null 2>&1
then
xscreensaver-command -exit # exit current xscreensaver
xscreensaver="yes" # remember it was running
fi
"$@" # run the application specified on the command line
# re-start xscreensaver if necessary
if [ "$xscreensaver" ]
then
xscreensaver -nosplash &
fi
xset +dpms s default # dpms and screensaver re-enabled
If this script is saved in the file noblank, you could use it with xine to show a movie
uninterrupted:
$ noblank xine MovieFile
6.13 Eye Candy: xscreensaver
Most security applications rate poorly for fun and overall coolness. xscreensaver, on
the other hand, is all about fun??”in the form of eye candy??”and it can help tighten
up security, too.
Will a screensaver actually save your screen? Not really; to reduce wear and tear on
your monitor, you??™re probably better off shutting it down using DPMS (Section
3.


Pages:
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188