unity-greeter default selected session icon (ubuntu) does not reflect the default that is in lightdm

Bug #978428 reported by Matt Fischer
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity Greeter
Fix Released
Undecided
Unassigned
unity-greeter (Ubuntu)
Fix Released
Low
Michael Terry
Precise
Fix Released
Low
Unassigned

Bug Description

I have an image where I've modified lightdm.conf to change the default session (user-session=) to something other than Ubuntu. When that image boots, before anyone has logged in, the Unity Greeter shows the session icon as Ubuntu. When I login it is running the correct session, just the icon is showing that the incorrect session has been chosen. To repro this, make a new session file or set the default to something like gnome in lightdm.conf.

My guess is that the code that picks the icon to show isn't checking what the default session is when the user has not previously logged in.

Matt Fischer (mfisch)
summary: - unity-greeter default selected session (unity) does not reflect the
- default that is in lightdm
+ unity-greeter default selected session icon (ubuntu) does not reflect
+ the default that is in lightdm
Revision history for this message
Matt Fischer (mfisch) wrote :

I poked through the code some and here are my findings:

The greeter gets the default session from here:
src/unity-greeter.vala: user_list.default_session = greeter.default_session_hint;

When I use GI in python, I always get None for that hint, whether it's in a VM or on my precise-based dev box. The other hints work fine:

Type "help", "copyright", "credits" or "license" for more information.
>>> from gi.repository import LightDM
>>> g = LightDM.Greeter()
>>> print g.get_default_session_hint()
None
>>> print g.get_hide_users_hint()
False

So I'm starting to think that perhaps the hint is not set properly. I know that user-session is being properly read from the config file, else the session I set wouldn't be running. I don't understand the interaction between the user's preference (last session) and the default session from the config file to make a reasonable stab at a fix at this time.

Revision history for this message
Matt Fischer (mfisch) wrote :

I should add that there are two places where the default-session hint is set:

src/display.c: greeter_set_hint (display->priv->greeter, "default-session", display->priv->user_session);

What I don't see is the relationship between the user-session value in the config file and that setting of the hint. The only time that display->priv->user_session is set is when the user selects a new session inside this code:

display_set_user_session (Display *display, const gchar *session_name) {
...
    display->priv->user_session = g_strdup (session_name);
}

And that code only gets called when a session other than default is requested.

Revision history for this message
Matt Fischer (mfisch) wrote :

First sentence of comment #2 should have said "one place" not "two".

Revision history for this message
Michael Terry (mterry) wrote :

Using GI isn't going to work outside of a launched greeter. i don't believe the communication between the daemon and greeter can happen without the daemon setting things up. So that might be a red herring.

And for where it gets set:

lightdm.c: config_set_string()
lightdm.c: seat_set_property ()
seat.c: display_set_user_session ()
display.c: greeter_set_hint ()

Revision history for this message
Matt Fischer (mfisch) wrote :

I can only repro this when I have the user list hidden:

greeter-hide-users=true

Revision history for this message
Matt Fischer (mfisch) wrote :

Per discussion with Michael Terry on IRC, the issue is that the default-session didn't act like a property, so when it was changed after the hint was read, the UI wasn't udpating. We tested this fix, which Michael will merge in:

+++ unity-greeter-0.2.8/src/user-list.vala 2012-04-26 14:03:27.276021240 -0400
@@ -179,7 +179,20 @@
         }
     }

- public string default_session = "ubuntu";
+
+ private string? _default_session = "ubuntu";
+ public string? default_session
+ {
+ get
+ {
+ return _default_session;
+ }
+ set
+ {
+ _default_session = value;
+ session_image.set_from_pixbuf (get_badge ());
+ }
+ }

     private string? _session = null;
     public string? session

Michael Terry (mterry)
Changed in unity-greeter (Ubuntu):
assignee: nobody → Michael Terry (mterry)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-greeter - 0.2.8-0ubuntu2

---------------
unity-greeter (0.2.8-0ubuntu2) quantal; urgency=low

  * debian/patches/recognize-kde-plasma.patch:
    - Recognize the "kde-plasma" session as "kde" so it gets a properly
      branded icon in the greeter. LP: #986339
  * debian/patches/show-changed-default-badge.patch:
    - When the default session is changed in lightdm.conf, don't still
      show the Ubuntu badge. LP: #978428
  * debian/patches/fix-hung-logging-in.patch:
    - Sometimes users will get stuck on a "Logging in..." screen. This
      fixes that by ensuring that we don't wait for a background to fade
      in that never will. LP: #986967
 -- Michael Terry <email address hidden> Fri, 20 Apr 2012 14:51:06 -0400

Changed in unity-greeter (Ubuntu):
status: New → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Matt, or anyone else affected,

Accepted unity-greeter into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in unity-greeter (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Hey Matt, is there any chance you could test the updated version?

Changed in unity-greeter (Ubuntu Precise):
importance: Undecided → Low
Changed in unity-greeter (Ubuntu):
importance: Undecided → Low
Revision history for this message
Matt Fischer (mfisch) wrote :

Bug is fixed with unity-greeter (0.2.8-0ubuntu2)

Michael Terry (mterry)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-greeter - 0.2.8-0ubuntu1.1

---------------
unity-greeter (0.2.8-0ubuntu1.1) precise-proposed; urgency=low

  * debian/patches/recognize-kde-plasma.patch:
    - Recognize the "kde-plasma" session as "kde" so it gets a properly
      branded icon in the greeter. LP: #986339
  * debian/patches/show-changed-default-badge.patch:
    - When the default session is changed in lightdm.conf, don't still
      show the Ubuntu badge. LP: #978428
  * debian/patches/fix-hung-logging-in.patch:
    - Sometimes users will get stuck on a "Logging in..." screen. This
      fixes that by ensuring that we don't wait for a background to fade
      in that never will. LP: #986967
 -- Michael Terry <email address hidden> Fri, 20 Apr 2012 14:51:06 -0400

Changed in unity-greeter (Ubuntu Precise):
status: Fix Committed → Fix Released
Kane York (kanepyork)
Changed in unity-greeter:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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