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.
what about making it ao instead if o? arrays can be zero length
(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).
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 "/"
in libaccountsservice's header files somewhere, too.
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".
(not that we'd probably support that use case in gdm)
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.
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.
Created attachment 136655 [details] [review]
Expose the automatic login users as a daemon property.
Associated GDM bug: https://bugzilla.gnome.org/show_bug.cgi?id=791860