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 either XFCE, but I have my daily driver on Fluxbox because I can.

Well, I think 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
# 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…

Lightdm crashes after dnf update

For a few months this year, running “dnf update” caused my display manager to malfunction. It it a terribly annoying problem. In the past, once, my /usr/bin/X was not installed. I don’t know how that happened.

This time, lightdm was not starting due to some error message which is only visible if you turn on logging/debugging and go find the right log.

lightdm gtk:error:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed

Thankfully, the issue was researchable online although it did take a while and I bounced around different distros’ fora to get to the answer.
For Fedora, the answer simply was:

sudo dnf -y reinstall shared-mime-info

References

Web searches

  1. Google: fedora lightdm gtk:error:gtkiconhelper.c:494:ensure_surface_for_gicon: assertion failed

Web links

  1. https://forums.fedoraforum.org/showthread.php?280639-Icons-and-images-disappeared-can-t-login-in-gnome-shell
  2. https://bugzilla.redhat.com/show_bug.cgi?id=1002782
  3. points to the next two links https://bbs.archlinux.org/viewtopic.php?id=223801
  4. what actually solved it http://forum.tinycorelinux.net/index.php?topic=4389.0
  5. same kind of error https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1627564