Elogind: Difference between revisions

From Alpine Linux
(added to Desktop category, minor style changes)
(mention PAM requirement for enviroment to work)
Line 34: Line 34:


If the output is <code>No session available.</code>, such as in the case of launching Sway from tty, suspend and many other functionality will not work.  The user then must configure a display manager such as {{Pkg|greetd}}, [[SDDM]] or {{Pkg|lightdm|LightDM}}.
If the output is <code>No session available.</code>, such as in the case of launching Sway from tty, suspend and many other functionality will not work.  The user then must configure a display manager such as {{Pkg|greetd}}, [[SDDM]] or {{Pkg|lightdm|LightDM}}.
=== PAM ===
To use the XDG enviroment variables from elogind [[PAM]] has to be set up.


== See also ==
== See also ==

Revision as of 21:10, 16 June 2023

elogind is a login manager and provides support for

  • setting up necessary permissions for the desktop environment or window manager
  • handling poweroff, reboot, suspend and hibernate via loginctl command

Installation

# apk add elogind polkit-elogind

  1. rc-update add elogind
  2. rc-service elogind start

Configuration

logind.conf

Edit /etc/elogind/logind.conf to configure handling of power events, such as suspending the computer when power button is pressed:

# sed -i 's|#HandlePowerKey=poweroff|HandlePowerKey=suspend|' /etc/elogind/logind.conf

Working with Desktop Environments

If using a Window Manager or Desktop Environment, such as Sway, the user must ensure that login session is correctly configured. When correctly configured, the loginctl command should output the following:

Using Sway and SDDM

~$ loginctl SESSION UID USER SEAT TTY c1 105 sddm seat0 c2 1000 User seat0 tty8 2 sessions listed.

If the output is No session available., such as in the case of launching Sway from tty, suspend and many other functionality will not work. The user then must configure a display manager such as greetd, SDDM or lightdm.

PAM

To use the XDG enviroment variables from elogind PAM has to be set up.

See also