Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Devuan with lightdm and xfce will not let user reboot or shutdown from user session

I use Devuan GNU+Linux on most of my desktop systems now. I use XFCE, but I have my daily driver on Fluxbox because I can. Well, I think a recent change that happened, or else I only recently noticed it, was that when I use Devuan ceres with lightdm (instead of slim) with xfce4, the user cannot effectively select "Restart" or "Shutdown" from the menu. The options may nor may not be enabled, but selecting either of them just return the user to the login screen. For some random reason I was searching for "consolekit" on the Devuan forum and stumbled across an interesting title: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable) / Documentation / Dev1 Galaxy Forum After adapting the instructions for ceres (unstable) release, I am pleased to announce the successful results! The steps that I took are the following. Observe that they are briefer than the instructions provided by the source. Trying to add or remove other packages than the two listed here on my system caused apt-get to want to remove some crazy sets of packages which I obviously wanted to keep

sudo apt-get install --no-install-recommends libpolkit-gobject-elogind-1-0 policykit-1 lightdm lightdm-gtk-greeter
# and adjust pam:
sed -i -r -e '/session\s+optional\s+pam_systemd.so/s/systemd/elogind/;' /etc/pam.d/lightdm-greeter

I chose to reboot to ensure lightdm inherited the new pam settings. And, then my user could shut down from the user session! It's the little things, isn't it...

Comments