Linux Media Players And Flash Not Stopping The Screensaver

It’s a pretty common problem, one which could be solved by pretty much the following sentence: ‘[Insert Linux Distro], [Insert Media Player] not stopping screen saver when playing videos.’ And, yeah, it’s very annoying. Something that should have been fixed thousands of releases ago, just like most common Linux problems. Luckily though there is a fix, it’s easy and it’s awesome.

Introducing: Caffeine, “An application to temporarily prevent the activation of both the screen saver and the “sleep” powersaving mode.” – https://launchpad.net/caffeine

Essentially what this program does is look for processes running on your machine (you can do this too, just run ‘ps -A’ in a terminal emulator to see a list of everything), so you set process names which the program should look out for, for example ‘vlc’ and when there is a process with this name Caffeine disables the screensaver, when the process stops the screensaver is re-enabled. It even comes with a little tray icon which allows you to manual enable or disable the screensaver/power management with a single click.

Installation (Ubuntu):
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
sudo apt-get install caffeine
Usage:

You’ll be able to see if caffeine is running by the tray icon the first time you use it (this can be disabled in the settings).

Caffeine Running (Screensaver / Power Management Enabled)

Caffeine Running (Right Click Settings)

Caffeine Running (Screensaver / Power Management Disabled)

Adding Processes:

To add a process which will disable the screensaver from being activated, for example VLC so we can watch a movie without constantly having to wiggle the mouse:

First, run VLC (or whatever other media player you wish and just replace VLC for that for the other few steps)

Next, right click on the Caffeine tray icon and select “Preference”.

Click the “Add” button.

List of processes already disabling the screensaver, note Totem is added here.

You should be greeted by a list of the running processes, select the name of the media player (this case, vlc) if it isn’t there check under the “Recent Processes” tab or alternatively just write the command you would use to run this program from the command line.

Adding VLC to processes to disable the screensaver.

Finally click the “Add” button and close the preferences window, that pesky screensaver should no longer be bothering you!

Stopping Flash from enabling the screensaver:

Okay, this is actually really easy, if you’re using Chromium or Google Chrome or Firefox, you’ll just want to add the processes ‘npviewer.bin’ to list, you can use the above instructions to do so.

1 comment to Linux Media Players And Flash Not Stopping The Screensaver

  • stqn

    At least VLC and smplayer prevent Xscreensaver from running when there is a video playing.

    However the problem remains with flash videos… Caffeine is interesting but I’d like to find something better :).

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>