Bug 104564

Summary: Expose the automatic login user as a daemon property.
Product: accountsservice Reporter: Robert Ancell <robert.ancell>
Component: generalAssignee: Matthias Clasen <mclasen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: marius.vollmer, rstrode, stefw
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Expose the automatic login user as a daemon property.
Expose the automatic login users as a daemon property.

Description Robert Ancell 2018-01-09 23:09:24 UTC
Created attachment 136639 [details] [review]
Expose the automatic login user as a daemon property.

This stops us having to iterate across each user to find which one is configured
for automatic login. Due to D-Bus not having support for nullable types a client
must treat the '/' value as automatic login not supported.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=27857
Comment 1 Ray Strode [halfline] 2018-01-10 01:38:00 UTC
what about making it ao instead if o? arrays can be zero length
Comment 2 Robert Ancell 2018-01-10 02:34:10 UTC
(In reply to Ray Strode [halfline] from comment #1)
> what about making it ao instead if o? arrays can be zero length

That seemed the worse option since it's generally harder in a client to handle arrays and it doesn't make sense to have more than one automatic login user (you could have a different user per seat, but this API wouldn't handle that anyway).
Comment 3 Ray Strode [halfline] 2018-01-10 14:44:57 UTC
okay fair enough.  I'd still like a HasAutomaticLoginUser or similar property so we don't have to rely on the '/' quirk in some cases. Might make sense to put a 

#define ACT_INVALID_AUTOMATIC_LOGIN_USER "/"

(or similar)

in libaccountsservice's header files somewhere, too.
Comment 4 Ray Strode [halfline] 2018-01-10 14:46:20 UTC
I will say, there's nothing intrinsically impossible about supporting multiple automatic login users on the same seat.  we already support user switching after all, this could in theory be "set up my user switching layout for me when i boot".
Comment 5 Ray Strode [halfline] 2018-01-10 14:46:49 UTC
(not that we'd probably support that use case in gdm)
Comment 6 Robert Ancell 2018-01-10 20:13:47 UTC
Oh, now I understand. Right, you could log in multiple users and just have one (the first) as the active user. The others would be locked sessions you could switch to.
Comment 7 Ray Strode [halfline] 2018-01-10 20:20:17 UTC
right, in theory, anyway. not saying we should implement that feature in GDM, just saying that the feature isn't really that unreasonable.  and given it's not that unreasonable, and "ao" is one way around the maybe types limitation, it seems like an okay approach to me.  but i'm not like 100% behind it. if you want to do the approach in attachment 136639 [details] [review] instead i'm okay with it as long as we also do the stuff in comment 3.
Comment 8 Robert Ancell 2018-01-10 20:21:25 UTC
Created attachment 136655 [details] [review]
Expose the automatic login users as a daemon property.
Comment 9 Ray Strode [halfline] 2018-01-10 20:39:48 UTC
sure
Comment 10 Robert Ancell 2018-01-10 20:55:40 UTC
Associated GDM bug: https://bugzilla.gnome.org/show_bug.cgi?id=791860

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.