Tech Tip: Keep Your Monitor Awake with Caffeine


One of my favorite new apps is a little system tray app called caffeine (and here). It's simple, yet very practical, its purpose is to inhibit a screen saver or sleep mode, which is great while watching flash videos on sites like hulu.

Caffeine is written using GTK for the user interface, so it's very GNOME friendly, but it can be used on any Linux OS. It has a PPA for Ubuntu users (see the launchpad link) and it works great for me on Ubuntu Karmic.

caffeine.jpg11.31 KB


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


X3S's picture

Well I just use:
setterm -powersave off -blank 0
setterm-powersave-vierge 0 off

For permanent change Add to your ~/.Xinitrc file:

setterm -blank 0 -powersave off -powerdown 0
setterm-blank 0-powersave off-powerdown 0
xset s off
xset s off

Hope it helps.

What gnome/gtk versions does caffeine work with?

Alison Chaiken's picture

I've been RTFM'ing and can't find any information on what Gnome/GTK versions caffeine is compatible with. Here at work, I would like to run caffeine on RHEL5, which means gtk-2.0. Is gtk-2.0 too old? What will happen if I just send a sig to gnome-screensaver to kill it anyway? Won't that prevent screen blanking?

Regarding Caffeine

Tommy Brunn's picture

I'm one of the developers of Caffeine (though to be honest, I haven't had much to do with the last release), and I thought I'd give my input on this. Caffeine should be compatible with most relatively new versions of GTK, as it doesn't really use it for anything fancy. It simply acts as an intermediary between the user and whatever screensaver/power management daemon that is currently running. Therefore you can use it regardless of what desktop environment you are running (though you might need some sort of system tray if you want to use the graphical applet), as long as you're using either gnome-screensaver, xscreensaver, whatever the name of the KDE screensaver is (like I said, it's been a while since I was involved in the development of this app), or just using plain DPMS.

Just what I needed!

Serrano's picture

Thank you for sharing this small but very useful tool with us. Finally I can watch a movie without having to go all the way to the screensaver and power settings to inhibit the screensaver and sleep mode. Wish I had found this neat little tool earlier.. would have saved me a lot of frustration :P

Kevin Costner's picture This talk will show off the tool set, and how the tools can be used to fill a variety of needs for the hobbyist, the administrator, or the FOSS advocate.

well i was looking for a app

stock's picture

well i was looking for a app which detects the non functioning of computer and switch off the monitor automatically just like hibernate


Treah 's picture

Pointless application. Is it really that hard to turn off your screen saver and power settings? In xscreensaver its right there in the drop down Kill daemon.

@Zivago, what are you

Kyle F's picture

@Zivago, what are you running? On my Karmic system with Gnome and Adobe Flash, it works fine for hulu.

hulu and a few other streaming sites..

Zivago Lee's picture

FYI.. with Hulu it doesn't work... yet. I've been speaking to the developer about a possible fix and hopefully he can take a look to see if it can be done or not :)