canonical / lightdm

Display Manager
GNU General Public License v3.0
827 stars 138 forks source link

autologin-user by user id (UID) and not user name #347

Open guysoft opened 6 months ago

guysoft commented 6 months ago

Hey, I maintain a raspberrypi distribution that boots a graphical user interface using autologin (FullPageOS). Recently Rpi Foundation added a feature that on flashing changes the name of the user, but not the user id. So what I would like is to have autologin-user=UID:1000 or something like that. I can't find documation how this would be do apart from the config file itself.

I tried looking in common/configuration.c but could not understand where the value is being used after configured?

Is this something that I can add?

In the short one I am adding a workaround systemd service that would overwrite the lightdm.conf file, but that could get messy later on.

Thanks!

robert-ancell commented 6 months ago

This seems like a reasonable thing to support. You don't need to prefix the id with 'UID:' - usernames aren't allowed to start with numbers. You might want to look at common/user-list.c as that's where the username lookup is done.