When Unity.Session is available, use its API for logging out

Bug #1296814 reported by Stephen M. Webb
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Session Menu
Fix Released
Critical
Charles Kerr
Unity
Fix Released
Undecided
Marco Trevisan (Treviño)
indicator-session (Ubuntu)
Fix Released
Undecided
Unassigned
Trusty
Fix Released
Medium
Unassigned
unity (Ubuntu)
Fix Released
Undecided
Marco Trevisan (Treviño)
unity8-desktop-session (Ubuntu)
Fix Released
Medium
Charles Kerr

Bug Description

[Impact]

The session indicator always uses gnome-session to end the session (log out), but gnome-session is not guaranteed to be available under, for example, a Unity8 desktop preview session. It should use Upstart where available.

[Test Case]

Install unity8-desktop-session and choose to log in to that session from the LightDM login screen. You should be able to select "log out" from the session-indicator indicator and have it bring you back to the login screen.

[Regression Potential]

In the worst case this change could affect log out operations from regular Unity 7 sessions and potentially other sessions that use the session indicator. In such a case, the log out operation would fail necessitating a reboot or manual session kill.

[Other Info]

This change has been in production use on later releases of Ubuntu (14.10 and later) without problems.

Later version of the Unity 8 desktop session do not exit to the LightDM login screen but instead restart Unity 8 and present the Unity 8 login screen. This is a bug in Unity 8 and not related to indicator-session.

Related branches

Revision history for this message
Stephen M. Webb (bregma) wrote :
Stephen M. Webb (bregma)
Changed in unity8-desktop-session (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
Thomas Strehl (strehl-t)
Changed in unity8-desktop-session (Ubuntu):
assignee: nobody → Charles Kerr (charlesk)
Revision history for this message
Charles Kerr (charlesk) wrote :

See also bug #1302213

Charles Kerr (charlesk)
summary: - Use upstart to log out when available
+ When Unity.Session is available, use its API for logging out
Revision history for this message
Charles Kerr (charlesk) wrote :

So when the user has prompting disabled, indicator-session can use the Unity API directly, and there's an attached MP for this.

In the default case where prompting is turned on, it looks like UnityCore/GnomeSessionManager.cpp's implementation of org.gnome.SessionManager.EndSessionDialog handles the logout signals on its own instead of returning control to indicator-session. It seems likely that once Unity has control it's irrelevant whether the logout signal emitted is Gnome or Unity, but am adding Treviño here for a sanity check to confirm...

Changed in unity:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Revision history for this message
Charles Kerr (charlesk) wrote :

Raising importance to Critical as per bug #1323992

Changed in indicator-session:
assignee: nobody → Charles Kerr (charlesk)
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-session - 12.10.5+14.10.20140620-0ubuntu1

---------------
indicator-session (12.10.5+14.10.20140620-0ubuntu1) utopic; urgency=low

  [ Charles Kerr ]
  * When logging out, prefer com.canonical.Unity.RequestLogout over
    org.gnome.SessionManager.Logout. (LP: #1296814)
 -- Ubuntu daily release <email address hidden> Fri, 20 Jun 2014 15:27:42 +0000

Changed in indicator-session (Ubuntu):
status: New → Fix Released
Changed in indicator-session:
status: In Progress → Fix Committed
Charles Kerr (charlesk)
Changed in indicator-session:
status: Fix Committed → Fix Released
Revision history for this message
Stephen M. Webb (bregma) wrote :

This has been fixed and released in the underlying component packages.

Changed in unity8-desktop-session (Ubuntu):
status: In Progress → Fix Released
Changed in unity (Ubuntu):
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Stephen M. Webb (bregma)
Changed in indicator-session (Ubuntu Trusty):
status: New → In Progress
importance: Undecided → Medium
Stephen M. Webb (bregma)
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Stephen, or anyone else affected,

Accepted indicator-session into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/indicator-session/12.10.5+14.04.20140925-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in indicator-session (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Andrea Azzarone (azzar1)
Changed in unity (Ubuntu):
status: New → Fix Released
Changed in unity:
status: New → Fix Released
no longer affects: unity
Changed in unity:
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
status: New → Fix Released
Revision history for this message
Stephen M. Webb (bregma) wrote :

Verified using unity8-desktop-session-mir on Trusty.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for indicator-session has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package indicator-session - 12.10.5+14.04.20140925-0ubuntu1

---------------
indicator-session (12.10.5+14.04.20140925-0ubuntu1) trusty; urgency=low

  [ Charles Kerr ]
  * When logging out, prefer com.canonical.Unity.RequestLogout over
    org.gnome.SessionManager.Logout. (LP: #1296814)
  * Install translations into the correct directories. (LP: #1318980)

  [ Sergey "Shnatsel" Davidoff ]
  * Allow Pantheon as a valid show-in target. (LP: #1301699)
 -- Ubuntu daily release <email address hidden> Thu, 25 Sep 2014 15:07:42 +0000

Changed in indicator-session (Ubuntu Trusty):
status: Fix Committed → Fix Released
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.