Many Linux media players do a great job of keeping your screen saver from activating when you're watching a video. But what about when you're watching videos online? Firefox and other major browsers have no such feature to keep your screen active while watching videos.
There's a cool application for the Gnome desktop called Caffeine that, when activated, will prevent your computer from activating the screen saver or going into power save mode. You can download the source tarball or .deb files from the project's page on Launchpad, or if you're using Ubuntu, you can add the project's PPA to your apt sources. By adding the PPA, you'll get automatic updates from the Caffeine developers.
Add the Caffeine PPA
To add the Caffeine PPA to your apt sources, open a terminal window and enter the following command:
When I ran that command I got an error message regarding the signature key. This was because keyserver.ubuntu.com was down at the time. Luckily, I found a solution to this on WebUpd8. I just had to enter the following to get the proper signing key added to my system.
Once you have the PPA added, you need to update the system's package list and then you can install Caffeine.
sudo apt-get install caffeine
Running Caffeine
Now that Caffeine is installed on your system, you can start it from the standard Ubuntu menu at Applications→Accessories→Caffeine. When you start Caffeine, it will place a small, empty, coffee cup into your system tray.
Simply click on the coffee cup to activate it. The coffee cup will appear full to let you know that Caffeine is activated.
You can also set some preferences for Caffeine by right clicking the coffee cup icon and selecting Preferences. One item you may be interested in setting is "Activate for Flash video". With this item turned on, Caffeine will automatically activate itself when the system detects that you are viewing a Flash video and will automatically deactivate once you browse to a non-Flash page.
Give it a try. You can now watch YouTube and Hulu without worrying about shaking you mouse every few minutes.
#
This was totally awesome for me. I have a notebook and the screen dims every 10 seconds of inactivity and then brightens again when I scroll lines reading .pdf documents. In the preferences I added evince.
(I actually wasn't sure what I needed, so I opened a document, and the process appeared at the top of the currently running processes list, then I closed it and that process moved to the recent processes list. That's the one I picked.)
Once I did that I can read pdf documents on battery without the screen blinking at me!