Preventing screensaver when playing movie?
graeme2 at argyllcms.com
Mon Mar 3 21:24:35 PST 2008
Nicolas Mailhot wrote:
> One way to push beyong the usual "go away" response is to publish a
> bug reference other people can comment on.
See this thread for when I raised this issue, and
the various responses.
I tested the kde sceensaver recently (Fedora core 8), and it does
not appear to reliably take any notice of XScreenSaverSuspend(),
contrary to what Lubos Lunak's had thought. It seemed to
work once in a session, and then no longer be effective. Only
the "dcop" method seemed to be always effective. I guess
this may be a bug.
So in my testing I've observed the following:
Needs exec("xscreensaver-command -deactivate") periodically.
Needs "dbus-send --dest=org.gnome.ScreenSaver --type=method_call
Needs "dcop kdesktop KScreensaverIface enable false" to disable, and
"dcop kdesktop KScreensaverIface enable true" to enable.
X11 complient screensavers:
(are there any ?)
Need XScreenSaverSuspend(display, True) to suspend,
and XScreenSaverSuspend(display, False) to resume.
X11 screensaver if XScreenSaverSuspend() extention isn't present:
Need XSetScreenSaver() to disable & enable X11 screen saver.
or periodic XResetScreenSaver().
Someone suggested using the xdg-screensaver tool, but it's not
available on all systems, and I'm wondering what progromatic mechanism it
uses (and therefore which screensavers it doesn't work with), and a direct
programmatic mechansim like XScreenSaverSuspend() is preferable over doing
and exec() or system() call.
It seems to be illustrative of the situation to look at the
code in the various Linux audio and video playback programs.
You will find all of the above sort of thing and more in them to
cope with screensavers and power savers.
More information about the xorg