]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/logind.conf.xml
core: add RootImage= setting for using a specific image file as root directory for...
[thirdparty/systemd.git] / man / logind.conf.xml
CommitLineData
90558f31 1<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
8fa365e5 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
8fa365e5
LP
4
5<!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
8fa365e5
LP
13 (at your option) any later version.
14
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5430f7f2 18 Lesser General Public License for more details.
8fa365e5 19
5430f7f2 20 You should have received a copy of the GNU Lesser General Public License
8fa365e5
LP
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
d3fae78f 24<refentry id="logind.conf" conditional='ENABLE_LOGIND'
798d3a52
ZJS
25 xmlns:xi="http://www.w3.org/2001/XInclude">
26 <refentryinfo>
27 <title>logind.conf</title>
28 <productname>systemd</productname>
29
30 <authorgroup>
31 <author>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
36 </author>
37 </authorgroup>
38 </refentryinfo>
39
40 <refmeta>
41 <refentrytitle>logind.conf</refentrytitle>
42 <manvolnum>5</manvolnum>
43 </refmeta>
44
45 <refnamediv>
46 <refname>logind.conf</refname>
47 <refname>logind.conf.d</refname>
48 <refpurpose>Login manager configuration files</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
12b42c76
TG
52 <para><filename>/etc/systemd/logind.conf</filename></para>
53 <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
798d3a52 54 <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
12b42c76 55 <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
798d3a52
ZJS
56 </refsynopsisdiv>
57
58 <refsect1>
59 <title>Description</title>
60
e93549ef
ZJS
61 <para>These files configure various parameters of the systemd
62 login manager,
63 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
64 </para>
798d3a52
ZJS
65 </refsect1>
66
e93549ef 67 <xi:include href="standard-conf.xml" xpointer="main-conf" />
798d3a52
ZJS
68
69 <refsect1>
70 <title>Options</title>
71
72 <para>All options are configured in the
73 <literal>[Login]</literal> section:</para>
74
75 <variablelist>
76
77 <varlistentry>
78 <term><varname>NAutoVTs=</varname></term>
79
80 <listitem><para>Takes a positive integer. Configures how many
81 virtual terminals (VTs) to allocate by default that, when
82 switched to and are previously unused,
83 <literal>autovt</literal> services are automatically spawned
84 on. These services are instantiated from the template unit
85 <filename>autovt@.service</filename> for the respective VT TTY
86 name, for example, <filename>autovt@tty4.service</filename>.
87 By default, <filename>autovt@.service</filename> is linked to
88 <filename>getty@.service</filename>. In other words, login
89 prompts are started dynamically as the user switches to unused
90 virtual terminals. Hence, this parameter controls how many
91 login <literal>gettys</literal> are available on the VTs. If a
92 VT is already used by some other subsystem (for example, a
93 graphical login), this kind of activation will not be
94 attempted. Note that the VT configured in
95 <varname>ReserveVT=</varname> is always subject to this kind
96 of activation, even if it is not one of the VTs configured
97 with the <varname>NAutoVTs=</varname> directive. Defaults to
98 6. When set to 0, automatic spawning of
99 <literal>autovt</literal> services is
100 disabled.</para></listitem>
101 </varlistentry>
102
103 <varlistentry>
104 <term><varname>ReserveVT=</varname></term>
105
106 <listitem><para>Takes a positive integer. Identifies one
107 virtual terminal that shall unconditionally be reserved for
108 <filename>autovt@.service</filename> activation (see above).
109 The VT selected with this option will be marked busy
110 unconditionally, so that no other subsystem will allocate it.
111 This functionality is useful to ensure that, regardless of how
112 many VTs are allocated by other subsystems, one login
113 <literal>getty</literal> is always available. Defaults to 6
114 (in other words, there will always be a
115 <literal>getty</literal> available on Alt-F6.). When set to 0,
116 VT reservation is disabled.</para></listitem>
117 </varlistentry>
118
119 <varlistentry>
120 <term><varname>KillUserProcesses=</varname></term>
121
65eb37f8
ZJS
122 <listitem><para>Takes a boolean argument. Configures whether the processes of a
123 user should be killed when the user logs out. If true, the scope unit
124 corresponding to the session and all processes inside that scope will be
4f25723c 125 terminated. If false, the scope is "abandoned", see
65eb37f8 126 <citerefentry><refentrytitle>systemd.scope</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
921f831d
ZJS
127 and processes are not killed. Defaults to <literal>yes</literal>,
128 but see the options <varname>KillOnlyUsers=</varname> and
129 <varname>KillExcludeUsers=</varname> below.</para>
65eb37f8
ZJS
130
131 <para>In addition to session processes, user process may run under the user
132 manager unit <filename>user@.service</filename>. Depending on the linger
133 settings, this may allow users to run processes independent of their login
134 sessions. See the description of <command>enable-linger</command> in
135 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
136 </para>
137
138 <para>Note that setting <varname>KillUserProcesses=yes</varname>
798d3a52 139 will break tools like
65eb37f8
ZJS
140 <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>
141 and
142 <citerefentry project='die-net'><refentrytitle>tmux</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
143 unless they are moved out of the session scope. See example in
144 <citerefentry><refentrytitle>systemd-run</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
145 </para></listitem>
798d3a52
ZJS
146 </varlistentry>
147
148 <varlistentry>
149 <term><varname>KillOnlyUsers=</varname></term>
150 <term><varname>KillExcludeUsers=</varname></term>
151
921f831d
ZJS
152 <listitem><para>These settings take space-separated lists of usernames that override
153 the <varname>KillUserProcesses=</varname> setting. A user name may be added to
154 <varname>KillExcludeUsers=</varname> to exclude the processes in the session scopes of
155 that user from being killed even if <varname>KillUserProcesses=yes</varname> is set. If
156 <varname>KillExcludeUsers=</varname> is not set, the <literal>root</literal> user is
157 excluded by default. <varname>KillExcludeUsers=</varname> may be set to an empty value
158 to override this default. If a user is not excluded, <varname>KillOnlyUsers=</varname>
159 is checked next. If this setting is specified, only the session scopes of those users
160 will be killed. Otherwise, users are subject to the
161 <varname>KillUserProcesses=yes</varname> setting.</para></listitem>
798d3a52
ZJS
162 </varlistentry>
163
164 <varlistentry>
165 <term><varname>IdleAction=</varname></term>
166
167 <listitem><para>Configures the action to take when the system
168 is idle. Takes one of
169 <literal>ignore</literal>,
170 <literal>poweroff</literal>,
171 <literal>reboot</literal>,
172 <literal>halt</literal>,
173 <literal>kexec</literal>,
174 <literal>suspend</literal>,
175 <literal>hibernate</literal>,
176 <literal>hybrid-sleep</literal>, and
177 <literal>lock</literal>.
178 Defaults to <literal>ignore</literal>.</para>
179
180 <para>Note that this requires that user sessions correctly
181 report the idle status to the system. The system will execute
182 the action after all sessions report that they are idle, no
183 idle inhibitor lock is active, and subsequently, the time
184 configured with <varname>IdleActionSec=</varname> (see below)
185 has expired.</para>
186 </listitem>
187 </varlistentry>
188
189 <varlistentry>
190 <term><varname>IdleActionSec=</varname></term>
191
192 <listitem><para>Configures the delay after which the action
193 configured in <varname>IdleAction=</varname> (see above) is
194 taken after the system is idle.</para></listitem>
195 </varlistentry>
196
197 <varlistentry>
198 <term><varname>InhibitDelayMaxSec=</varname></term>
199
200 <listitem><para>Specifies the maximum time a system shutdown
201 or sleep request is delayed due to an inhibitor lock of type
202 <literal>delay</literal> being active before the inhibitor is
203 ignored and the operation executes anyway. Defaults to
204 5.</para></listitem>
205 </varlistentry>
206
207 <varlistentry>
208 <term><varname>HandlePowerKey=</varname></term>
209 <term><varname>HandleSuspendKey=</varname></term>
210 <term><varname>HandleHibernateKey=</varname></term>
211 <term><varname>HandleLidSwitch=</varname></term>
212 <term><varname>HandleLidSwitchDocked=</varname></term>
213
05b2a8fd 214 <listitem><para>Controls how logind shall handle the
798d3a52
ZJS
215 system power and sleep keys and the lid switch to trigger
216 actions such as system power-off or suspend. Can be one of
217 <literal>ignore</literal>,
218 <literal>poweroff</literal>,
219 <literal>reboot</literal>,
220 <literal>halt</literal>,
221 <literal>kexec</literal>,
222 <literal>suspend</literal>,
223 <literal>hibernate</literal>,
224 <literal>hybrid-sleep</literal>, and
225 <literal>lock</literal>.
226 If <literal>ignore</literal>, logind will never handle these
227 keys. If <literal>lock</literal>, all running sessions will be
228 screen-locked; otherwise, the specified action will be taken
229 in the respective event. Only input devices with the
230 <literal>power-switch</literal> udev tag will be watched for
231 key/lid switch events. <varname>HandlePowerKey=</varname>
232 defaults to <literal>poweroff</literal>.
233 <varname>HandleSuspendKey=</varname> and
234 <varname>HandleLidSwitch=</varname> default to
235 <literal>suspend</literal>.
236 <varname>HandleLidSwitchDocked=</varname> defaults to
237 <literal>ignore</literal>.
238 <varname>HandleHibernateKey=</varname> defaults to
239 <literal>hibernate</literal>. If the system is inserted in a
240 docking station, or if more than one display is connected, the
241 action specified by <varname>HandleLidSwitchDocked=</varname>
242 occurs; otherwise the <varname>HandleLidSwitch=</varname>
05b2a8fd
ZJS
243 action occurs.</para>
244
245 <para>A different application may disable logind's handling of system power and
246 sleep keys and the lid switch by taking a low-level inhibitor lock
247 ("handle-power-key", "handle-suspend-key", "handle-hibernate-key",
248 "handle-lid-switch"). This is most commonly used by graphical desktop environments
249 to take over suspend and hibernation handling, and to use their own configuration
250 mechanisms. If a low-level inhibitor lock is taken, logind will not take any
251 action when that key or switch is triggered and the <varname>Handle*=</varname>
252 settings are irrelevant.</para></listitem>
798d3a52
ZJS
253 </varlistentry>
254
255 <varlistentry>
256 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
257 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
258 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
259 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
260
05b2a8fd
ZJS
261 <listitem><para>Controls whether actions that <command>systemd-logind</command>
262 takes when the power and sleep keys and the lid switch are triggered are subject
263 to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
2dd67817 264 locks ("handle-*-key"), are always honored, irrespective of this setting.</para>
05b2a8fd
ZJS
265
266 <para>These settings take boolean arguments. If <literal>no</literal>, the
267 inhibitor locks taken by applications are respected. If <literal>yes</literal>,
268 "shutdown", "sleep", and "idle" inhibitor locks are ignored.
798d3a52 269 <varname>PowerKeyIgnoreInhibited=</varname>,
05b2a8fd
ZJS
270 <varname>SuspendKeyIgnoreInhibited=</varname>, and
271 <varname>HibernateKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
272 <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
273 This means that when <command>systemd-logind</command> is handling events by
274 itself (no low level inhibitor locks are taken by another application), the lid
275 switch does not respect suspend blockers by default, but the power and sleep keys
276 do.</para></listitem>
798d3a52
ZJS
277 </varlistentry>
278
9d10cbee
DH
279 <varlistentry>
280 <term><varname>HoldoffTimeoutSec=</varname></term>
281
282 <listitem><para>Specifies the timeout after system startup or
283 system resume in which systemd will hold off on reacting to
a8eaaee7
JE
284 lid events. This is required for the system to properly
285 detect any hotplugged devices so systemd can ignore lid events
9d10cbee
DH
286 if external monitors, or docks, are connected. If set to 0,
287 systemd will always react immediately, possibly before the
288 kernel fully probed all hotplugged devices. This is safe, as
289 long as you do not care for systemd to account for devices
290 that have been plugged or unplugged while the system was off.
291 Defaults to 30s.</para></listitem>
292 </varlistentry>
293
798d3a52
ZJS
294 <varlistentry>
295 <term><varname>RuntimeDirectorySize=</varname></term>
296
297 <listitem><para>Sets the size limit on the
298 <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
299 user who logs in. Takes a size in bytes, optionally suffixed
300 with the usual K, G, M, and T suffixes, to the base 1024
301 (IEC). Alternatively, a numerical percentage suffixed by
302 <literal>%</literal> may be specified, which sets the size
303 limit relative to the amount of physical RAM. Defaults to 10%.
304 Note that this size is a safety limit only. As each runtime
305 directory is a tmpfs file system, it will only consume as much
90558f31
LP
306 memory as is needed.</para></listitem>
307 </varlistentry>
308
c5a11ae2
LP
309 <varlistentry>
310 <term><varname>InhibitorsMax=</varname></term>
311
312 <listitem><para>Controls the maximum number of concurrent inhibitors to permit. Defaults to 8192
313 (8K).</para></listitem>
314 </varlistentry>
315
183e0738
LP
316 <varlistentry>
317 <term><varname>SessionsMax=</varname></term>
318
319 <listitem><para>Controls the maximum number of concurrent user sessions to manage. Defaults to 8192
320 (8K). Depending on how the <filename>pam_systemd.so</filename> module is included in the PAM stack
321 configuration, further login sessions will either be refused, or permitted but not tracked by
322 <filename>systemd-logind</filename>.</para></listitem>
323 </varlistentry>
324
90558f31
LP
325 <varlistentry>
326 <term><varname>UserTasksMax=</varname></term>
327
c06eec15
LP
328 <listitem><para>Sets the maximum number of OS tasks each user may run concurrently. This controls the
329 <varname>TasksMax=</varname> setting of the per-user slice unit, see
90558f31 330 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>
f5058264
TH
331 for details. If assigned the special value <literal>infinity</literal>, no tasks limit is applied.
332 Defaults to 33%, which equals 10813 with the kernel's defaults on the host, but might be smaller in
333 OS containers.</para></listitem>
798d3a52
ZJS
334 </varlistentry>
335
336 <varlistentry>
337 <term><varname>RemoveIPC=</varname></term>
338
f59d94bc
LP
339 <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
340 user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
341 last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
342 well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
343 are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para></listitem>
798d3a52
ZJS
344 </varlistentry>
345
346 </variablelist>
347 </refsect1>
348
349 <refsect1>
350 <title>See Also</title>
351 <para>
352 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
353 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
354 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
355 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
356 </para>
357 </refsect1>
8fa365e5
LP
358
359</refentry>