Shutdown menu option has "..." but action is immediate

Bug #357455 reported by Paul Sladen on 2009-04-08
Affects Status Importance Assigned to Milestone
fast-user-switch-applet (Ubuntu)
Ted Gould
Ted Gould

Bug Description

Binary package hint: fast-user-switch-applet

Currently the Shutdown option is shown as:


however, the "..." is to indicate that further choices need to be made before the action is activated. This is utter misleading as the default action is to shutdown instantly with no dialogue and countdown.

Ideally, the shutdown item should be displayed as plain:


with no ellipsis. For bonus points, either append it dynamically, or have two strings.

Paul Sladen (sladen) wrote :

Strange, 'debian/patches/84_session_management.patch' already has:

+ if (panel_applet_gconf_get_bool (adata->applet, SUPPRESS_KEY, NULL))
+ {
+ adata->shutdown_item = gtk_image_menu_item_new_with_label (_("Shut Down"));
+ }
+ else
+ {
+ adata->shutdown_item = gtk_image_menu_item_new_with_label (_("Shut Down..."));
+ }

Paul Sladen (sladen) wrote :

05:02 < tedg> sladen: You might also look at bug 346600 and see if that's what you're seeing.

David Barth (dbarth) wrote :

Hi Paul,

Do you confirm that it is indeed the same bug? That is, that you systematically have 2 pseudo sessions opened?

David Barth (dbarth) on 2009-04-10
tags: added: dxteam
Changed in fast-user-switch-applet (Ubuntu Jaunty):
assignee: nobody → ted-gould
status: New → Incomplete
importance: Undecided → Medium
Paul Sladen (sladen) wrote :

David: looks like it. Here's a test-case:

1. Ctrl-Alt-F1 (switch to console)
2. Login as /same/ user as in GDM/X.
3. Alt-F7 (switch to X)
4. fusa->Shutdown...
5. Shutdown is instant.

Ideally, on a multi-user system it should probably display something like:

  "Warning 1 other user still logged in. Waiting 60 seconds"

Chris Coulson (chrisccoulson) wrote :


Could you please run the following in between steps 3 and 4, and post the output:

"polkit-auth --show-obtainable"

Paul Broadhead (pjbroad) wrote :

Since my (earlier) Bug #346600 has been marked as a duplicate of this one, and my name is also Paul, I'll add the output you requested....

Paul Broadhead (pjbroad) wrote :
Chris Coulson (chrisccoulson) wrote :

Thanks for the info Paul

Paul Sladen - I agree that the applet should probably show something like "Warning 1 other user still logged in. Waiting 60 seconds". However, it's probably a bit late in the day to be adding new strings, so I've written a patch which will display the existing confirmation dialog if the only other sessions that exist on the system belong to you (to catch this case where you open multiple sessions with the same UID).

Changed in fast-user-switch-applet (Ubuntu Jaunty):
status: Incomplete → Triaged
Paul Broadhead (pjbroad) wrote :

Chris, I'm glad you have fixed this bug in the way you describe. I think the suggested behaviour of Paul Sladen would be surprising to most users. As I understand things, the original intention of the count down dialogue was to allow the user to back out of a shut-down/restart in case they mis-clicked the option or changed their mind. Having a special case for multiple sessions for the same UID - i.e. change the menu option and invoke the action immediately - would be a very unexpected action IMHO. Far better to keep things simple. One or more of the same UID, show the countdown. More than one UID, invoke the admin dialogue with cancel or immediate action the result of that dialogue. Both routes give back out options.

Paul Sladen (sladen) wrote :

Chris: can you post the patch. Does it actually fix the presented menu to always be consistent with the expected action; or is it just on the basis of a hack to check if the logins are the same username (but won't catch two separate usernames being logged in).

The outside from polkit-auth (both before and after the second login from the console) is identical. It there any other debugging I can do?

Chris Coulson (chrisccoulson) wrote :


I'll merge the changes in to Ted's session_management branch in the morning, as it will be easier for you to review. The change makes it count sessions in the same way that consolekit does. My change makes it count only a single session for each logged in user, regardless of how many sessions that user has open.

* If user A has a session open and user B has 2 sessions open, then the applet counts 2 users, and will decide on whether to display the dialog based on the policy for multiple users (default in Ubuntu is no confirmation dialog as the user needs to authenticate).

* If user A has a session open, then the applet counts 1 user and will decide on whether to display the dialog based on the policy for a single user (default in Ubuntu is to display the confirmation dialog, as the user doesn't need to authenticate).

* If user A has 2 sessions open (as the use case in this bug report), then the applet counts 1 user and will decide on whether to display the dialog based on the policy for a single user (default in Ubuntu is to display the confirmation dialog, as the user doesn't need to authenticate).

You can try the package out in my PPA to see if it behaves as expected. A good test sequence would be:

1. Select Shutdown or Restart with only a single user logged in. You should see the confirmation dialogue. Cancel this.
2. Open a terminal and create a root shell ("sudo su"). Now select Shutdown or Restart - you should see a Policykit authentication dialogue. Now cancel this.
3. Switch to a terminal (CTRL+ALT+F1) and log in using the user logged in at step 1. Switch back to your X session and select Shutdown or Restart. You should see the Policykit authentication dialogue again. Cancel this.
4. Exit your root shell created in step 2. You should now only have 2 sessions open (with the same user ID. Verify this with ck-list-sessions). Select Shutdown or Restart - you should see the confirmation dialogue with my version, whereas the action would be executed with no confirmation in the current Jaunty version.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package fast-user-switch-applet - 2.24.0-0ubuntu13

fast-user-switch-applet (2.24.0-0ubuntu13) jaunty; urgency=low

  * 84_session_management.patch:
    - Destroy the old session dialog if one is already displayed
      and the user selects a different session action from the
      applet (LP: #350297).
    - Use gnome-session to shutdown and restart the machine,
      so that the session is actually terminated correctly.
    - Improve the logic for deciding whether to display the confirmation
      dialog, to fix a corner case where the user gets no dialog
      and also doesn't need to authenticate (LP: #357455).
  * Updated so that they apply again:
    - 90_status_management.patch
    - 91_ltsp_new_features.patch

 -- Chris Coulson <email address hidden> Mon, 13 Apr 2009 02:38:14 +0100

Changed in fast-user-switch-applet (Ubuntu Jaunty):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers