apognu / tuigreet

Graphical console greeter for greetd
GNU General Public License v3.0
986 stars 45 forks source link

[Suggestion] Use a different method, such as getent() or userdbctl(), to get list of usernames for the user-menu. #72

Closed benniekiss closed 11 months ago

benniekiss commented 2 years ago

Enhancement/Suggestion

Currently, the user-menu is sourced by directly reading /etc/passwd > https://github.com/apognu/tuigreet/blob/599d8d5d3657e6c25b3877f84a09979a79256600/src/info.rs#L91

This method gets most users, but it leaves out other user databases.

Using getent passwd , userdbctl users, or another method would capture many more user databases.

My use case is that I am using systemd-homed, so my users do not appear in /etc/passwd, and they do not show up in the greeter user-menu

apognu commented 1 year ago

Good idea, I will have a try with the rust-users crate and see what I can do.

apognu commented 1 year ago

Created an issue on uzers-rs asking them to consider addind the GECOS field to what the crate returns for a user. This seems to work properly, but we would need this field to maintain feature parity with the /etc/passwd method.

apognu commented 1 year ago

My pull requests were accepted upstream, so I prepared a change in tuigreet to use this. Waiting for a new release to test and merge this.

benniekiss commented 1 year ago

wow! that's wonderful to hear. I've actually stopped using a linux desktop for sometime, but I've been planning to reinstall, so I'll be sure to test this out soon! Thank you