XScreensaver copout workaround

Posted by Hans Fugal Fri, 07 Jul 2006 06:22:00 GMT

This FAQ answer is the most moronic thing I have ever heard.

When you want to watch a movie, fire up xscreensaver-demo and select Mode: Disable Screen Saver from the option menu, which means not to blank the screen at all. When you're done watching the movie, re-select your previous mode.

That's kind of lame, I know. You should ask the author of the DVD-playing software you are using to add explicit support for xscreensaver to their program.

So let's get this straight, you want everyone who might write a program that shouldn't be interrupted by the stupid screensaver to implement xscreensaver-specific logic to keep the screensaver from coming on, and you don't want to give us end users an easy way to turn it on or off in a script. IDIOT!!

Oh it gets better. He then goes on to explain how developers should "add explicit support for xscreensaver". They should set up another thread to periodically make a system call, e.g.:

if (playing && !paused) {
    system ("xscreensaver-command -deactivate >&- 2>&- &");
}

I'm utterly amazed at the idiocy. But let it not be said that I rant without action:

#!/bin/sh
(
while true; do
    sleep 60
    xscreensaver-command -deactivate &>/dev/null
done
)&
trap "echo 'Reenabling XScreensaver (IDIOT!!)'; kill $!" 0

xmess nes -cart ~/games/mario.nes

If you're ambitious, you could write a generic wrapper program inspired by sudo or openvt.

Comments are disabled

Tags

asterisk audio bash bread cs diy fat food health life linux mac music osx review ruby sourdough src typo voip