XScreenSaver



  1. Xscreensaver As Background
  2. Xscreensaver Command Line
  3. Xscreensaver Gl
  4. Xscreensaver
  5. Xscreensaver Bsod

In the past xscreensaver and caffeine were best of buddies; stopping the screensaver intruding while you watched something. However, recent builds of caffeine don’t play nice with non-gnome desktops out of the box. To counter the problem I’ve produced a script that will stop xscreensaver kicking in when a full-screen window is in the foreground:

Xscreensaver As Background

We would like to show you a description here but the site won’t allow us. The xscreensaver-command program controls a running xscreensaver process by sending it client-messages. Xscreensaver(1) has a client-server model: the xscreensaver process is a daemon that runs in the background; it is controlled by other foreground programs such as xscreensaver-command and xscreensaver-demo(1).

XScreensaverStopper.sh

The script should be downloaded into any folder you think is best. To start the script a command similar to the following should be used:

Xscreensaver Command Line

Xscreensaver

You should add this command to your session’s start up applications and next time you log in xscreensaver will be prevented from running while you have any full-screen windows in the foreground. This include full-screen flash and HTML5 videos, meaning xscreensaver won’t interrupt Youtube or Netflix if you’re watching them full-screen.

XScreenSaverXScreenSaver

Xscreensaver Gl

The script works by performing a check every 30 seconds to see if the window that currently has focus is set to be full screen (not just maximised). If so the script tells xscreensaver to restart its count of how long the user has been idle.

The script should be usable on other Linux platforms that can use bash scripts and xscreensaver.

Xscreensaver

Feel free to modify the script if you can think of any improvements.

Xscreensaver Bsod

If you’re interested in a version of the script that stops the screensaver when any window is set to be full screen (not just the one that has focus) see this post (useful for multiple monitors).