Greetd: Difference between revisions

From Alpine Linux
(moved greetd content from sway to greetd. fixed wiki tags)
Line 9: Line 9:
greetd needs to be combined with a greeter. You can find a list of available greeters here: {{pkg|greetd-*}}. Install the main package and the greeter you selected:
greetd needs to be combined with a greeter. You can find a list of available greeters here: {{pkg|greetd-*}}. Install the main package and the greeter you selected:


{{cmd|# apk add {{pkg|greetd}} <greeter>}}
{{cmd|# apk add {{pkg|greetd}} }}
Let us use {{pkg|greetd-gtkgreet}} as an example:


You need to [[#Configuration|configure]] greetd before you can start it.
{{cmd|# apk add {{pkg|greetd-gtkgreet}}}}
Install a lightweight wayland compositor to be used with greetd login session.  
{{cmd|# apk add {{pkg|cage}}}}


Enable and start greetd:
== Configuration ==
{{cmd|<nowiki># rc-update add greetd
 
# rc-service greetd start</nowiki>}}
Graphical greeters (like gtkgreet) require [[seatd]] or [[elogind]].  When you use <code>seatd</code> with a graphical greeter it needs the <code>seatd</code> group:
{{cmd|# adduser greetd seat}} 
 
Depending on whether [[seatd]] or [[elogind]] is used, edit the following file:
{{Cat|/etc/conf.d/greetd|<nowiki>rc_need=seatd
</nowiki>}}
 
Instead of cage, [[sway]] or any [[wayland]] compositor can be used
{{Cat|/etc/greetd/config.toml|<nowiki>[default_session]
command = "cage -s -- gtkgreet"
user = "greetd"
</nowiki>}}


== Configuration ==
To start sway session for the user, you might want to start a [[D-Bus#D-Bus_session|D-Bus session]] when the greetd session is started.


Some graphical greeters (like gtkgreet) require <code>seatd</code> or [[elogind]]. Add <code>rc_need=seatd</code> or <code>rc_need=elogind</code> to {{path|/etc/conf.d/greetd}}.
{{Cat|/etc/greetd/environments|<nowiki># Launch Sway with a D-Bus server available, use:
When you use <code>seatd</code> with a graphical greeter it needs the <code>seatd</code> group:
dbus-run-session -- sway
{{cmd|# adduser greetd seat}}
</nowiki>}}


For text based greeters you want to make sure that <code>vt</code> is set to <code>7</code> in {{path|/etc/greetd/config.toml}}. (This will be the default in alpine 3.20)
Once you have completed the above configuration, Enable and start greetd:
{{cmd|<nowiki># rc-update add greetd
# rc-service greetd start</nowiki>}}


You might want to start a [[D-Bus#D-Bus_session|D-Bus session]] when the greetd session is started.  
For text based greeters you want to make sure that <code>vt</code> is set in:
{{Cat|/etc/greetd/config.toml|<nowiki>
[terminal]
# The VT to run the greeter on. Can be "next", "current" or a number
# designating the VT.
vt = 7
</nowiki>}}


== See Also ==
== See Also ==

Revision as of 08:59, 11 September 2024


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