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 149447 - gnome-session-save presents a GUI - always!
gnome-session-save presents a GUI - always!
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: gnome-session
unspecified
Other Linux
: Normal major
: ---
Assigned To: Session Maintainers
Session Maintainers
: 324465 (view as bug list)
Depends on:
Blocks: 301710
 
 
Reported: 2004-08-05 21:27 UTC by Manuel Amador (Rudd-O)
Modified: 2006-11-15 22:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for HEAD (3.95 KB, patch)
2005-05-05 18:17 UTC, William Jon McCann
none Details | Review
updated patch (3.79 KB, patch)
2005-07-13 15:08 UTC, William Jon McCann
committed Details | Review
patch to remove the dialog (1020 bytes, patch)
2006-09-27 07:12 UTC, Tom Tromey
committed Details | Review

Description Manuel Amador (Rudd-O) 2004-08-05 21:27:48 UTC
Description of Problem:

--help documents the use of --gui for showing a
GUI alert saying the session is saved.  There is
no --nogui command line option, and there is also
no way to turn the dialog off, which results in
on-battery UPS events presenting an alert.

(UPS monitor autosaves the session upon going on
battery backup and with less than 60 seconds of
power remaining)


Steps to reproduce the problem:
1. run gnome-session-save


Actual Results:
see the (unexpected and unswitchable, system
modal) dialog


Expected Results:
no dialog at all

How often does this happen? 
100% of the time

Additional Information:
have a nice day! =)
Comment 1 William Jon McCann 2005-05-05 18:17:34 UTC
Created attachment 46065 [details] [review]
patch for HEAD

This patch adds a --silent option.  This is quite useful when interaction with
the user is impossible or undesirable.	Is this ok to commit?
Comment 2 Bastien Nocera 2005-06-10 20:06:59 UTC
Hmm, is this patch supposed to:
- Log out
- Shutdown
Or restart the computer?

Because that's the options I have available on my Fedora machine.

+  {"silent", '\0', POPT_ARG_NONE, &silent, 0, N_("No not require
confirmation"), NULL},
And that's not english ;)
Comment 3 William Jon McCann 2005-06-10 20:17:47 UTC
It is intended to allow a non-interactive, programmatic, clean session kill/logout.

I have no excuse for the typo. :)
Comment 4 William Jon McCann 2005-07-13 15:08:36 UTC
Created attachment 49096 [details] [review]
updated patch

Fixed typo.
Comment 5 Timo Aaltonen 2005-08-31 14:20:18 UTC
for the record: I've tested this patch on Ubuntu and gnome-session
2.11.91-0ubuntu3, and it worked like it should, the user is logged off nicely.
Comment 6 Timo Aaltonen 2005-11-02 11:45:47 UTC
the reason why I'd like to see this applied is that gnome-screensaver has an
option to show a "logout" button on the password-dialog that is useful for
computers where users are not allowed to lock the session for a long time
(classrooms etc.)

so, now that 2.13 is open, how about it?-)
Comment 7 Timo Aaltonen 2006-01-20 15:10:20 UTC
still no progress?? This is desperately needed for gnome-screensaver..
Comment 8 Waldo 2006-02-04 02:09:19 UTC
This is desperately needed as it may help address bug 316037 (http://bugzilla.gnome.org/show_bug.cgi?id=316037) which is still driving me nuts.

W
Comment 9 Vincent Untz 2006-02-05 10:28:13 UTC
This looks okay to me, but:

 + we're feature frozen (release team might accept the patch, though)
 + what about --kill? Doesn't it do what you're looking for?
Comment 10 Timo Aaltonen 2006-02-05 11:16:39 UTC
this would be used _with_ --kill, so that the session is saved and killed, without  showing the confirmation dialog.

I don't know why the dialog defaults to be shown (even without --gui)
Comment 11 Timo Aaltonen 2006-02-13 16:14:28 UTC
would this make gnome-session work without --gui like it should (ie. not ask for a confirmation)?

--- save-session.c-orig 2006-02-13 18:13:35.516679000 +0200
+++ save-session.c      2006-02-13 18:12:42.112138000 +0200
@@ -76,7 +76,8 @@
      to.  Some of them aren't particularly useful.  Interestingly,
      there is no way to request a shutdown without a save.  */
   gnome_client_request_save (client, GNOME_SAVE_BOTH, zap,
-                           GNOME_INTERACT_ANY, 0, 1);
+                            gui ? GNOME_INTERACT_ANY: GNOME_INTERACT_NONE,
+                            0, 1);
Comment 12 Timo Aaltonen 2006-02-17 11:40:52 UTC
I've now tested this simple patch with g-s-2.13.91, and it works like I expected:

gnome-session-save --kill: no gui shown, logs the user out
gnome-session-save --kill --gui: shows the "log out / switch user" dialog"

so, why not apply this while we still have time. It doesn't break any string freeze while fixing an annoying bug =) No module should rely anymore on gnome-session-save showing a gui without the option.
Comment 13 Waldo 2006-02-17 22:55:26 UTC
I second the motion :)  Please fix so hopefully I don't go insane with all the double-logging out stuff.

W
Comment 14 Timo Aaltonen 2006-03-14 11:13:01 UTC
_please_ apply this now that 2.14.0 is out.. it could make it in 2.14.1 right?
Comment 15 Waldo 2006-03-17 11:03:12 UTC
I can confirm the bug exists in 2.14.0 and I still need to hit the logout button 2x to actually logout/quit/restart..  (see http://bugzilla.gnome.org/show_bug.cgi?id=316037 )

Actually I get two unwanted dialog boxes:

1.  A warning that certain windows do not support "save current setup"

2.  "Your session has been saved"

W
Comment 16 Waldo 2006-06-28 10:27:22 UTC
It's been 3 months.... Any chance of this getting into 2.15?

W
Comment 17 Waldo 2006-07-12 20:19:23 UTC
four months.. anyone?  I am *STILL* getting a double-logout dialog message..

W
Comment 18 Tom Tromey 2006-09-27 07:01:06 UTC
This patch seems unobjectionable to me.
If I could check it in, I would.

I think the "Your session has been saved" dialog should be removed.
It doesn't seem very useful.  Is there some reason to present
this info to the user?
Comment 19 Tom Tromey 2006-09-27 07:03:28 UTC
*** Bug 324465 has been marked as a duplicate of this bug. ***
Comment 20 Tom Tromey 2006-09-27 07:12:25 UTC
Created attachment 73478 [details] [review]
patch to remove the dialog

This patch removes the pesky dialog entirely.  It doesn't seem very useful
and there are several complaints about it in bugzilla, e.g. bug #316037.

The GNOME_INTERACT_NONE part of the earlier patch here should be kept
(and made conditional on --gui only); but otherwise I think with this
we don't need --silent.
Comment 21 Vincent Untz 2006-10-08 14:31:15 UTC
I committed Tom's patch. Jon's patch need to wait for 2.17 since it adds a new string. I also propose to make --gui the default behavior, and remove this option (or at least hide it).
Comment 22 Tom Tromey 2006-10-08 16:56:07 UTC
If you make --gui the default then I think you need to add a new
option to disable it.  I think it would probably be preferable to
just check in the patch in comment #11.  The rest of the --silent
patch is not really necessary.
Comment 23 Vincent Untz 2006-10-08 17:09:31 UTC
(In reply to comment #22)
> If you make --gui the default then I think you need to add a new
> option to disable it.  I think it would probably be preferable to
> just check in the patch in comment #11.  The rest of the --silent
> patch is not really necessary.

Applying the patch from comment #11 has the side-effect that people using gnome-session-save will see a change in the default behavior, which can be quite annoying if it makes you lose some data ;-)
Comment 24 Tom Tromey 2006-10-08 18:51:41 UTC
Yeah, I see what you mean about changing the default behavior.

I sure hope this isn't a safety issue, though.  I think that
would mean that there are some fairly severe application bugs...
Comment 25 Vincent Untz 2006-11-15 22:11:13 UTC
Committed. At last!
Comment 26 Manuel Amador (Rudd-O) 2006-11-15 22:15:13 UTC
Thanks, Vince!