selectUser is always null

Bug #1601984 reported by Josh Arenson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Light Display Manager
New
Undecided
Unassigned

Bug Description

The selectUser hint, provided in lightdm-qt and lightdm-gobject always returns null. This makes it difficult for the greeter to be aware of the last logged-in user. The current unity greeter uses a hack to workaround this, but it would be nice to fix for unity8.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

The selectUser hint is used when the greeter is a lock screen - i.e. it is set the the user of the last active session. It's currently left to the greeter to decide which user to select on startup, though we should consider if this should be exposed on liblightdm.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

More historical notes:
- The reason we don't provide the last logged in user is LightDM doesn't have a store for data like this. This information can be got from AccountsService etc.
- It's not clear that all greeters want to select the previously logged in user. This is potentially a security issue (leaking information about who has used it) or you might want to select the most frequently logged in user instead of the last.

Revision history for this message
Robert Ancell (robert-ancell) wrote :

It might be useful to add a helper function to liblightdm that pulls the last user from AccountsService.

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

So selectUserHint is not *always* null. It is properly set when going to indicator-session and switching to another user.

But it is null when just switching to the greeter (without selecting a user) or logging out (and of course when starting up LightDM).

But I think it does make sense for LightDM to set selectUserHint in the switch-to-greeter or logging-out cases.

> - The reason we don't provide the last logged in user is LightDM doesn't have a store for data like this. This information can be got from AccountsService etc.

It's kind of difficult to synthesize that info from AS. It provides that info by way of a login timestamp on each user's dbus object. So you have to iterate and compare.

Whereas LightDM can just track it internally in a single gchar*. It doesn't need a store for the data. If LightDM shuts down over a reboot or something, I don't expect it to remember a selectUserHint.

> - It's not clear that all greeters want to select the previously logged in user. This is potentially a security issue (leaking information about who has used it) or you might want to select the most frequently logged in user instead of the last.

Security wise, I'm not qualified to say. But I'll note that unity-greeter itself keeps track of the last-logged-in user. So Ubuntu by default has been leaking that information for years.

UX wise, it's the last state the user remembers seeing the greeter. So when they go back to it, it makes sense to see it like they remember. But I grant you, this then becomes LightDM making a UX decision. But, like a sensible one?

> It might be useful to add a helper function to liblightdm that pulls the last user from AccountsService.

As above, we could just have a gchar* in LightDM that remembers the last user it switched to/authenticated. Or have it detect which user session made the request to switch to a greeter / logged out.

Revision history for this message
Josh Arenson (josharenson) wrote :

> - UX wise, it's the last state the user remembers seeing the greeter. So when they go back to it, it makes sense to see it like they remember. But I grant you, this then becomes LightDM making a UX decision. But, like a sensible one?

Only if the greeter implements it. It would be nice to have the option.

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.