Trusty: Caffeine doesn't appear in panel after update

23,074

Solution 1

The 2.7 release removes the user interface and manual operation. Caffeine is now fully automatic: When the active window is full screen, Caffeine inhibits desktop idleness.

This has been changed in version 2.8 (released January 15th, 2015), which has:

  • a caffeine program that works as v2.7: desktop idleness is prevented for full screen applications – fully automatic with no UI;
  • a caffeine-indicator program that works as v2.6 and earlier: an icon is shown in the panel that enables/disables desktop idleness;
  • a command caffeinate, that prevents desktop idleness for the duration of a command, e.g. caffeinate steam will prevent the screen saver while steam is running.

Solution 2

As this answer states, Caffeine 2.6 and up is fully automatic depending on if your window is fullscreen. The developers removed the manual toggle in the menu bar.

A new fork made by mildmojo called Caffeine Plus brings the manual toggle with the icon in the menu bar back. You can install it manually with the .deb file or via PPA:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install caffeine-plus

Solution 3

Fallback to version 2.6 by using another ppa for now. A request to enable the toggle functionality has been made.

sudo apt-get purge caffeine && sudo apt-get autoremove
sudo add-apt-repository --remove ppa:caffeine-developers/ppa
sudo add-apt-repository ppa:behda/ppa
sudo apt-get update && sudo apt-get install caffeine

If it does not work then try following solution.

  1. Install Caffeine from behda ppa. This will resolve dependencies and configure/installs icons, shortcuts...

  2. Get the source file:

    tar -xzvf caffeine_2.6.2.tar.gz -C /path/to/preferred/dir
    
  3. Test:

    cd /path/to/caffeine/dir
    ./bin/caffeine
    
  4. Change startup executable on /usr/share/applications/caffeine.desktop

Solution 4

As stated by @tomby, the GUI was removed in 2.7.

An option is download the 2.5 version here

Install the required packages:

sudo apt-get install gir1.2-gtk-2.0 libsqlite0 python-kaa-base python-kaa-metadata python-sqlite

Then install the .deb file:

sudo dpkg -i caffeine_2.5_all.deb

Solution 5

This bugged me too so I've written a new caffeine application from scratch:

Caffeine screenshot

Installation

First make sure to remove the other caffeine if you have installed it:

sudo apt-get remove caffeine --purge
sudo add-apt-repository --remove ppa:caffeine-developers/ppa
sudo add-apt-repository --remove ppa:behda/ppa

Now you can install:

sudo add-apt-repository ppa:kzar/caffeine
sudo apt-get update && sudo apt-get install caffeine
nohup caffeine &

Feedback + contributions welcome! https://github.com/kzar/caffeine

Share:
23,074

Related videos on Youtube

LuckyBearing
Author by

LuckyBearing

Updated on September 18, 2022

Comments

  • LuckyBearing
    LuckyBearing over 1 year

    There were a few ppa updates this morning, one of them was Caffeine. It was working fine initially, it does show up in the start up applications list but does not show up in the panel.

    I tried removing it and installing it but that didn't do anything. I also figured it could have been my theme and icons, so I set it all to default to no avail.

    I think it is Caffeine 2.7, not sure if I was on 2.6 or what. It was an official trusty ppa.

    Anyone getting this issue?

    I also noticed that Caffeine does function. I have my dim settings at 3 minutes, and when running a YT video in full screen it does not go to screen saver. And when left idle, it goes to screen saver.

  • LuckyBearing
    LuckyBearing almost 10 years
    Thanks for the info. Although it would be nice if there was manual operation. Sometimes disabling screen saver when I'm just looking at a webpage for a long time is helpful. So long as it still works.
  • user.dz
    user.dz almost 10 years
    Nice workaround, btw you can even check for player state (only while playing), See How do I stop xscreensaver during movies play?
  • Nate Totten
    Nate Totten almost 10 years
    "automatically enabled/disabled based on fullscreen activity only" That's unfortunate, because people often want the screensaver disabled even when not fullscreen.
  • Marco Massenzio
    Marco Massenzio over 9 years
    This seems to me the best suggestion, it worked flawlessly. Can't figure out why the developers went down that idiotic path, but so be it: it's their code, after all.
  • Marco Massenzio
    Marco Massenzio over 9 years
    FWIW, you could just check for the existence of a 'flag' (say, /tmp/lock.disable) and have two scripts that toggle its existence. This way, you can have a behavior similar to Caffeine (minus the handy icon/menu) and not just be limited to the couple of binaries you check for.
  • Rael Gugelmin Cunha
    Rael Gugelmin Cunha over 9 years
    I totally agree, @Marco. Version 2.5 was a great, simple and perfect idea. Basically, KISS.
  • cmc
    cmc over 9 years
    Fully automatic is really great!
  • king_julien
    king_julien about 9 years
    The guys behind this ppa are amazing! So many useful tools...
  • guttermonk
    guttermonk over 8 years
    Fully automatic Caffeine doesn't detect gamepad inputs. If this affects you, please visit bugs.launchpad.net/caffeine/+bug/1530544 & click "This bug affects you"