The officially official Devuan Forum!

You are not logged in.

#1 2018-08-04 08:27:18

fred43
Member
Registered: 2018-08-03
Posts: 13  

HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

Preamble:

IMHO, using "elogind and friends" has the potential of making life a
little bit easier for the Devuan nosystemd-DE developers/maintainers.

Have you swapped out 'slim' for 'lightdm' (with libpam-elogind) and
consequently the reboot and shutdown does not work as advertised?

Don't despair, it can be fixed in 3 easy steps.

-----
Do the following as Root

Step 1:
Check that
   libpam-elogind, elogind, libelogind0, libpolkit-backend-elogind-1-0,
   libpolkit-gobject-elogind-1-0 and policykit-1
is *installed*.

and make sure that
   consolekit, libpolkit-backend-consolekit-1-0,
   libpolkit-gobject-consolekit-1-0, libck-connector0 and
   libpam-ck-connector
is *uninstalled*

Step 2:
Then go to /etc/pam.d/ and edit the file lightdm-greeter to look thus:

   #added '#'
   #session   optional pam_systemd.so
   #added a new line
   session   optional pam_elogind.so

Step 3:
Reboot the system
-----

You can now reboot or shutdown from the Lighdm or from the Xfce4 DE just
like in the olden days but now with "elogind and friends" in place. BTW,
the command 'who' is also working correctly.

Offline

#2 2018-08-04 09:18:04

golinux
Administrator
Registered: 2016-11-25
Posts: 3,132  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

Very nice first post!  Thank you.  I imagine that quite a few users will get sent here to sort things out.

Hope you don't mind that I played a bit with the formatting to make it easier to read.

Offline

#3 2018-08-04 13:04:08

fred43
Member
Registered: 2018-08-03
Posts: 13  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

I don't mind at all. Thank you.

Offline

#4 2018-08-04 18:43:12

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

I can verify this as I just performed a LightDM with XFCE install myself.  I first installed LightDM and then the xfce4 package.  Had the normal permission problems associated with libpolkit, I then replaced consolkit with elogind and all is well. 

I have tested both LightDM + elogind with KDE as well as XFCE and both work.  I wonder if LightDM + elogind works with MATE, anyone test it?  From looking at the release notes, it appears slim is who likes consolekit.  It would be nice to completely replace consolekit with elogind.

Offline

#5 2018-08-05 11:09:45

fred43
Member
Registered: 2018-08-03
Posts: 13  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

Thanks for the feedback.

Yes, it would be nice and helpful if a MATE user could verify that the outlined procedure also works for that environment.

Offline

#6 2018-08-09 20:13:28

Andre4freedom
Member
Registered: 2017-11-15
Posts: 133  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

Hello fred43 and all
fred43, you are a genius, your solution works perfectly well on a fresh ascii-install. I tested it with Cinnamon and OpenRC. I'm delighted the lightdm is the display manager by default now.
Thank you, well done!

Offline

#7 2018-08-09 21:24:17

golinux
Administrator
Registered: 2016-11-25
Posts: 3,132  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

Andre4freedom wrote:

Hello fred43 and all
fred43, you are a genius, your solution works perfectly well on a fresh ascii-install. I tested it with Cinnamon and OpenRC. I'm delighted the lightdm is the display manager by default now.
Thank you, well done!

It is the default for Cinnamon.  Xfce uses slim etc.

Offline

#8 2018-10-21 10:20:04

narcisgarcia
Member
Registered: 2018-10-19
Posts: 7  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

https://dev1galaxy.org/viewtopic.php?pid=12356

I installed Devuan 2 + MATE, which defaults to Slim display manager.
To see users list at the graphic login interface, I needed to switch to LightDM, and it worked with only this command:

sudo apt-get install lightdm libpolkit-backend-elogind-1-0

(reboot and shutdown work)
Today I've edited /etc/pam.d/lightdm-greeter to replace the use of pam_systemd.so by pam_elogind.so , although I don't know what it is necessary for.

Devuan 2 needs some packages fix to allow a cleaner switch between Slim and LightDM:

  • lightdm should deped on libpolkit-backend-elogind-1-0

  • slim should deped on libpolkit-backend-consolekit-1-0

  • task-mate-desktop should depend on any of libpolkit-backend-consolekit-1-0 | libpolkit-backend-elogind-1-0

Without this last fix, installing libpolkit-backend-elogind-1-0 it's also removed task-mate-desktop and some other packages are suggested for autoremoval: gnome-orca speech-dispatcher libreoffice-gtk3 etc.

Last edited by narcisgarcia (2018-10-21 10:20:37)

Offline

#9 2018-10-21 23:55:21

dxrobertson
Member
Registered: 2017-05-04
Posts: 232  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

From various user installs that point to the fact, is it as simple that LightDM=elogind and slim=consolekit?  Is it that the login manager is what really matters in regards to the polkit, and the subsequent desktop environment doesnt care?  Has anyone experienced an install combination that doest adhere to this rule?

Offline

#10 2018-10-22 06:26:06

Debuser2018
Member
From: Muvattupuzha
Registered: 2018-01-24
Posts: 117  
Website

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

Thank you for the HOWTO. I have to install lxdm to get power/restart buttons work with Cinnamon. Now lightdm works. I did have to edit lightdm configuration to achieve the desired options, though.
https://dev1galaxy.org/viewtopic.php?pid=12387#p12387

Offline

#11 2018-11-11 02:58:13

pcalvert
Member
Registered: 2017-05-15
Posts: 191  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

fred43 wrote:

Step 1:
Check that
   libpam-elogind, elogind, libelogind0, libpolkit-backend-elogind-1-0,
   libpolkit-gobject-elogind-1-0 and policykit-1
is *installed*.

I am using LightDM and I don't have those packages installed, except for policykit-1. I am also using Xfce, and the "Restart" and "Shut Down" buttons work fine. Is there something else broken that I've missed?

Phil


Freespoke is a new search engine that respects user privacy and does not engage in censorship.

Offline

#12 2018-11-11 08:38:04

yeti
Member
From: I'm not here: U R halucinating
Registered: 2017-02-23
Posts: 304  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

 ,------+-----.  
 |   Please   |  
 | wiki this. |  
 `------+-----´   
     _  |  _
    ò.ó/|\°v°
   (|_|   |_|\
----^-^---^-^---

<𝚋𝚘𝚍𝚢 𝚘𝚗𝚕𝚘𝚊𝚍='𝚍𝚘𝚌𝚞𝚖𝚎𝚗𝚝.𝚋𝚘𝚍𝚢.𝚒𝚗𝚗𝚎𝚛𝙷𝚃𝙼𝙻="𝙳𝚒𝚜𝚊𝚋𝚕𝚎 𝙹𝚂!";'>
𝔓𝔩𝔢𝔞𝔰𝔢 𝔩𝔢𝔞𝔳𝔢 𝔶𝔬𝔲𝔯 𝔣𝔞𝔲𝔩𝔱𝔰 𝔦𝔫 𝔱𝔥𝔢 𝔰𝔢𝔠𝔱𝔦𝔬𝔫 𝔟𝔢𝔩𝔬𝔴 𝔞𝔫𝔡 𝔡𝔬𝔫'𝔱 𝔣𝔬𝔯𝔤𝔢𝔱 𝔱𝔬 𝔲𝔫𝔰𝔲𝔟𝔰𝔠𝔯𝔦𝔟𝔢!

Offline

#13 2018-11-13 00:23:27

pcalvert
Member
Registered: 2017-05-15
Posts: 191  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

I thought I should post a follow-up to my previous message to explain my situation a little better. Back in 2017 I created a customized live CD based on Debian Jessie, but without systemd. While testing my live CD, I discovered that the "Restart" and "Shut Down" buttons in Xfce were not working properly. Since I built my live CD with "Recommends" (recommended packages) disabled, I figured that I must be missing some semi-important package(s). After a little research, I guessed that installing policykit-1 might fix the problem, and I was right.

To reiterate, this solution worked for me:

# aptitude update
# aptitude install policykit-1

That's it!

That systemd-free Debian Jessie was installed in a VM, and later on it was dist-upgraded to Devuan ASCII. The upgrade went smoothly, and afterward LightDM continued to work normally. I don't know what the best solution to this problem is, but I thought I should chime in with my experience in case the information is helpful to someone.

Phil


Freespoke is a new search engine that respects user privacy and does not engage in censorship.

Offline

#14 2019-09-14 02:48:47

bgstack15
Member
Registered: 2018-02-04
Posts: 205  

Re: HOWTO: lightdm (with libpam-elogind) + xfce4 (ASCII/Stable)

This can be shrunk into a few lines:

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

Unfortunately my normal mitigations for automating the apt-get are not recommended, because of the propensity for policykit and the elogind packages to conflict with major packages, and the admin should always review what is about to be removed.
If you truly want an unattended process for this task:

sudo apt-get install -y -q -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -o Dpkg::Options::="--force-overwrite" --no-install-recommends libpolkit-gobject-elogind-1-0 policykit-1
sed -i -r -e '/session\s+optional\s+pam_systemd\.so/s/systemd/elogind/;' /etc/pam.d/lightdm-greeter

This space intentionally left blank.

Offline

Board footer