Thursday, April 18, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 5259  / 2 Years ago, sun, february 6, 2022, 7:05:55

Is there any way to make Ubuntu 12.04 understand when it should suspend or not in terms of the software that is currently running?



For example, if I am installing something and it takes more than 10 minutes, which is the time limit for my PC to suspend, then I do not want my system to system to suspend till the installation of the program is finished. If my system is inactive I want it to suspend,but on the other hand if something is running I do not want to suspend.


More From » 12.04

 Answers
3

A relatively simple way to do it is by installing a program called caffeine. You'll need to add the repository then install it. For example, via the terminal.


sudo add-apt-repository ppa:caffeine-developers/ppa && sudo apt-get update && sudo apt-get install caffeine && sudo apt-get install gir1.2-appindicator3-0.1 gir1.2-notify-0.7

(N.B. you'll need gir1.2-appindicator3-0.1 and gir1.2-notify-0.7 at the moment due to a bug in defining its dependencies.)


Once you have it installed and running, it should create an entry in the menubar or panel. You can manually prevent suspension, or set caffeine to activate automatically based on what processes are running. In your case, you can whitelist the installation program, such as apt-get. (I'm not sure what that is specifically, since you didn't provide the details.)


enter image description here


N.B. I'm using Kubuntu, where it works well. It should also work in Unity.




Update


New versions of caffeine have been crippled, and much of this functionality has been removed.. I think the old version (2.5) still works, though, so you can try that.


[#35840] Monday, February 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fieldcheon

Total Points: 24
Total Questions: 105
Total Answers: 109

Location: Western Sahara
Member since Tue, Feb 16, 2021
3 Years ago
fieldcheon questions
Fri, Apr 1, 22, 05:58, 2 Years ago
Wed, Feb 2, 22, 03:31, 2 Years ago
Sat, Aug 14, 21, 01:24, 3 Years ago
;