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 118091 - gnome-session lacks logout/shutdown/hibernate options
gnome-session lacks logout/shutdown/hibernate options
Status: RESOLVED WONTFIX
Product: gnome-session
Classification: Core
Component: gnome-session
2.16.x
Other Linux
: Normal enhancement
: ---
Assigned To: Session Maintainers
Session Maintainers
: 346125 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-07-23 03:01 UTC by Hal Canary
Modified: 2008-06-26 06:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description Hal Canary 2003-07-23 03:01:14 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.
Comment 1 Sebastian Kapfer 2004-02-19 14:17:36 UTC
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.
Comment 2 Tom Tromey 2006-09-27 07:07:37 UTC
For the --gui stuff, see bug #149447.
Comment 3 Christian Kirbach 2006-11-11 12:23:05 UTC
*** Bug 346125 has been marked as a duplicate of this bug. ***
Comment 4 Christian Kirbach 2006-11-11 12:24:27 UTC
this is still valid
Comment 5 Josselin Mouette 2008-02-13 13:53:29 UTC
See bug#507391 for a temporary workaround.
Comment 6 Erich Schubert 2008-04-11 12:14:58 UTC
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.
Comment 7 Rob Bradford 2008-04-11 13:42:12 UTC
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.)
Comment 8 Lucas Rocha 2008-05-25 20:44:42 UTC
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.
Comment 9 Lucas Rocha 2008-06-25 18:46:56 UTC
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)
Comment 10 Andrea Ratto 2008-06-26 06:10:05 UTC
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.