[MPlayer-dev-eng] XScreenSaver Extension

Arpi arpi at thot.banki.hu
Sun May 12 00:41:28 CEST 2002


Hi,

> If you are the author of DVD-playing software, here's how you can
> prevent xscreensaver from kicking in while a movie is playing: once a
> minute have a timer go off. In that timer, do something like this:
> 
>             if (playing && !paused) {
>               system ("xscreensaver-command -deactivate >&- 2>&- &");
>             }

rotfl...
have a timer, just for the reason to "ping" the screensavver saying "hey,
i'm alive! don't black the screen!" is more than silly...

what about system("killall -STOP xscreensaver"); at the startup?
and the same with -CONT at exit...

more over, it can be done outside of mplayer, from a script...

mv mplayer mplayer.exe
cat >mplayer
killall -STOP xscreensaver
mplayer $*
killall -CONT xscreensaver
^D

done.

> The reason to do this with a timer (instead of turning the screensaver
> off and then on again in some other way) is so that if your program
> crashes, you're guarenteed that the screensaver will not be left in a
> permanently disabled state.
if a program has a sighandler, it can re-enable it when crashing...
it isn't an acceptable explanation...


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list