I use Caffeine a lot - often for non-full screen apps. Here's an example of how I use it:

First, some background - I'm deaf and I go to university. I follow the lecture by using remote captioning where live text is presented to me via a web page while a Skype call is running in background to pick up the dialogue.

The browser is open as a window and I have Evernote open as well. My display-off is set to 5 minutes as it's a laptop. During a lecture I'm mainly just reading and following the lecture. Caffeine in this case is just perfect as I can toggle it on during the lecture and toggle it off after it's done. Nothing is set as full screen so the app in this case would be worse than previous versions.

In fact I would like to request an option to set a time period for this (I use Caffeine on OSX, no idea if they are related but it have a timeout feature which I set to 1 hour during an lecture, no need to remember to toggle it off).

I had a system set up to suspend when inactive. I was using caffeine to inhibit this behavior as well. For example if a backup was running, a long upgrade job was running or if I wanted to access the minidlna server from my blueray player.

This app used to have alot more capabilities than preventing the screensaver when a video app was running full screen.

Please restore the prior behavior. Manual toggle and the ability to inhibit screen saver/suspend when certain named processes were running were killer features.

I'm sorry, having worked hard to streamline Caffeine's operation so that it doesn't need a user interface, I'm not going to go back to adding one, let alone preferences.

Caffeine, as it is now, adds a behaviour that systems should have anyway. For more complicated uses (and users!) there are various options:

1. For windowed video playback, players such as VLC and mplayer already support disabling the screensaver/inhibiting power off.

2. For other uses (e.g. a long-running batch job), if you're leaving your computer unattended, full-screen the top window before you go. (This may not really be what you want, as it will keep the screen on as well as preventing suspend, but Caffeine doesn't try to control power saving and screen saver separately in any case.)

My design philosophy is that computers should, as far as possible, Do The Right Thing, and that most "preferences" are a burden imposed on the user by the developer. I used to use Caffeine's manual switch, but I'm now very happy that it doesn't exist, and my computer has a simple model of idleness/screensaver inhibition: in windowed mode, it works like a computer (suspends/screen saves when I don't use it for a while), and in full-screen mode it works like a television (carries on regardless of whether it's being used). Try adjusting your mental model: you may enjoy the simplicity.

For those who still aren't satisfied, I'm sorry, you'll need to consider another option. GNOME users may be interested in this simple desktop extension (also called Caffeine):

So, here's my case. I run MythTV. When it records a TV program, it has no user interface. It runs in the background, and after it's finished recording, it runs a task called MYTHCOMMFLAG that removes commercials. When that job finishes, then it's ok for the system to sleep again.

In Caffiene 2.5, it allowed me to set prefs to watch for MYTHCOMMFLAG, and do the right thing.

I also used it to monitor others apps, like VLC, so that if I was watching a video, not in full screen, the system wouldn't sleep in the middle of playback.

So... credit to you for your hard work... I'd recommend scrapping versions 2.6+, and just maintaining version 2.5.

This developer has been persuaded he's wrong on many occasions, but this isn't so far one of them. If I were in favour of damning users I wouldn't bother releasing my work publically, or at least I wouldn't bother commenting on bug reports I disagreed with.

I understand that there are genuine use cases for the old features; I'm not convinced that they're worth maintaining in terms of UI complexity, code complexity, power consumption &c.

VLC will happily disable the screen saver on playback of any sort, as I've already pointed out, so you're OK there.

For background jobs (MythTV commercial removal as you mentioned; backup and system update as others have mentioned) I don't think Caffeine was ever the right tool: batch jobs should use batch commands, and all those use cases want to prevent sleep/hibernation, but not the screensaver. It sounds like what's needed here is a wrapper command:

stay-awake COMMAND ARGUMENT...

which runs COMMAND with sleep inhibited. If you don't mind the screen saver being inhibited too, I believe such a command can be constructed with xdg-screensaver. One thing I will shortly be working on is patching xdg-screensaver to support the DBus API that Caffeine uses, so that Caffeine itself can simply use xdg-screensaver; this will restore compatibility with a lot more desktop environments too (see bug #1266953). That would also enable a command to be written that would I think better serve background uses.

I am working in a company that has strict rules on screensaves. That means: if I walk to lunch and the screen saver doesnt pop up; that could mean big trouble. On the other hand; I like to switch Adobe Reader or browsers to full screen; just because then reading big documents is easier for me.

Now I have to remember I have to turn off full screen every time I leave my system; because the now useless caffeine would prevent the screen saver to kick in.

And in contrast to that; I am very often sharing my screen for code reviews - then I used caffeine to prevent the screensaver.
Now I would have to remember to put some application in full screen (afaik my eclipse that I am sharing doesnt have a full screen mode).

Long story short: yes, this is open source, and I am just a user; and you are the person spending your time on it. But you just lost a good portion of your user base. And in my eyes: for absolutely no reason.

Maybe the most important question is now: where could one find a .deb of the older version that came without this "feature"?!
Because those are the choices left for me:
a) throw out caffeine
b) install an older version and pin that

Caffeine is no longer an app, it just adds a behaviour to the system of preventing idleness when the focussed window is full screen. This is good when you're paying attention to the machine (e.g. reading a document, writing with long pauses, watching an unfolding cellular automaton) without touching it often enough to prevent idle behaviour.

It's now much less intrusive either visually or, more important, mentally on the user. The old interface was an unnecessary burden. That's often what happens when you try to extend an app to many different use cases, and exemplifies why apps, with their modes and preferences, are a bad idea in the first place.

I understand this won't suit everyone. In comment #8 I mentioned a GNOME extension that gives a simple manual override, and outlined a better approach to preventing idleness for long-running noninteractive programs.

I understand your point of view about simplicity. I always look for that when coding. But you can't ask users to behave like you think it's right. Just trying to make a positive comment here. Please, don't be offended. People will find It much easier to ditch an app than to change the way they behave.

But i think we can find a middle ground. You could make your app have a simple switch, without any GUI, without changing the default behavior. Then, the community can work on an GUI (app indicator and so on). I think it's win-win situation. Simplicity and nobody has to reinvent the wheel.

Info:
For users that want to fallback to version 2.6.2. It can be done by using another ppa.

I agree that we disagree; but I really can't understand your arguments.

If a little "coffee cup" icon is a distracting problem; gosh, what about the 15 other things I have up there
(I went the extra mile to install a patched untiy, that brings back the system tray - just because my company has several
applications that only show up there). I am tempted to say: if a little coffee cup icon is so distracting; what exactly is the
point of using an electronic device in the first place? To me, caffeine was much less "intrusive" than having the
control panels around and remember to toggle settings in there.

Alas, I threw out caffeine 2.7; and locked the older version that gives me what I need.
Now I simply hope that somebody else comes up and fills that hole that caffeine2.7 created for me before some other change somewhere might prevent my caffeine2.5 from working on my 14.04.

Reuben, my use case was to enable Caffeine after booting a system and leave it enabled over many screen-sleep and suspend/wake cycles. I never had to fiddle with it again until reboot, significantly simplifying the disablement of the desktop environment's session lock when I didn't need it. However, if I knew I was going to be away from the computer for an extended period of time and wanted it to lock when going to screensaver, I would disable Caffeine and leave. I rinsed and repeated for a couple years.

It was a very convenient experience and I grew to depend on Caffeine. I certainly understand that for your purposes and that of other users who use it only for purposes like media consumption, the newly streamlined interaction with Caffeine is preferable. I'm not certain what the correct etiquette is in this case. Is it reasonable for me to expect you to tailor Caffeine for uses outside your own?

I don't think there needs to be any emotion around this development. As you say, if someone wants a different experience with the software, they can fork it. Perhaps this'll be the impetus to trigger someone else to learn how to do that.

If you see fit to restore the function that allowed me to use Caffeine in this way, I would certainly appreciate it. This is another area I'm not clear on, again since you're doing all the work. Is a bounty in order?

@zieher (comment #16): I've not deleted any uploaded debs. However, I believe some versions were not uploaded correctly, owing to key-signing problems I was having, and are hence represented by 2.6+REV development debs instead.

@bobodod (comment #18): I don't use Caffeine just for watching films, etc., and I've not tried to make it suitable only for what I want to do. Rather, I tried to make it as simple as possible for as many users as possible.

I'm going to guess that I have erred in one particular: namely, many current Caffeine users are precisely those who like to tweak their computers' behaviour in the first place, whereas the audience I had in mind was users who prefer their computer to just work sensibly without configuration. As I simplified the design, I had to retrain myself in my own use: I was using the manual override up until I removed it; since I removed it I've not needed it.

I certainly wouldn't be interested in a bounty to reintroduce the user interface, since I think Caffeine's better without it; perhaps another developer would be interested in a bounty for a fork? The current code of Caffeine is about 40 lines of Python; even at its most feature-rich, it was only about 400, which is not a lot to learn one's way around.

(By the way, I think emotion very much does come into development, but it should be "ad rem" (in my case, the aesthetic sense guiding my design choices, since I can't claim any empirical basis for them, other than the most general principles of UX design), and not "ad hominem"; thanks to everyone for keeping the discussion civilized.)

I respect the decision of the dev although I think this is a very very bad idea. Why make a software that works well then cripple it ???
I hope someone will fork it because manual toggle is almost as important as auto detection...

The whole point of Caffeine was to quickly enable or disable the screensaver without changing any of Desktop Environment's settings.

My use case involves Unity and Caffeine. Ubuntu Unity currently doesn't have a screensave feature, but it turns of the screen entirely. This unfortunately makes my secondary HDMI screen onto power saving, which also turns off the sound. I used caffeine to disable screen shutdown to be able to listen to music. The concept of full-screening a music app is inexistant.

The feature provided by Caffeine 2.7 is what should've been merged into each and every Desktop Environment instead of being provided by a separate widget.

@Zisu, that is indeed an unfortunate behaviour of HDMI. I use GMPC to play music, which has a full-screen mode. There's a fullscreen plugin for Rhythmbox. Various other players do too. I sympathise if your favourite does not.

I agree that Caffeine 2.7's functionality should be part of every desktop environment; I'm working towards that!

If original Caffeine was 400 lines of Python code and yours is 40 lines then why didn't you fork it ? That way users who already had caffeine installed through it's PPA wouldn't have lost the features that you stripped off! I appreciate that you worked so hard on it and take pride in your work but that doesn't mean that you can impose it on all the users.

You said that you made those changes assuming that most people don't like to play with preferences, do you really think that a simple toggle switch is that much of a burden ? Even the least tech-savvy person understands the use of an ON/OFF switch. With your changes people will have to go fullscreen with whatever app they are using to disable the screensaver.

Your solution solves one problem but brings in a lot of problems which Caffeine had already fixed in the first place !

Seriously, so annoyed with this change.

"I'm sorry, having worked hard to streamline Caffeine's operation so that it doesn't need a user interface, I'm not going to go back to adding one, let alone preferences."

So you jumped in to manage a great application and then decided that it needs some new features and followed a 'no interface philosophy' and then stripped off everything and then when users everywhere begged for the features your only suggestion is to fork it to fix it ? I understand and appreciate the concept of simplicity but you broke something that was already working for everyone, including people who hardly understand technology (I have introduced a lot of people to this nifty little application who loved it).

Just because you spent a lot of time on a particular idea following a particular philosophy doesn't mean that you have covered every possible scenario and use case of this application. You have rendered it useless in almost every-way for me and for several other users that I know.

- I used to set up caffeine to not engage whenever apt-get was running something so I could complete updates before letting my machine go to sleep - there's no way to do this now. Full screen doesn't help when I walk away in the middle of something.

- Encoding video takes forever, so I would set up caffeine to disable sleep as long as the encode was going. I could walk away from my computer and know that it would go to sleep when it was done. Now I don't have that option

- I have multiple monitors, I basically NEVER EVER have anything full screen. So now the system goes to sleep on me no matter what it is doing

I just don't understand this decision. I completely agree that the computer should do the right thing always automatically, but it doesn't. That's why we had Caffeine in the first place. If you want to improve the Ubuntu user experience so that it always 'does the right thing' then join the Ubuntu UI development team, don't break the tools that we had.

Thanks very much everyone for making me continue to think hard about how to please everyone. I think I now have a plan, namely to add to the current caffeine "service" an indicator, caffeine-indicator, that gives simply a manual toggle, and a command-line program, caffeinated, that allows one to wrap a command, e.g.:

Reuben, I think the important thing to keep in mind when making large changes like this, is that you cannot assume your userbase to be of one type of person. You can't even assume *most* of your userbase to be of a certain type of person. Instead, you have to perform 'market research', so to speak. Post on forums, social media, whatever, and ask those who use your program how they use it and what they would think of such changes.

If the reaction is overwhelmingly positive, great! Perform the changes, and see if the vocal minority speaks up after you 'break it', and then you can calmly refer to where you asked for feedback before committing the changes and found most people clearly wanted it to be the new way. However, if you get mostly *negative* feedback, then you were clearly wrong about the way most of your users used the application, and you should re-think your strategy.

I think it's great news that you're re-thinking your decision, but I also feel it'd be interesting to get a less biased set of opinions elsewhere. This bug report thread is going to be seen mostly only by people who are complaining about the change to begin with; it'd be nice to see a good balance of opinions from both those who enjoy and don't enjoy the changes.

@Tynach This is a tiny hobby project; I don't have time to spend on market research. I think I've come up with a way to slice up the old functionality of Caffeine to satisfy both tinkerers (who complained when I removed it) and what I suspect is the vast majority of users who want stuff that just works, and probably weren't using Caffeine in the first place, but to whom I can hopefully bring the new service-only version, if I can get it installed by default. Most of them, and many tinkerers, won't ever give feedback, because they won't see it as their job, so I'm not even convinced it's worth looking for unless one's running an operation that can afford to canvass opinion on a large scale, either explicitly (market research) or implicitly (A/B testing etc.). I'm neither, in this case.

With so much negative feedback about the various changes, my suggestion (and this is my 2nd feedback) is to retire versions 2.6.x and 2.7.x, remove them from downloads, fix any outstanding bugs in 2.5.x, and then just put it into maintenance mode.

The feedback is clear, users wanted/needed the features in 2.5.x, and didn't agree with the philosophy in 2.6.x and 2.7.x.

@Reuben, I think you accurately assessed the situation in post #20. In reality, what you've done is take a program that used to do something, and made it do something else. In its current state, it's very well-designed, and can be very helpful--just not for those of us who have come to rely on it for what it used to (and will no longer) do.

At the end of the day, though, you are to be commended for putting the time and energy into this hobby project of yours for the sake of others. There is definitely a lot of value in getting a system into working-like-it-probably-should condition for the swathes of non-tinkerers who use (or should use) Linux. Your idea was a good one, though perhaps not executed in the best way. Thank you for reconsidering. And thank you for not getting too discouraged at the barrage of complaints that resulted from your hard work.

I appreciate the efforts to streamline Caffeine in versions 2.6 and 2.7. However, my feeling is that these more recent versions aren't much related to the Caffeine that I've grown to know and love.

In my view, Caffeine pretty much reached its pinnacle at version 2.5. So I agree with post #35 by heynnema, namely that version 2.5 should enter a "maintenance mode" to ensure that it continues to work in future Ubuntu series . (Fortunately, version 2.5 still installs and works well, at least for me, in Ubuntu 14.04 and 14.10.)

How about maintaining version 2.5 in "maintenance mode" (as suggested by heynnema) and forking the more recent version as something like "Caffeine Lite" or similar?

The main reason for this comment is the following sentence in post #25:

"I agree that Caffeine 2.7's functionality should be part of every desktop environment; I'm working towards that!"

I don't agree with that. I simply don't see a reason why the screensaver should be disabled in fullscreen mode? And why should it be enabled when not in fullscreen mode? E.g. when working on my netbook I use fullscreen mode as much as possible due to the limited screen size. But the screensaver should be enabled then. On the other hand, when watching videos on my desktop computer, I don't always watch them fullscreen, but the screensaver should then be disabled. So for me it depends on the programs that are running, if the screensaver should be enabled or disabled. Caffeine 2.5 works perfectly for me. I am glad that it works still for Ubuntu 14.04.

Maybe there are other users who are happy with the current caffeine functionality. But please don't make this part of every desktop environment. At least such functionality should always be optional and disabled by default.

Thanks for your advice of using the GNOME desktop extension "Caffeine" - this maybe useful when working with the GNOME desktop.

There are several use cases where caffeine worked well for me as it was, with preferences and a toggle switch.

The first major case: it created a hands off way to suppress the screen saver/sleep function by simply putting the system on caffeine when certain processes were running, such as an update, a media trans-code, any sort of batch processing, etc. Once these processes were complete, caffeine would go to sleep, and normal functioning would resume. This was the main reason I used this app. Having the elegance and simplicity of a preferences UI to set this in was very nice.

The second major use case is related to the first, and fairly simple: when I walk away from my machine for a minute, and get caught up doing other tasks, my screen goes dark. This sounds like a regular phenomena, and so not a big issue, except that, running sound through my hdmi port, when the screen goes dark, the sound dies out. Now, every time I walk away from the computer, I have to full screen my sound player just to keep the sound running? Removing the aforementioned preference gets in the way, and adds steps to me using the system in a normal way. With the preferences, it allowed my system to get out of the way, it filled a gap.

The third case is the toggle, for those times when you just need to toggle that off.

Changing caffeine to ONLY work when something goes full screen completely changes what caffeine IS, imho. I appreciate the full screen option, but you took away every other feature for the one single feature that you prefer. You killed an app.

Gizmochicken, in comment #39, makes a wonderful suggestion. Re-branding the work that you have done as "Caffeine Lite" or something similar, seems appropriate, as you essentially forked Caffeine. It does not take market research to realize that users use an app for the features that it has, and to strip those features is to kill the app. Re-branding, and bringing back 2.5 as Caffeine proper, would be appropriate, IMO.

Thank you for the work that you do, please return the simplicity of the features as they were.

@Reuben
If you could realize what you suggested in Comment #31, namely adding the caffeinated and the caffeine-indicator programs, that would be great. Especially the caffeinated program is exactly what I need!
Thank you very much for considering users outside your own use case!

Reuben Thomas wrote: "I should say that unfortunately I will probably not have time to do this in the next couple of months as I have extra work."

@Reuben: If you don't currently have sufficient time to develop this application, I again suggest that you bring back Caffeine v2.5 as the true "Caffeine" (downloadable as "caffeine" from this ppa) for current and future releases of Ubuntu. You can rebrand your version as "Caffeine Lite" (or something similar) and develop it in your free time at whatever pace fits your schedule. I hope that you will make your verstion available for download (as "caffeinelite" or similar) from this ppa.

It totally sucks not having the option to manually toggle screensaver off. I am stuck now with caffeine. The new 'automatic' feature basically breaks it for me. I mostly just use it manually. Too bad... the app is now half as good as before (maybe less).

If you want to inhibits the screensaver why you hide the options. In this case, is more confortable, disable the screensaver and you don't need this aplication to do it. Then the computer do, what you want.

Why I said that, because This aplication doesn't work with all programs and website like youtube (flashplayer) doesn't work, sorry but it's true (Fullscreen, jeje flashplayer said). And the indicator indicate, if caffeine is working or not. Now you must suppose it and if caffeine doesn't work, you must disable the screensaver. Well done, make a usefull program a headache.

For anyone else that just wants a simple icon to toggle screen sleeping on or off I've created my own Caffeine application https://github.com/kzar/caffeine . Accepting pull requests + any feedback. Cheers, Dave.

I've already indicated what I consider a well-designed way ahead in comment #31. I am now working towards that. I would be very happy if anyone wanted to help; so far all the code that's been offered goes back to previous designs.

For those waiting for this fix to be released: as it relies on unreleased fixes to xdg-screensaver, I still need to add those to the package (I think that's a simpler and more reliable solution than making a special xdg-utils package). I will do that ASAP so I can make a 2.8 release of Caffeine.

Is there a way to whitelist / blacklist applications? For example: I have a game that runs in windowed mode but whenever I play that I don't want my screensaver to kick in. It would be nice if I could mark that application so caffeine is active.