GNOME Bugzilla – Bug 118091
gnome-session lacks logout/shutdown/hibernate options
Last modified: 2008-06-26 06:10:05 UTC
Enhancement: I'd like more options for gnome-session-save such as gnome-session-save --logout gnome-session-save --logout --nodialog gnome-session-save --restart gnome-session-save --restart --nodialog gnome-session-save --shutdown gnome-session-save --shutdown --nodialog I could then bind these to whatever keys I like. "--logout", "--restart" "--shutdown" would be like the "-kill" parameter is now, but a differnet action would be defaulted in.
In my experience it is also very surprising to users, when they run gnome-session-save and a confirmation dialog comes up. They didn't expect one because they didn't use the --gui flag. It isn't obvious to the user that the confirmation dialog comes from gnome-session, not gnome-session-save. It is also not clear that --gui only refers to error messages. IMHO, running gnome-session-save without --gui should _not_ display a confirmation dialog. The user might be running this from a script or SSH connection. However, this changes existing behaviour which is probably bad. Maybe --gui should be deprecated and replaced by two separate flags: A _single_ flag (aka --no-gui) which turns off all X11 level user interaction, and a flag which turns off confirmation (aka --yes or something). gss --no-gui would ask (on the console) "Do you want to exit the session?" gss --yes would immediately quit, but in case of errors, display them in an X11 dialog. The --gui flag I should be accepted for compatibility, but ignored.
For the --gui stuff, see bug #149447.
*** Bug 346125 has been marked as a duplicate of this bug. ***
this is still valid
See bug#507391 for a temporary workaround.
Untested: DBus methods in org.freedesktop.PowerManagement, /org/freedesktop/PowerManagement include "Shutdown", "Hibernate", "Reboot", "Suspend". Didn't find a "Logout" sofar though; these seem very powermanagent-centric, not session-oriented. I didn't see any Gnome-Session DBus interface.
Please see: http://svn.gnome.org/viewvc/gnome-session/trunk/gnome-session/org.gnome.SessionManagement.xml?view=markup This is being added in for 2.24 (fingers crossed.)
In the context of this bug, wouldn't it be enough to provide the D-Bus interface? Personally, I think it doesn't make any sense to have a problem called gnome-session-save to handle session logout as well. gnome-session-save should only save the current session with an optional session name.
Closing this as WONTFIX because we have Consolekit D-Bus API for Shutdown/Reboot and Logout D-Bus method on gnome-session for logging out (You can just use gnome-session-save for logging out too)
Can you clarify a bit? Is there a command to shutdown that requires no password or configuration and does a clean session stop, just like using the button on the panel? Will it be possible to do "wget XXXX; gnome-shutdown" or similar? I think that this is a pretty legit feature request, ConsoleKit or not.