greetd
greetd is a minimal, agnostic and flexible login manager daemon which does not make assumptions about what the user wants to launch, should it be console-based or graphical. Any script or program which can be started from the console may be launched by greetd, which makes it particularly suitable for Wayland compositors. It can also launch a greeter to start user sessions, like any other display manager.
Installation
Install the greetdAUR or greetd-gitAUR packages.
The default greetd configuration file is located at /etc/greetd/config.toml
.
PAM-specific configuration is set in /etc/pam.d/greetd
.
Greeters
In order to allow user sessions to be started, greetd requires a greeter. Several greeters are available:
- (the default, shipped with greetdAUR/greetd-gitAUR), a text-based greeter similar to agetty.
- dlm (provided by ), an fbdev greeter.
- ddlm (provided by ), an fbdev greeter. Enhanced/extended version of .
- gtkgreet (provided by /greetd-gtkgreet-gitAUR), a GTK greeter.
- wlgreet (provided by by greetd-wlgreetAUR/), a Wayland greeter.
- tuigreet (provided by ), a console UI greeter.
- qtgreet (provided by ), a Qt greeter.
Starting greetd
Enable so greetd will be started at boot.
Greeter configuration
Configuring the greeter run by greetd is done using the option in the section in /etc/greetd/config.toml
.
The included greeter will be used if no changes are made. Also see #agreety.
By default, greeters are run as the user. This can be changed by editing the option in the section of the configuration file and replacing another_user with the chosen user:
... [default_session] user = "another_user" ...
Make sure the ownership of the /etc/greetd
directory is set accordingly.
agreety
This is the default greeter. It is launched by greetd with the configuration file set as follows:
... [default_session] command = "agreety --cmd $SHELL" ...
agreety can launch any arbitrary command once a user logs in. For example, in order to start Sway, replace $SHELL
in the example above with .
gtkgreet
In order to run, gtkgreet needs a compositor. For the full experience, a compositor with support is required but others can work. As such, it is recommended to use , but something like can also be used. Examples for both cage and sway are provided below.
In order to specify which login environments can be started by gtkgreet, list them in . For example:
sway bash
You can also invoke gtkgreet with the parameter, replacing mycommand with the desired program (for example, or ). Do so in the below compositor examples as desired.
Using cage
Install and set the option as follows:
... [default_session] command = "cage gtkgreet" ...
Using sway
Install . When using Sway, it must be terminated once the user logs in. For that purpose, a specific configuration file must be created, for example in /etc/greetd/sway-config
, with the following content:
Then, greetd must be set to start Sway with the configuration file above. Set the option as follows:
... [default_session] command = "sway --config /etc/greetd/sway-config" ...
wlgreet
In order to start wlgreet, a compositor with is required. Follow the steps required to set up gtkgreet with Sway as described above but use the following for /etc/greetd/sway-config
instead:
tuigreet
tuigreet does not require any special setup, just set the option as follows:
... [default_session] command = "tuigreet --cmd sway" ...
will display customization options.
ddlm
ddlm does not require any special setup, just set the option as follows:
... [default_session] command = "ddlm --target sway" ...
qtgreet
In order to use qtgreet, you need a WLR based compositor (e.g. wayfireAUR, ).
Tips and tricks
Enabling autologin
If you want a user to be logged in automatically, an section must be defined in /etc/greetd/config.toml
:
... [initial_session] command = "sway" user = "myuser" ...
The option may contain the name of any executable file. In the example above, Sway will be started by at boot and gtkgreet will be launched after the user logs out.
If you do not want to use greetd and always want autologin to be enabled, see autologin.
Run local programs
Add your PATH to , or the DE called by greetd will not be able to run local programs. Greetd will not have access to or , so do not define the PATH there.
~/.profile
export PATH="$HOME/.local/bin:$PATH"