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 to run to start the default session, e.g. "agreety
70 -c sway". The default session is automatically started when no
71 other session is running, such as when user session terminate, and
72 when greetd is initially started with no initial session config‐
73 ured.
74
75 See greetd-ipc(7) for information on how a greeter can create ses‐
76 sions.
77
78 user = user
79 The user to use for running the greeter. Defaults to "greeter".
80
81 initial_session
82 This optional section describes the initial session, commonly referred
83 to as "auto-login".
84
85 The initial session will only be executed during the first run of
86 greetd since boot in order to ensure signing out works properly and to
87 prevent security issues whenever greetd or the greeter exit. This is
88 checked through the presence of the runfile.
89
90 command = command-line
91 The command-line to run to start the initial session, e.g. "sway".
92 The initial session will be run when exactly once when greetd is
93 initially launched.
94
95 user = user
96 The user to use for running the initial session.
97
99 Regular setup with agreety and sway
100 [terminal]
101 vt = 1
102
103 [default_session]
104 command = "agreety -c sway"
105
106 Auto-login
107 [terminal]
108 vt = 1
109
110 [default_session]
111 command = "agreety -c sway"
112
113 [initial_session]
114 command = "sway"
115 user = "john"
116
118 Maintained by Kenny Levinsen <contact@kl.wtf>. For more information
119 about greetd development, see https://git.sr.ht/~kennylevinsen/greetd.
120
122 greetd(1) greetd-ipc(7)
123
124
125
126 2022-05-03 greetd(5)