greetd

From Alpine Linux
Revision as of 04:02, 24 September 2024 by Prabuanand (talk | contribs) (Added category)


greetd is a minimal and flexible login manager daemon that makes no assumptions about what you want to launch.

This article focuses on alpine specific instructions. It is recommended to read the greetd wiki first.

Installation

greetd needs to be combined with a greeter. You can find a list of available greeters here: greetd-*. Install the main package and the greeter you selected:

# apk add greetd

Let us use greetd-gtkgreet as an example:

# apk add greetd-gtkgreet

Install a lightweight wayland compositor to be used with greetd login session.

# apk add cage

Configuration

Graphical greeters (like gtkgreet) require seatd or elogind. When you use seatd with a graphical greeter it needs the seatd group:

# adduser greetd seat

Depending on whether seatd or elogind is used, edit the following file:

Contents of /etc/conf.d/greetd

rc_need=seatd

Instead of cage, sway or any wayland compositor can be used

Contents of /etc/greetd/config.toml

[default_session] command = "cage -s -- gtkgreet" user = "greetd"

To start sway session for the user, you might want to start a D-Bus session when the greetd session is started.

Contents of /etc/greetd/environments

# Launch Sway with a D-Bus server available, use: dbus-run-session -- sway

Once you have completed the above configuration, Enable and start greetd:

# rc-update add greetd # rc-service greetd start

For text based greeters you want to make sure that vt is set in:

Contents of /etc/greetd/config.toml

[terminal] # The VT to run the greeter on. Can be "next", "current" or a number # designating the VT. vt = 7

See Also