Skip to content

community/lightdm: lightdm home and elogind support

Jakko requested to merge jakko/aports:alpine_lightdm_home into master

The first commit changes the home directory of user "lightdm" at installation. This fix came up in a discussion about onscreen keyboard settings in "slick-greeter" [1]. The state of the accessibility checkboxes in the top bar of "slick-greeter" are stored in gsettings of user "lightdm". The current home directory /var/run/lightdm gets flushed at shutdown. To make the settings persistent, change the home directory to /var/lib/lightdm like e.g. in Debian [2]. Also remove option -H "Do not create home directory" to allow to create the folder at installation [3]. And apply chmod 0750 to remove accessibility by other users [4].

  • The home directory change applies to new installations only (post-install script). I didn't dare to change it for existing installations (adding a post-upgrade script). I tested with sudo usermod -d /var/lib/lightdm lightdm on a running system with lighdm in use (requires to create that folder and "chown" it to lightdm:lightdm before). It sometimes worked but sometimes there was an error that user lighdm has running processes and therefore the home directory can't be changed. It's possible to kill these processes by sudo pkill -u lightdm without shutting down lightdm – but I'm not sure about the implications. Whereas cleanly shutting down lighdm by sudo rc-service lightdm stop shuts down the graphical environment and is therefor not suitable in a post-upgrade script.

  • Just for the record, "lightdm-gtk-greeter" also has accessibility checkboxes in the top bar. Contrary to "slick-greeter", they are not stored in gsettings and seem not supposed to be persistent.

The second commit adds elogind support for lightdm greeters. This allows to use the shutdown options in the top right corner of "slick-greeter" and "lightdm-gtk-greeter". The line is taken from pam "base-session" [5].

On the "pkgrel": I bumped at the first commit only. At postmarketOS every single commit needs to bump the "pkgrel" but here I was not sure.

Cc maintainer @ncopa

Merge request reports