October 21, 2009

Caffeine 1.0 Released!

Filed under: Uncategorized — bnsmith @ 8:04 am

It’s official. The “Caffeine for Linux” project has reached 1.0! Only a few short months ago, I was hacking away in secret on the initial 0.1 release of a clone of the original Caffeine for Mac. I had no idea if anyone would be interested in contributing to it, or even using it. I’m very pleased to say that the response has been terrific, and far beyond even my most optimistic predictions. I’m very glad that I took this project on, in part because I now have a version of Caffeine for my Linux box. But the best thing about this project has been having the opportunity to work with such incredibly talented and knowledgeable developers. I have learned so much, and I owe it all to you. Tommy and Isaiah, you’re the best!

But I think that I’ve spent quite long enough waxing nostalgic about the events of the last six months. Moving along…

What is “Caffeine for Linux”?

Caffeine keeps your computer awake! It’s a little coffee-cup applet that sits in the notification area:


When you click on it, the coffee-cup fills up and keeps your computer from going to sleep:


It also inhibits the screensaver.

Why is this Important?

Imagine that you’re giving a presentation. The room is illuminated only by the blue glow of the projector, displaying your slides on the screen behind you. You linger on a particularly crucial slide, carefully explaining the subtleties to your mesmerized audience. Several minutes pass, and just as you are about deliver the stunning conclusion, the projector goes dark, displaying only a tiny “No Signal” message in the bottom corner.

I expect that everyone reading this has seen some presentation or other where the display powered off or the screensaver came on halfway through. Don’t let this happen to you!

But That’s Not All!

There are a depressingly large number of fullscreen games available on Linux that don’t properly inhibit the screensaver. With Caffeine, you can fix this problem quite easily; no scripting required. It’s also handy for watching long flash videos without having to tap the Shift key every few minutes. In fact, the new 1.0 auto-activation features make these two things even easier than before.

There are three types of auto-activation that can be configured in the preferences:


You can configure Caffeine to automatically start preventing the screensaver and powersaving whenever a particular program is running. To set this up, just run the program that should inhibit the screensaver, right-click on the Caffeine applet, select “Preferences”, and then click “Add”. You should see a list of all running processes in the pop-up window. Click the name of the program that you started earlier and click “Add”. Close the preferences window. In about 30 seconds, you should see the coffee-cup applet spontaneously fill up.

If you want to set this up for a fullscreen application, just run the application, wait a minute or so and then quit. When you go into the Caffeine preferences to add a new auto-activation program, your fullscreen application should be listed under the “Recent Processes” tab.

Caffeine can also automatically prevent the screensaver and sleep mode when a flash video is playing in Firefox. This works for many popular flash video websites, most notably Unfortunately, there are also some websites for which this won’t work, like (a workaround for this issue is available; see Isaiah’s post for details).

Finally, Caffeine can be configured to auto-activate whenever you play Quake Live, a version of Quake III that you can play for free right in your web browser.

Hopefully, these features will allow you to deal with any powersaving inhibition issues that you encounter on your Linux box. Once you get Caffeine configured, you should never have to think about it again.

Caffeine is also available in several new languages. In some cases, the translations are not totally complete, but are enough for typical day-to-day use.

Installation Instructions

At the moment, the easiest way to install Caffeine is through the project’s PPA. Just copy and paste the following three commands into a terminal:

sudo bash -c "echo 'deb jaunty main' >> /etc/apt/sources.list"
sudo apt-key adv --keyserver --recv-keys 569113AE
sudo apt-get update && sudo apt-get install caffeine

However, we do hope to get Caffeine 1.0 into the official repositories in the near future.

Where Do We Go From Here?

Caffeine 1.0 now has all of the features that I originally envisioned, and plenty more features on top of that. Still, now that 1.0 is here, I can see now that there is still room for improvement. The major task for the 2.0 release of Caffeine will be to make it easier to configure. We hope to do this through an online database of programs that have difficulty inhibiting powersaving on Linux. Our goal is to implement the capability for Caffeine to regularly download the online database of problematic programs, if the user explicitly enables it. There are some details that still need to be worked out, such as how to prevent a hostile individual from adding well-behaved programs to the database and thus draining people’s batteries unnecessarily. However, if we do manage to figure these things out, then it could become possible to fix all “powersaving-challenged” programs by simply installing Caffeine and enabling the database download feature.


I guess that’s it. If you have any ideas for new features, please post a comment or write a blueprint the project page. If you discover a bug, you can report it here. Finally, I’d like to say thanks to all the people who have contributed to Caffeine for Linux. Your hard work is helping to eliminate a major source of headaches for Linux users, and thus helping to push the whole Linux desktop experience forward.


Create a free website or blog at