After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687404 - Add inhibition command-line helper
Add inhibition command-line helper
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-02 04:39 UTC by Matthias Clasen
Modified: 2012-11-07 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (804 bytes, patch)
2012-11-02 04:39 UTC, Matthias Clasen
rejected Details | Review
patch (14.38 KB, patch)
2012-11-03 05:52 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2012-11-02 04:39:43 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.
Comment 1 Bastien Nocera 2012-11-02 10:39:29 UTC
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
Comment 2 Bastien Nocera 2012-11-02 10:58:10 UTC
Really not sure what the API should be, the one from systemd-inhibit is a bit too coarse for desktop applications.
Comment 3 Matthias Clasen 2012-11-02 11:17:41 UTC
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...
Comment 4 Bastien Nocera 2012-11-02 11:25:52 UTC
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.
Comment 5 Matthias Clasen 2012-11-03 05:52:38 UTC
Created attachment 227957 [details] [review]
patch
Comment 6 Bastien Nocera 2012-11-06 10:45:40 UTC
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.
Comment 7 Matthias Clasen 2012-11-06 19:45:37 UTC
How about I commit this, and you write the followup patch to do that ?
Comment 8 Bastien Nocera 2012-11-06 19:59:03 UTC
Sure.
Comment 9 Matthias Clasen 2012-11-07 11:24:04 UTC
Review of attachment 227957 [details] [review]:

.
Comment 10 Matthias Clasen 2012-11-07 11:24:21 UTC
pushed to master
Comment 11 Bastien Nocera 2012-11-07 13:11:32 UTC
And added the inhibit-only mode to the tool in master.