greetd(5)

πŸ’… greetd β€” the configuration file, bestie

okay so this is the greetd(5) man page β€” the File Formats Manual one β€” and it's literally just about the config file. Let's get into it 🫢


✨ NAME ✨

greetd β€” the configuration file. that's it. that's the name section πŸ’–


🌸 DESCRIPTION 🌸

greetd keeps it simple, bestie β€” it uses a plain TOML configuration file to define how it behaves. no chaos, no drama, just TOML ✨


πŸŽ€ CONFIGURATION πŸŽ€

The config is split up into sections, and sections are delimited like this:

[section_name]
config_key = value

Configuration keys can be integer literals, or quote-delimited strings. That's the whole rule. The sections themselves are described below πŸ‘‡

πŸ¦‹ terminal

This section is all about terminal configuration, iykyk.

  • vt = num|"next"|"current" β€” the VT to run on πŸ–₯️. It can be the number of a specific VT, "next" to grab the next available VT, or "current" to just stay wherever greetd was started. Heads up though: the specific VT is evaluated at startup, and does not change during the execution of greetd.
If you're using the current VT or a specific VT, you must make sure there are no other users of that VT. no cap, that's on you πŸ™ˆ. If you're using systemd with autovt and getty, you can handle conflict avoidance in the service unit with "Conflicts=getty@ttyN.service", where N is the VT number.

Using a specific VT with appropriate conflict avoidance is recommended πŸ‘‘

  • switch = true|false β€” whether or not to switch to the VT. If you set it to false and vt isn't the currently active VT, greetd will wait for vt to become active before doing literally anything β€” including starting the greeter 😴. If it's set to true, greetd will switch the current VT to vt. Default is true.
  • ## πŸ’œ general

This section is for general configuration that doesn't fit in the other sections and honestly didn't deserve its own section. humble of it.

  • source_profile = true|false β€” whether or not to source ~/.profile and /etc/profile if they're present when running commands. Defaults to true.
  • runfile = path-to-runfile β€” the location of greetd's runfile, which gets created during the first run to prevent the initial session from being run again on session termination or on greetd restart πŸ”₯.
This file should be in a location that gets cleared during a reboot. fr fr, put it somewhere that resets.

🌈 default_session

This section describes the default session β€” also known as the greeter πŸ’…

  • command = command-line β€” the command-line that greetd will run to start the default session, e.g. "agreety -c sway". The default session starts automatically when no other session is running β€” like when a user session terminates, or when greetd is initially started with no initial session configured. The command-line is run by sh(1), so it accepts standard POSIX shell syntax βœ… See greetd-ipc(7) for info on how a greeter can create sessions.
  • user = user β€” the user to use for running the greeter. Defaults to "greeter".

⭐ initial_session

This optional section describes the initial session, commonly called "auto-login" πŸšͺ✨

The initial session will only be executed during the first run of greetd since boot β€” this is to make sure signing out works properly, and to prevent security issues whenever greetd or the greeter exit. It checks this through the presence of the runfile πŸ‘€

  • command = command-line β€” the command-line that greetd will run to start the initial session, e.g. "sway". The initial session gets started exactly once, when greetd is initially launched. The command-line is run by sh(1), so it accepts standard POSIX shell syntax βœ…
  • user = user β€” the user to use for running the initial session.

πŸ”₯ EXAMPLES πŸ”₯

πŸ“ Regular setup with agreety and sway

[terminal]
vt = 1

[default_session]
command = "agreety -c sway"

🧚 Auto-login

[terminal]
vt = 1

[default_session]
command = "agreety -c sway"

[initial_session]
command = "sway"
user = "john"

πŸ‘‘ AUTHORS πŸ‘‘

Maintained by Kenny Levinsen <contact@kl.wtf> πŸ’Œ. For more info about greetd development, see https://git.sr.ht/~kennylevinsen/greetd β€” go show some love, bestie 🌸


🌟 SEE ALSO 🌟

greetd(1) greetd-ipc(7) β€” go read those next, periodt πŸ’…


and that's the whole page, babe πŸŽ€πŸ’– β€” this was the greetd(5) File Formats Manual page, dated 2025-02-06, and it was literally iconic. mwah πŸ’‹ ✨

πŸ“¦ where this page comes from