Cannot shutdown or restart when more than one user is logged in

Bug #282403 reported by Chris Coulson
58
This bug affects 4 people
Affects Status Importance Assigned to Milestone
fast-user-switch-applet (Ubuntu)
Fix Released
Medium
Chris Coulson
Intrepid
Won't Fix
Medium
Unassigned

Bug Description

Binary package hint: fast-user-switch-applet

The current ConsoleKit policy only allows administrators to shutdown or restart the machine when more than one user is logged in (ordinary users cannot shutdown or restart in this scenario). That is ok if you are using the old gnome-session dialog, as it presents you with a nice PolicyKit authorization prompt when you attempt to shutdown or restart the machine. Once you have authenticated, shutdown proceeds as expected.

The fast-user-switch-applet does not currently do this though. If you try to shutdown or restart the machine with more than once user logged in, the result is that you are just returned to the login screen, with no PolicyKit authentication dialog.

Description: Ubuntu intrepid (development branch)
Release: 8.10
chr1s@chris-desktop:~$ apt-cache policy fast-user-switch-applet
fast-user-switch-applet:
  Installed: 2.24.0-0ubuntu2
  Candidate: 2.24.0-0ubuntu2
  Version table:
 *** 2.24.0-0ubuntu2 0
        500 http://archive.ubuntu.com intrepid/main Packages
        100 /var/lib/dpkg/status

Tags: iso-testing
Revision history for this message
Michael Vogt (mvo) wrote :

I saw this behavior today too, when the guest user is loged and I select "shutdown" from my (admin) user account I end up in the gdm screen. This is confusing because there is no indication why that happend and why it did not shut down.

Changed in fast-user-switch-applet:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Michael Vogt (mvo) wrote :

I should add that the shutdown via System/Shutdown gets this right and gives me a dialog that asks for PK authorization.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

As it is probably too late to get a change like this in to Intrepid, I would propose changing the consolekit policy to allow any user to shut down the machine, regardless of who else is logged in. It's not a good long-term solution, but this was the default behaviour in Hardy and would be less confusing to users than the current situation.

What do you think?

Revision history for this message
Tux (peter-hoogkamer) wrote :

I think that a good long term solution would be that there will be a popup, when you choose shutdown from the user account, which will indicate that there is still a guest or other session open. Then there could be an option to close the running session before shutting down the computer.
I agree that the current behavior is confusing and changing the policy would solve this issue for now.

Revision history for this message
Artur Rona (ari-tczew) wrote :

I can confirm this bug. Generally, I like to old shutdown-menu, which one was in >=Ubuntu 8.04. Remove fast-user-switch-applet from 9.04 and restore old shutdown-menu :)

Revision history for this message
Artur Rona (ari-tczew) wrote :

Sorry, <=Ubuntu 8.04.

Revision history for this message
Geoff Goehle (goehle) wrote :

I can confirm this with Ibex.

Revision history for this message
Geoff Goehle (goehle) wrote :

I think this has to do with the fact that in Ibex normal users are not supposed to be able to shut down the computer when other users are logged in. Try shutting down fro the system menu, for example. Except, after you get dumped back to GDM by trying to shutdown using the switcher applet you can shutdown the computer from there without any permissions or dialog boxes. This seems to be a fundamental issue with controlling when the computer can be shutdown because could always get back to GDM by logging out.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

There's no need to keep for people to keep confirming the bug. The bug is triaged and we understand exactly what the problem is. If people are affected, they can click the "change" link next to "This bug doesn't affect me", just underneath the bug importance near the top of the page. This won't generate unnecessary bug traffic.

Revision history for this message
braweheart (braweheart) wrote :

Recently my fast user switcher started to bug, maybe it's conneccted to this.

There is no shut down or restat option, not even right after login. I have no other users configured, ecxept the Guest session. But to log in to and logout from the guest session doesn't change anything.

But, however, if I let the _updade manager_ check for new updates, then the Shut down and restart options comes back. Starting Synaptic or anything else with gksudo doesn't have the same effect.

If you guys doesn't think this is connected to this bug I'l make a new bugreport. I haven't found anything about this searching the web...

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

braweheart - thats unrelated, and most likely because you disabled gnome-power-manager from starting when you log in (check in System -> Preferences -> Sessions)

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

I've started writing a patch for this, although it's not complete yet

Changed in fast-user-switch-applet:
assignee: nobody → chrisccoulson
status: Triaged → In Progress
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Here's a patch for this (and some other FUSA bugs).

Here's the changelog:

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

  * 84_session_management.patch:
    - Use ConsoleKit for shutdown and restart action.
    - Support authenticating with PolicyKit for shutdown and
      restart actions (LP: #282403).
    - Don't hide shutdown and restart actions when gnome-power-manager
      is not running, as they don't depend on it (LP: #298811). Shutdown
      and Restart will be hidden if the system policy doesn't let anybody
      execute these actions from the current console.
    - Pass LIBGNOMEUI_MODULE to gnome_program_init (instead of
      LIBGNOME_MODULE). Without this, gnome_master_client returns NULL
      now, which stops the logout action from working.
  * 90_status_management.patch:
    - Update because the Pidgin DBus interface changed slightly,
      making it impossible to control the status of Pidgin from the
      FUSA (LP: #324020).
  * Updated patches:
    - 91_ltsp_new_features.patch
    - 92_autotools.patch
  * debian/control:
    - Build-depends on libpolkit-gnome-dev and libgnomeui-dev.
      libgnomeui-dev was needed before, but it needs to be explicitly
      defined now, as it no longer gets installed as a dependency of the
      other build-depends.

 -- Chris Coulson <email address hidden> Sun, 15 Feb 2009 19:29:22 +0000

Changed in fast-user-switch-applet:
status: In Progress → Triaged
Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your work there, Ted could you review those changes?

Revision history for this message
Artur Rona (ari-tczew) wrote :

Can you update this package using Chris Coulson's patch? Please, because now gnome-panel doesn't have Shutdown option in System menu. I know, I can add applet into gnome-panel, but I don't wanna have got a lot of applets only for shutting down... lolmao.

Revision history for this message
Ted Gould (ted) wrote :

ACK. Looks good to me. Sebastien could you please upload these changes? Thank you Chris for the patches, great work! Sorry to take so long in review.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  * 84_session_management.patch:
    - Use ConsoleKit for shutdown and restart action.
    - Support authenticating with PolicyKit for shutdown and
      restart actions (LP: #282403).
    - Don't hide shutdown and restart actions when gnome-power-manager
      is not running, as they don't depend on it (LP: #298811). Shutdown
      and Restart will be hidden if the system policy doesn't let anybody
      execute these actions from the current console.
    - Pass LIBGNOMEUI_MODULE to gnome_program_init (instead of
      LIBGNOME_MODULE). Without this, gnome_master_client returns NULL
      now, which stops the logout action from working.
  * 90_status_management.patch:
    - Update because the Pidgin DBus interface changed slightly,
      making it impossible to control the status of Pidgin from the
      FUSA (LP: #324020).
  * Updated patches:
    - 91_ltsp_new_features.patch
    - 92_autotools.patch
  * debian/control:
    - Build-depends on libpolkit-gnome-dev and libgnomeui-dev.
      libgnomeui-dev was needed before, but it needs to be explicitly
      defined now, as it no longer gets installed as a dependency of the
      other build-depends.

 -- Chris Coulson <email address hidden> Sun, 15 Feb 2009 19:29:22 +0000

Changed in fast-user-switch-applet:
status: Triaged → Fix Released
Revision history for this message
Artur Rona (ari-tczew) wrote :

This bug isn't fixed for me.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

What is the output of "apt-cache policy fast-user-switch-applet"?

Revision history for this message
Ted Gould (ted) wrote : Re: [Bug 282403] Re: Cannot shutdown or restart when more than one user is logged in

On Wed, 2009-02-25 at 22:26 +0000, Ari wrote:
> This bug isn't fixed for me.

On Jaunty?

Revision history for this message
Artur Rona (ari-tczew) wrote :

$ apt-cache policy fast-user-switch-applet
fast-user-switch-applet:
  Zainstalowana: 2.24.0-0ubuntu8
  Kandydująca: 2.24.0-0ubuntu8
  Tabela wersji:
 *** 2.24.0-0ubuntu8 0
        500 http://pl.archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Yep, jaunty.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

What actually happens when you click Shutdown or Restart? what doesn't work?

Could you post the output of:

"polkit-auth --show-obtainable"
"ck-list-sessions"
"dbus-send --system --dest="org.freedesktop.ConsoleKit" --print-reply --type=method_call /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.GetCurrentSession"

Revision history for this message
Artur Rona (ari-tczew) wrote :

They are not Restart, Shutdown. Update package nothings change in fast-user-switch-applet.

Revision history for this message
Artur Rona (ari-tczew) wrote :
Revision history for this message
Artur Rona (ari-tczew) wrote :
Revision history for this message
Artur Rona (ari-tczew) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ari, could you open a new bug report. From what I see, you don't see any session management options in the applet, which is strange (and not related to this).

Revision history for this message
Artur Rona (ari-tczew) wrote :

Omg can I restore shutdown menu from older Ubuntu? Like in 8.04?

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Please open a new bug report Ari ;)

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Also, in the new report, please post the output of "gconftool-2 -R /apps/fast-user-switch-applet" so I can see your config.

Revision history for this message
Artur Rona (ari-tczew) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Closing the Intrepid task as WONTFIX. The changes to the FUSA rely on some extra functionality in gnome-session, and it's not really appropriate to backport the changes for a bug which isn't affecting that many users really.

Changed in fast-user-switch-applet (Ubuntu Intrepid):
status: Triaged → Won't Fix
Revision history for this message
Bluppie (benhyper) wrote :

The error message org.freedesktop.consolekit.system.stop-multiple-users is visible after logging out. I get this when I shutdown the computer and there is no other user them me myself. ;) Is this an new bug of an old one. I am using ubuntu 9.10 and are fully updated.

tags: added: iso-testing
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.