
Originally Posted by
memilanuk
Okay, I'm having similar problems - updated from Ubuntu 13.10 to Xubuntu 14.04 and caffeine stopped working
What I'm seeing is that you went thru a bunch of different PPAs for caffeine and/or screensavers, and ended up back at the original caffeine-developers ppa, and now it magically works? Or am I missing something here?
SUMMARY:
Firstly, what I believe the problem is - based on comments here - is that Caffeine has had a lot of code removed to simplify it but it turns out not everything plays by the freedesktop specs. So it doesn't work! There's a patch to xdg-screensaver in the pipeline, but that doesn't appear to be on Ubuntu 14.04 yet, however, using Jeffery To's Faux-Screensaver, this problem can be "worked around".
THINGS THAT MIGHT BE IMPORTANT:
For my testing, I'm doing a fresh install - not an upgrade. For your upgrade, I'd guess you were previously running Caffeine from the normal Caffeine PPA (ppa:caffeine-developers/ppa), and I'd also guess that the Ubuntu installer will have disabled that PPA during upgrade. I might be wrong about this though!
I'm also guessing you already had xscreensaver installed. And probably you had already removed the gnome-screensaver package... but it's possible that the Ubuntu upgrade will have reinstalled this.
So your circumstances are a little different to mine!
WHAT TO DO:
Probably worth removing and reinstalling a few bits to make sure we're in the right place:
Code:
sudo apt-get purge caffeine
sudo apt-get autoremove
Next, go to System Settings -> Brightness and Lock, and change Turn screen off when inactive to Never
Code:
sudo apt-get purge gnome-screensaver
sudo apt-get install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
You might now like to search for "screensaver" in the Applications lens of dash and set what xscreen savers you want and the timeout you'd like... but I think the default is something sensible like 10 minutes.
If you have a Caffeine related PPA active that isn't the "official" one: ppa:caffeine-developers/ppa, then you should remove it, e.g. if you were using Paulius Vitkus's PPA, then remove it using:
Code:
sudo add-apt-repository --remove ppa:behda/ppa
sudo apt-get update
And next, if the official Caffeine PPA is not active, re add it:
Code:
sudo add-apt-repository ppa:caffeine-developers/ppa
sudo apt-get update
And now we re-install Caffeine:
Code:
sudo apt-get install caffeine
And at this point, things should work... but they don't, and I believe that's because we're waiting for an updated xdg-screensaver. So to get around this problem, we use Jeffery To's code:
Code:
mkdir -p /tmp/fauxgs && cd /tmp/fauxgs
wget -O- https://github.com/jefferyto/faux-gnome-screensaver/archive/master.tar.gz | tar -xpzf -
sudo cp faux-gnome-screensaver-master/faux-gnome-screensaver*.py /usr/local/bin/
cd /usr/local/bin/
sudo ln -s faux-gnome-screensaver.py gnome-screensaver
sudo ln -s faux-gnome-screensaver-command.py gnome-screensaver-command
Open Startup Applications (gnome-session-properties) and click Add and enter:
Name: Faux Screensaver
Command: gnome-screensaver
Comment: Makes xscreensaver and caffeine play nicely.
NOTE: If you've already got an xscreensaver startup-application entry, you can remove it (or just uncheck it) because the faux-screen-saver will start xscreensaver itself.
And that should do it! One slight-snag that I've noticed is that sometimes instead of a screen saver, the monitor switches off. I could be wrong, but I suspect this happens every other time the screen saver should start... I'm still playing with that one. But the main thing (for me anyway) is being able to disable the screensaver when watching videos. I've not had much chance to test it yet though, but it did seem to automatically inhibit the screensaver when watching flash video through Firefox... dunno if Caffeine is detecting flash and/or full screen activity but whatever, it did stop the screensaver without me even needing to toggle the indicator icon.
Hope this works for you... 'cos I haven't got any other ideas!!
Bookmarks