From Fedora Project Wiki

< Desktop‎ | Whiteboards

Revision as of 19:37, 31 October 2008 by Mccann (talk | contribs)

Problem

The Inhibit pattern has proven to be quite successful. It is a good way for applications to proactively inform the system about actions that should not be taken.

Firstly, we offer too many ways to do this. We currently (as of GNOME 2.24) have the following:

* http://www.gnome.org/~mccann/gnome-screensaver/docs/gnome-screensaver.html#gs-method-Inhibit
* http://people.freedesktop.org/~hughsient/temp/dbus-interface.html#dbus-inhibit
* http://www.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager.Inhibit

Secondly, it is not always possible to know ahead of time if an action should be avoided. So, there is often a need for the [pattern]. This pattern has been partially implemented in gnome-session 2.24. See http://live.gnome.org/SessionManagement/GnomeSession .


Use Cases

Watching a movie on laptop screen

Watching a movie with laptop plugged into an external monitor/TV

Listening to music on laptop in another room

Burning a CD

Transferring files to a removable disk

Performing a core system software update

Performing an application software update

Editing a document

Playing a game


Discussion

Overview of actions

Action Interface
Session idleness org.gnome.ScreenSaver.Inhibit
Automatic screen locking org.gnome.ScreenSaver.Inhibit
Switching users org.gnome.SessionManager.Inhibit
Automatic suspend org.freedesktop.PowerManagement.Inhibit
Automatic hibernation org.freedesktop.PowerManagement.Inhibit
Logout org.gnome.SessionManager.Inhibit
Reboot/Shutdown TBD

References

* http://bugzilla.gnome.org/show_bug.cgi?id=334809#c6