GNOME Bugzilla – Bug 687404
Add inhibition command-line helper
Last modified: 2012-11-07 13:11:32 UTC
Created attachment 227867 [details] [review] patch People are complaining that their 3rd party media players don't keep the screen lock away, see e.g. bug 687391. Allowing a value of 'never' here would help these people out.
Review of attachment 227867 [details] [review]: As discussed on IRC, the never option was not something we wanted to offer users, as it would probably cause loads of problems. Instead, a solution for developers not to have to rely on a broken xdg-screensaver, or D-Bus would be best. Matthias mentioned a gnome-inhibit wrapper. See also: http://trac.videolan.org/vlc/ticket/4739
Really not sure what the API should be, the one from systemd-inhibit is a bit too coarse for desktop applications.
Can you be more specific as to 'probably cause loads of problems' ? If setting idle-delay to MAX_INT will cause loads of problems, shouldn't we restrict the range of allowed values ? Basically, I don't buy it...
Wants to use VLC, increases the value, forgets, thus invalidating any work we might have done to try and make the system more secure (lock comes up after idle) and less power-hungry (screens power-save after idle). I'm sure there's other good reasons.
Created attachment 227957 [details] [review] patch
Review of attachment 227957 [details] [review]: I would also make it possible for such applications to run gnome-session-inhibit when they need the session inhibited, and kill it when done. Basically, waiting forever instead of waiting for the child to die.
How about I commit this, and you write the followup patch to do that ?
Sure.
Review of attachment 227957 [details] [review]: .
pushed to master
And added the inhibit-only mode to the tool in master.