Greetd: Difference between revisions
Prabuanand (talk | contribs) m (Added category) |
Prabuanand (talk | contribs) (added complete example for gtkgreet greeter with links to sway lauch wrapper script) |
||
Line 4: | Line 4: | ||
This article focuses on alpine specific instructions. It is recommended to read the [https://man.sr.ht/~kennylevinsen/greetd/ greetd wiki] first. | This article focuses on alpine specific instructions. It is recommended to read the [https://man.sr.ht/~kennylevinsen/greetd/ greetd wiki] first. | ||
This page shows the grpahical greeter gtkgreet which is packaged as {{pkg|greetd-gtkgreet}}. | |||
== Installation == | == Installation == | ||
Line 13: | Line 14: | ||
{{cmd|# apk add {{pkg|greetd-gtkgreet}}}} | {{cmd|# apk add {{pkg|greetd-gtkgreet}}}} | ||
Install a lightweight wayland compositor to be used with greetd login session. | Install a lightweight wayland compositor to be used with greetd login session.(If using [[Sway]], no need for {{pkg|cage}}) | ||
{{cmd|# apk add {{pkg|cage}}}} | {{cmd|# apk add {{pkg|cage}}}} | ||
== Configuration == | == Configuration == | ||
Graphical greeters | Graphical greeters like gtkgreet require either [[seatd]] or [[elogind]]. When you use <code>seatd</code> with a graphical greeter it needs the <code>seatd</code> group: | ||
{{cmd|# adduser greetd seat}} | {{cmd|# adduser greetd seat}} | ||
Depending on whether [[seatd]] or [[elogind]] is used, | Depending on whether [[seatd]] or [[elogind]] is used, set <code>rc_need=seatd</code>or <code>rc_need=elogind</code> in the following file: | ||
{{Cat|/etc/conf.d/greetd|<nowiki>rc_need=seatd | {{Cat|/etc/conf.d/greetd|<nowiki>rc_need=seatd | ||
</nowiki>}} | </nowiki>}} | ||
If using cage, the config file appears as follows: | |||
{{Cat|/etc/greetd/config.toml|<nowiki>[default_session] | {{Cat|/etc/greetd/config.toml|<nowiki>[default_session] | ||
command = "cage -s -- gtkgreet" | command = "cage -s -- gtkgreet" | ||
user = "greetd" | user = "greetd" | ||
</nowiki>}} | |||
Instead of {{pkg|cage}}, [[sway]] or any [[wayland]] compositor can be used: | |||
{{Cat|/etc/greetd/config.toml|<nowiki>[default_session] | |||
command = "sway --config /etc/greetd/sway-config" | |||
user = "greetd" | |||
</nowiki>}} | |||
To use sway, create a dedicated sway config that runs the greeter, and terminates when it dies: | |||
{{cat|/etc/greetd/sway-config|<nowiki>exec "gtkgreet -l -s /etc/greetd/gtkgreet.css; swaymsg exit" | |||
</nowiki>}} | </nowiki>}} | ||
Edit gtkgreet list of login environments, which is by default read from {{Path|/etc/greetd/environments}}. The below example shows Sway [[Sway#Starting_sway|wrapper script]]. | |||
{{Cat|/etc/greetd/environments|<nowiki> | {{Cat|/etc/greetd/environments|<nowiki>sway-run | ||
</nowiki>}} | </nowiki>}} | ||
Revision as of 07:27, 11 December 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. This page shows the grpahical greeter gtkgreet which is packaged as greetd-gtkgreet.
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.(If using Sway, no need for cage)
# apk add cage
Configuration
Graphical greeters like gtkgreet require either 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, set rc_need=seatd
or rc_need=elogind
in the following file:
Contents of /etc/conf.d/greetd
If using cage, the config file appears as follows:
Contents of /etc/greetd/config.toml
Instead of cage, sway or any wayland compositor can be used:
Contents of /etc/greetd/config.toml
To use sway, create a dedicated sway config that runs the greeter, and terminates when it dies:
Contents of /etc/greetd/sway-config
Edit gtkgreet list of login environments, which is by default read from /etc/greetd/environments. The below example shows Sway wrapper script.
Contents of /etc/greetd/environments
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