1greetd(5) File Formats Manual greetd(5)
2
3
4
6 greetd - configuration file
7
9 greetd uses a simple TOML configuration file to define its behavior.
10
12 The configuration is divided into sections. Sections are delimited like
13 so:
14
15 [section_name]
16 config_key = value
17
18 Configuration keys can be integer literals, or quote-delimited strings.
19 The configuration sections are described below.
20
21 terminal
22 This section contains terminal configuration.
23
24 vt = num|"next"|"current"
25 The VT to run on. Can be the number of a specific VT, "next" to se‐
26 lect the next available VT, or "current" to stay wherever greetd
27 was started. The specific VT is evaluated at startup, and does not
28 change during the execution of greetd.
29
30 If using the current or a specific VT, you must ensure that there
31 are no other users of that VT. If using systemd with autovt and
32 getty, conflict avoidance can be handled in the service unit with
33 "Conflicts=getty@ttyN.service", where N is the VT number.
34
35 Use of a specific VT with appropriate conflict avoidance is recom‐
36 mended.
37
38 switch = true|false
39 Whether or not to switch to vt.
40
41 If set to false and vt is not currently active VT, greetd will wait
42 for vt to become active, before doing anything including starting
43 greeter.
44
45 If set to true, greetd will switch current VT to vt,
46
47 Default is true.
48
49 general
50 This section contains general configuration that does not fit in other
51 sections nor deserved its own section.
52
53 source_profile = true|false
54 Whether or not to source ~/.profile and /etc/profile if present
55 when running commands. Defaults to true.
56
57 runfile = path-to-runfile
58 Location of greetd's runfile that is created during the first run
59 to prevent the initial session from being run again on session ter‐
60 mination or on greetd restart.
61
62 This file should be in a location that is cleared during a reboot.
63
64 default_session
65 This section describes the default session, also referred to as the
66 greeter.
67
68 command = command-line
69 The command-line that greetd will run to start the default session,
70 e.g. "agreety -c sway". The default session is automatically
71 started when no other session is running, such as when a user ses‐
72 sion terminates or when greetd is initially started with no initial
73 session configured.
74
75 The command-line is run by sh(1), and as such accepts standard
76 POSIX shell syntax.
77
78 See greetd-ipc(7) for information on how a greeter can create ses‐
79 sions.
80
81 user = user
82 The user to use for running the greeter. Defaults to "greeter".
83
84 initial_session
85 This optional section describes the initial session, commonly referred
86 to as "auto-login".
87
88 The initial session will only be executed during the first run of
89 greetd since boot in order to ensure signing out works properly and to
90 prevent security issues whenever greetd or the greeter exit. This is
91 checked through the presence of the runfile.
92
93 command = command-line
94 The command-line that greetd will run to start the initial session,
95 e.g. "sway". The initial session will be started exactly once when
96 greetd is initially launched.
97
98 The command-line is run by sh(1), and as such accepts standard
99 POSIX shell syntax.
100
101 user = user
102 The user to use for running the initial session.
103
105 Regular setup with agreety and sway
106 [terminal]
107 vt = 1
108
109 [default_session]
110 command = "agreety -c sway"
111
112 Auto-login
113 [terminal]
114 vt = 1
115
116 [default_session]
117 command = "agreety -c sway"
118
119 [initial_session]
120 command = "sway"
121 user = "john"
122
124 Maintained by Kenny Levinsen <contact@kl.wtf>. For more information
125 about greetd development, see https://git.sr.ht/~kennylevinsen/greetd.
126
128 greetd(1) greetd-ipc(7)
129
130
131
132 2023-05-03 greetd(5)