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.
sudo add-apt-repository ppa:caffeine-developers/ppa sudo apt-get update sudo apt-get install caffeine
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).
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.
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.
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.