1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
7 This file is part of systemd.
9 Copyright 2010 Lennart Poettering
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 <refentry id="logind.conf" conditional='ENABLE_LOGIND'>
27 <title>logind.conf</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>logind.conf</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>logind.conf</refname>
47 <refpurpose>Login manager configuration files</refpurpose>
51 <para><filename>/etc/systemd/logind.conf</filename></para>
52 <para><filename>/etc/systemd/logind.conf.d/*.conf</filename></para>
53 <para><filename>/run/systemd/logind.conf.d/*.conf</filename></para>
54 <para><filename>/usr/lib/systemd/logind.conf.d/*.conf</filename></para>
58 <title>Description</title>
60 <para>These files configure various parameters of the systemd login manager, <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
62 <para>Each configuration file shall be named in the style of
63 <filename><replaceable>filename</replaceable>.conf</filename>.
64 Files in <filename>/etc/</filename> override files with the
65 same name in <filename>/usr/lib/</filename> and
66 <filename>/run/</filename>. Files in
67 <filename>/run/</filename> override files with the same name in
68 <filename>/usr/lib/</filename>. Packages should install their
69 configuration files in <filename>/usr/lib/</filename>. Files in
70 <filename>/etc/</filename> are reserved for the local
71 administrator, who may use this logic to override the
72 configuration files installed by vendor packages. All
73 configuration files are sorted by their filename in
74 lexicographic order, regardless of which of the directories
75 they reside in. If multiple files specify the same option, the
76 entry in the file with the lexicographically latest name will
77 be applied; entries in any <filename>logind.conf.d</filename>
78 file override entries in
79 <filename>/etc/systemd/logind.conf</filename>. It is
80 recommended to prefix all filenames with a two-digit number and
81 a dash, to simplify the ordering of the files.</para>
85 <title>Options</title>
87 <para>All options are configured in the
88 <literal>[Login]</literal> section:</para>
93 <term><varname>NAutoVTs=</varname></term>
95 <listitem><para>Takes a positive
96 integer. Configures how many virtual
97 terminals (VTs) to allocate by default
98 that, when switched to and are
100 <literal>autovt</literal> services are
101 automatically spawned on. These
102 services are instantiated from the
104 <filename>autovt@.service</filename>
105 for the respective VT TTY name,
106 for example, <filename>autovt@tty4.service</filename>. By
108 <filename>autovt@.service</filename>
110 <filename>getty@.service</filename>.
111 In other words, login prompts are started
112 dynamically as the user switches to
113 unused virtual terminals. Hence, this
114 parameter controls how many login
115 <literal>gettys</literal> are
116 available on the VTs. If a VT is
117 already used by some other subsystem
118 (for example, a graphical login), this
119 kind of activation will not be
120 attempted. Note that the VT configured
121 in <varname>ReserveVT=</varname> is
122 always subject to this kind of
123 activation, even if it is not one of
124 the VTs configured with the
125 <varname>NAutoVTs=</varname>
126 directive. Defaults to 6. When set to
127 0, automatic spawning of
128 <literal>autovt</literal> services is
129 disabled.</para></listitem>
133 <term><varname>ReserveVT=</varname></term>
135 <listitem><para>Takes a positive
136 integer. Identifies one
137 virtual terminal that shall
138 unconditionally be reserved for
139 <filename>autovt@.service</filename>
140 activation (see above). The VT
141 selected with this option will be
142 marked busy unconditionally, so that no
143 other subsystem will allocate it. This
144 functionality is useful to ensure that,
145 regardless of how many VTs are allocated
146 by other subsystems, one login
147 <literal>getty</literal> is always
148 available. Defaults to 6 (in other
149 words, there will always be a
150 <literal>getty</literal> available on
151 Alt-F6.). When set to 0, VT
153 disabled.</para></listitem>
157 <term><varname>KillUserProcesses=</varname></term>
159 <listitem><para>Takes a boolean
160 argument. Configures whether the
161 processes of a user should be killed
162 when the user completely logs out (i.e. after
163 the user's last session ended). Defaults to
164 <literal>no</literal>.</para>
166 <para>Note that setting
167 <varname>KillUserProcesses=1</varname>
168 will break tools like
169 <citerefentry><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
173 <term><varname>KillOnlyUsers=</varname></term>
174 <term><varname>KillExcludeUsers=</varname></term>
176 <listitem><para>These settings take
177 space-separated lists of usernames
178 that influence the effect of
179 <varname>KillUserProcesses=</varname>. If
180 not empty, only processes of users
182 <varname>KillOnlyUsers=</varname> will
183 be killed when they log out
184 entirely. Processes of users listed in
185 <varname>KillExcludeUsers=</varname>
186 are excluded from being
187 killed. <varname>KillExcludeUsers=</varname>
188 defaults to <literal>root</literal>
189 and takes precedence over
190 <varname>KillOnlyUsers=</varname>,
191 which defaults to the empty list.</para></listitem>
195 <term><varname>IdleAction=</varname></term>
197 <listitem><para>Configures the action
198 to take when the system is idle. Takes
199 one of <literal>ignore</literal>,
200 <literal>poweroff</literal>,
201 <literal>reboot</literal>,
202 <literal>halt</literal>,
203 <literal>kexec</literal>,
204 <literal>suspend</literal>,
205 <literal>hibernate</literal>,
206 <literal>hybrid-sleep</literal>, and
207 <literal>lock</literal>. Defaults to
208 <literal>ignore</literal>.</para>
210 <para>Note that this requires that
211 user sessions correctly report the
212 idle status to the system. The system
213 will execute the action after all
214 sessions report that they are idle,
215 no idle inhibitor lock is active,
216 and subsequently, the time configured
217 with <varname>IdleActionSec=</varname>
218 (see below) has expired.</para>
223 <term><varname>IdleActionSec=</varname></term>
225 <listitem><para>Configures the delay
226 after which the action configured in
227 <varname>IdleAction=</varname> (see
228 above) is taken after the system is
229 idle.</para></listitem>
233 <term><varname>InhibitDelayMaxSec=</varname></term>
235 <listitem><para>Specifies the maximum
236 time a system shutdown or sleep
237 request is delayed due to an inhibitor
238 lock of type <literal>delay</literal>
239 being active before the inhibitor is
240 ignored and the operation executes
246 <term><varname>HandlePowerKey=</varname></term>
247 <term><varname>HandleSuspendKey=</varname></term>
248 <term><varname>HandleHibernateKey=</varname></term>
249 <term><varname>HandleLidSwitch=</varname></term>
250 <term><varname>HandleLidSwitchDocked=</varname></term>
252 <listitem><para>Controls whether
253 logind shall handle the system power
254 and sleep keys and the lid switch to
255 trigger actions such as system
256 power-off or suspend. Can be one of
257 <literal>ignore</literal>,
258 <literal>poweroff</literal>,
259 <literal>reboot</literal>,
260 <literal>halt</literal>,
261 <literal>kexec</literal>,
262 <literal>suspend</literal>,
263 <literal>hibernate</literal>,
264 <literal>hybrid-sleep</literal>, and
265 <literal>lock</literal>. If
266 <literal>ignore</literal>, logind will
267 never handle these keys. If
268 <literal>lock</literal>, all running
269 sessions will be screen-locked;
270 otherwise, the specified action will
271 be taken in the respective event. Only
272 input devices with the
273 <literal>power-switch</literal> udev
274 tag will be watched for key/lid switch
275 events. <varname>HandlePowerKey=</varname>
277 <literal>poweroff</literal>.
278 <varname>HandleSuspendKey=</varname>
280 <varname>HandleLidSwitch=</varname>
281 default to <literal>suspend</literal>.
282 <varname>HandleLidSwitchDocked=</varname>
283 defaults to <literal>ignore</literal>.
284 <varname>HandleHibernateKey=</varname>
286 <literal>hibernate</literal>. If the
287 system is inserted in a docking station,
288 or if more than one display is connected,
289 the action specified by
290 <varname>HandleLidSwitchDocked=</varname>
291 occurs; otherwise the
292 <varname>HandleLidSwitch=</varname>
293 action occurs.</para></listitem>
297 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
298 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
299 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
300 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
302 <listitem><para>Controls whether
303 actions triggered by the power and
304 sleep keys and the lid switch are
305 subject to inhibitor locks. These
306 settings take boolean arguments. If
307 <literal>no</literal>, the inhibitor
308 locks taken by applications in order
309 to block the requested operation are
310 respected. If <literal>yes</literal>,
311 the requested operation is executed in
313 case. <varname>PowerKeyIgnoreInhibited=</varname>,
314 <varname>SuspendKeyIgnoreInhibited=</varname>
316 <varname>HibernateKeyIgnoreInhibited=</varname>
317 default to <literal>no</literal>.
318 <varname>LidSwitchIgnoreInhibited=</varname>
320 <literal>yes</literal>. This means
321 that the lid switch does not respect
322 suspend blockers by default, but the
323 power and sleep keys do.
328 <term><varname>RuntimeDirectorySize=</varname></term>
330 <listitem><para>Sets the size limit on
332 <varname>$XDG_RUNTIME_DIR</varname>
333 runtime directory for each user who
334 logs in. Takes a size in bytes,
335 optionally suffixed with the usual K, G,
336 M, and T suffixes, to the base 1024
337 (IEC). Alternatively, a numerical
338 percentage suffixed by <literal>%</literal>
339 may be specified, which sets the size
340 limit relative to the amount of
341 physical RAM. Defaults to 10%. Note
342 that this size is a safety limit
343 only. As each runtime directory is a
344 tmpfs file system, it will only consume
345 as much memory as is needed.
350 <term><varname>RemoveIPC=</varname></term>
352 <listitem><para>Controls whether
353 System V and POSIX IPC objects
354 belonging to the user shall be removed
355 when the user fully logs out. Takes a
356 boolean argument. If enabled, the user
357 may not consume IPC resources after
358 the last of the user's sessions
359 terminated. This covers System V
360 semaphores, shared memory and message
361 queues, as well as POSIX shared memory
362 and message queues. Note that IPC
363 objects of the root user are excluded
364 from the effect of this
366 <literal>yes</literal>.</para></listitem>
373 <title>See Also</title>
375 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
376 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
377 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
378 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>