Siduction Forum > Experimental

[EN] nosuspend - avoid computer suspend as long a app is running

(1/2) > >>

brummer:
I've set my box to blank screen after 5min idle, and suspend after 10min.
This works well for me, so when leaving my PC alone, I could be assured that it switch itself into suspend to save some energy.

Just sometimes, I like to hear some music, or hang out in a IRC channel, or doing a take long time compile, then, I don't wont that my PC goes into suspend mode, even when I leave it alone for some time.

True, I could switch suspend on/off in the energy settings, but I found it unpractical.
So I wrote a little tool to avoid suspend or shutdown on privileged level (e.g. root) when a running user process shouldn't be interrupted. It's nosuspend.

Usage nosuspend, simply run before another command as in: nosuspend appname -parameter for appname
Full bash completion is supported for easy command substitution.
nosuspend use a PolKit rule allowing active users to set the systemd-inhibit flag with UID 0/root priority and avoid this way that the PC could suspend or shutdown during the given app is running .

It has a "secure" mode, where you must enter the root password in order to run it, and a "relaxed" mode, which ain't require password. The mode needs to be selected during compile time.

Maybe it is of some use for the one or the other here, you can get it here:
https://github.com/brummer10/nosuspend



regards

devil:
Hi,


nützliches Tool. Ich hab es mal beim Linux User zur Kurzvorstellung eingereicht.



brummer:
Hi Devil

Thanks.  :)

I'm glade you find it useful.

David:
the real question: why do you need a tool to switch off sleep mode in the first place


why isnt there a button for that in a menu somewhere, or a line in a config file

brummer:

--- Quote from: David on 2019/02/28, 02:10:37 ---the real question: why do you need a tool to switch off sleep mode in the first place


why isnt there a button for that in a menu somewhere, or a line in a config file

--- End quote ---
You could en/disable suspend in the energy settings.
nosuspend is for those who usually prefer the terminal to do stuff, instead clicking around in a menu and a GUI. 

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by Advanced Topic Prefix Pro
Powered by SMFPacks WYSIWYG Editor