Matthew Paul Thomas, Canonical

Scope

This is an incomplete but living specification on how Ubuntu sessions should work. For each of

it should define how that function is made available (or not), looks, behaves, and fails gracefully, for

Packages currently involved

Startup

No text screen should appear before or after the startup screen (desktop-p-text-free-boot).

The startup screen should always include the Ubuntu logo. If there are multiple Ubuntu versions installed on this machine, the version number of this version should appear below the logo, as confirmation that you have started up into the right one.

How progress should be displayed in the startup screen depends on how long startup is likely to take in this Ubuntu version:

Disk checking

Anything else that takes unusually long

Log in automatically

Log in manually

To test the current design, use unity-greeter --test-mode.

Lock

For ten seconds before the session locks automatically, the display should dim, to warn you that the lock is about to happen, giving you a chance to cancel it. Any input, including volume buttons (bug 1396208), should cancel the lock and therefore restore the display.

When the screen locks manually or automatically, any display should turn off altogether (bug 947281).

When the screen locks manually, any keyboard backlight should turn off as well.

Log Out

Sleep

Restart

The Restart command is normally accessed from “Restart…” in the system menu, but can also be accessed from other places, such as the “Restart Now…” button in Software Updater, or the “Restart Into Selected…” button in Startup Settings.

However it is accessed, it should open the Restart alert.

restart.png

The cogwheel menu should be present only if it is possible to restart directly into the firmware menu on this computer. It should contain one item, “Restart Into Firmware”. (This is hidden in a menu to reduce geeky clutter.)

A “Restart Into Windows” or “Restart Into OS X” button should be present only if the relevant system is installed and can be restarted into (bug 165065).

Neither of those two controls should be present, however, if you have already chosen to restart into a particular system. In that case, the primary text should be of the form “Are you sure you want to close all programs and restart the computer into {Name Of System}?”, and there should be only “Cancel” and “Restart” buttons.

If you do not have permission to restart without authenticating, the labels for all “Restart” items in the alert should end with an ellipsis.

Shut Down

Common behavior for Log Out, Restart, and Shut Down

If the system suspends — either manually or automatically — while any confirmation alert for “Log Out”, “Restart”, or “Shut Down” is visible, the alert should cancel automatically when the session resumes.

Bugs not yet addressed by this specification

This specification should describe fixes for (or reasons for not fixing) each of these bugs.

crypt-setup:

plymouth:

mountall:

lightdm:

unity-greeter:

gnome-session:

indicator-session:

gnome-power-manager: (not including screen blanking, timeout-related, or battery-related functions)

Previous work

(Many of these documents are by other Canonical designers and are therefore private. They will be either made public or retired.)

Old specification

As a temporary measure until ExitStrategy is implemented, there should be separate Log Out, Sleep, Hibernate, Restart, and Switch Off commands. The Log Out, Restart, and Switch Off commands should have confirmation alerts. The “Sleep” and “Switch Off” terminology should be used consistently across Ubuntu.

Common alert elements

The primary action button should respond to the Enter key, and should not have any other access key. The Cancel button should respond to the Esc key, and should not have any other access key. None of the buttons should have icons.

Log Out

If updates that require a restart are waiting to be installed:

log-out-restart.jpg

The “Restart” button should have the access key R. If you do not have permission to restart without authenticating, the button label should end with an ellipsis.

Otherwise:

log-out.jpg

Switch Off

switch-off.jpg

(The phrase “shut down” is used here in the primary text as a hint for people who are used to “shut down” from previous versions or other OSes.)

If you do not have permission to switch off without authenticating, the button label should end with an ellipsis.

When suspending or hibernating fails

There are three errors Ubuntu might receive when trying to suspend or hibernate.

Not enough swap space to hibernate

Swap space is encrypted

If you have encrypted swap but have not specified a password for the swap, you would not be able to wake from hibernate. To protect you from this, Ubuntu will not hibernate in the first place. In this case, "Hibernate" should not appear in the session menu in the first place.

In the unlikely event that Ubuntu does try to hibernate in this situation ...

Sleep has already been requested

Show nothing extra, because the sleep is happening anyway.

Implementation plan

  1. In indicator-session, implement the new alerts.

  2. In gdm, change “Suspend” to “Sleep” and “Shut Down” to “Switch Off”.

  3. In gnome-power-manager, change “Suspend” to “Sleep” and “Shutdown” [sic] to “Switch Off”.

  4. In gnome-session’s behemoth dialog, change “Suspend” to “Sleep” and “Shut Down” to “Switch Off”.

  5. In gnome-session, change “System policy prevents stopping the system when other users are logged in” to “To switch off the computer while others are logged in, you need to authenticate.” (with a period).

  6. In gnome-user-guide, change the “Ending a Session” page so that it refers to “Switch Off” instead of “Shut Down”, and has a bullet point for “Sleep” instead of wibbling about some vendors letting you suspend.

  7. Later, move the confirmation alerts from indicator-session to gnome-session.

SessionHandling (last edited 2016-01-08 12:12:56 by mpt)