Some applications do not keep the screen on and the screensaver (or suspend) kicks in. (Video players such as mpv come to mind). In this case the little wrapper app “coffeine” comes in handy (source). Download the latest .deb file and install it with
sudo dpkg -i ./coffeine*.deb
Use it just by prepending it to the application you want to execute, e.g.
coffeine apt dist-upgrade
and the screen will stay on while you upgrade your system and won’t suspend in between.
UPDATE: Disclaiimer, it was written my me, so this is a shameless self-plug.
There are many situations beyond system upgrades, e.g. watching a video with mpv where this is useful. Besides, I am not sure that mobian or PureOS prevent the sytem from suspending while apt runs.
Is there somewhere upstream that you can put in a pull request so that this can be incorporated in core system functionality? Perhaps some interpreter/wrapper/coreutils project in PureOS?
I would hope this functionality makes it’s way into Phosh eventually so this tool isn’t needed, but this is good to have for now and I was happy to read through the code and see how this sort of this is handled. Thanks!
To be honest, the support for that IS in phosh, that is why I can make use of it so easily. And apps that request a disabled screensaver will get it. My tool is just a hack for those programs that have no support for this built in, such as the mpv video player. Ideally, these apps should simply request the Inhibitor themselves.
if i’m not mistaken Transmission uses the C language for it’s code … maybe you could adapt yours to NOT be just “a hack for those programs that have no support for this built in”
nevertheless i’m probably going to use this at some point or the other … much appreciated
Keeping the screen on is in the power setting as is other related settings for it. So you have a proper gui option for setting how long it takes for it to turn off the screen from inactivity, one of it’s options is never. the setting is called “blank screen” in the power settings.
Edit: Auto Suspend is also there, but it’s off by default, sorry for the edit, i did not notice till just now.
yes but that is a setting that once activated is applied with NO EXCEPTIONS. perhaps the OP was looking for a way to KEEP that setting ON while ALSO being able to enforce an exception … i know that’s what the Transmission GUI setting does (it’s an exception)
Err, I DO NOT WANT to disable the sreen saver per se and modify the overall suspend policy. I do not want it to engage WHILE A SPECIFIC PROGRAM is running, like the movie player mpv. After the movie has ended, the screen should blank again as set in the settings section.
I saw no settings allowing for a white and or black list to allow you to have a different setting for when marked applications are active. I’m sorry for the misunderstanding, someone pointed me to this for it in general.
Yknow, there’s a gnome extension called caffeine that does something similar. You have to manually turn it on and off, though. If you could add your functionality to it such that it has a whitelist and/or blacklist, it would be pretty awesome.
hold on … isn’t there a config file to ‘white-list’ a couple of programs that when running should modify the default power-options behavior ? screen-blanking, suspend, etc. ?