Features/ConsoleKitInhibitAPI

From FedoraProject

Jump to: navigation, search

Contents

ConsoleKit Inhibit API

Summary

Make ConsoleKit follow the inhibit pattern for its shutdown apis.

Owner

Current status

An initial API proposal has been sent to the gdm mailing list here. The ConsoleKit part has been implemented here.

Detailed Description

ConsoleKit offers an API for shutting down the system, with the Restart() and Stop() methods. These require different PolicyKit privileges, depending on the number of logged in users.

This api is very simple, but it has a number of problems:

We need a better API, to satisfy the following goals:

Desktop/Whiteboards/InhibitApis has some general musings about the type of api that might be good for this.

Benefit to Fedora

The multi-user experience of Fedora is improved and Fedora gains a Reboot/Shutdown UI that works with PolicyKit 1.0.

Scope

This feature requires addition of new API in ConsoleKit. gnome-session needs to be patched to use the new API, and needs some UI enhancements for multi-user scenarios.

Some system services may benefit from using the new ConsoleKit inhibit api: DeviceKit-disks, PackageKit, backup apps.

Test Plan

Restart/Stop the system with one or multiple users logged in. Repeat while a disk is formatted by DeviceKit-disks. Repeat while updates are being installed by PackageKit. Verify that the system behaves as expected and respects PolicyKit configuration.

User Experience

Here is how the user experience should look for a user initiating a reboot:

  1. Click Restart button
  2. Possibly get an auth dialog, depending on PolicyKit configuration
  3. Possibly get an inhibit dialog saying there are some other users logged in, and some apps in my own session inhibit the shutdown. The users will be displayed similarly to the gdm greeter, with their name and photo. The dialog has 'Cancel' and 'Restart anyway' buttons.
  4. Go through those apps and close them
  5. While doing that, the inhibit dialog updates the list of inhibiting applications and logged in users
  6. Wait a little longer for remaining users to log out
  7. After a while, the system restarts

Here is how the user experience should look for a user when a user in another session initiates a reboot:

  1. A dialog pops up, informing the user that the system is about to reboot. The dialog looks similar to the current inhibit dialog, listing the inhibing applications
  2. Go through those apps and save unusaved documents, then proceed to log out
  3. Briefly thereafter, the system restarts

Dependencies

None.

Contingency Plan

Stay with the current approach of making gnome-session work with PolicyKit 1 and the current ConsoleKit api. The user experience will be suboptimal.

Documentation

None yet.

Release Notes

None should be necessary.