chiark / gitweb /
logind will always be built
[elogind.git] / man / logind.conf.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
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
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
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
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="logind.conf" xmlns:xi="http://www.w3.org/2001/XInclude">
25   <refentryinfo>
26     <title>logind.conf</title>
27     <productname>systemd</productname>
28
29     <authorgroup>
30       <author>
31         <contrib>Developer</contrib>
32         <firstname>Lennart</firstname>
33         <surname>Poettering</surname>
34         <email>lennart@poettering.net</email>
35       </author>
36     </authorgroup>
37   </refentryinfo>
38
39   <refmeta>
40     <refentrytitle>logind.conf</refentrytitle>
41     <manvolnum>5</manvolnum>
42   </refmeta>
43
44   <refnamediv>
45     <refname>logind.conf</refname>
46     <refname>logind.conf.d</refname>
47     <refpurpose>Login manager configuration files</refpurpose>
48   </refnamediv>
49
50   <refsynopsisdiv>
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>
55   </refsynopsisdiv>
56
57   <refsect1>
58     <title>Description</title>
59
60     <para>These files configure various parameters of the systemd
61     login manager,
62     <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
63     </para>
64   </refsect1>
65
66   <xi:include href="standard-conf.xml" xpointer="main-conf" />
67
68   <refsect1>
69     <title>Options</title>
70
71     <para>All options are configured in the
72     <literal>[Login]</literal> section:</para>
73
74     <variablelist>
75
76       <varlistentry>
77         <term><varname>NAutoVTs=</varname></term>
78
79         <listitem><para>Takes a positive integer. Configures how many
80         virtual terminals (VTs) to allocate by default that, when
81         switched to and are previously unused,
82         <literal>autovt</literal> services are automatically spawned
83         on. These services are instantiated from the template unit
84         <filename>autovt@.service</filename> for the respective VT TTY
85         name, for example, <filename>autovt@tty4.service</filename>.
86         By default, <filename>autovt@.service</filename> is linked to
87         <filename>getty@.service</filename>. In other words, login
88         prompts are started dynamically as the user switches to unused
89         virtual terminals. Hence, this parameter controls how many
90         login <literal>gettys</literal> are available on the VTs. If a
91         VT is already used by some other subsystem (for example, a
92         graphical login), this kind of activation will not be
93         attempted. Note that the VT configured in
94         <varname>ReserveVT=</varname> is always subject to this kind
95         of activation, even if it is not one of the VTs configured
96         with the <varname>NAutoVTs=</varname> directive. Defaults to
97         6. When set to 0, automatic spawning of
98         <literal>autovt</literal> services is
99         disabled.</para></listitem>
100       </varlistentry>
101
102       <varlistentry>
103         <term><varname>ReserveVT=</varname></term>
104
105         <listitem><para>Takes a positive integer. Identifies one
106         virtual terminal that shall unconditionally be reserved for
107         <filename>autovt@.service</filename> activation (see above).
108         The VT selected with this option will be marked busy
109         unconditionally, so that no other subsystem will allocate it.
110         This functionality is useful to ensure that, regardless of how
111         many VTs are allocated by other subsystems, one login
112         <literal>getty</literal> is always available. Defaults to 6
113         (in other words, there will always be a
114         <literal>getty</literal> available on Alt-F6.). When set to 0,
115         VT reservation is disabled.</para></listitem>
116       </varlistentry>
117
118       <varlistentry>
119         <term><varname>KillUserProcesses=</varname></term>
120
121         <listitem><para>Takes a boolean argument. Configures whether
122         the processes of a user should be killed when the user
123         completely logs out (i.e. after the user's last session
124         ended). Defaults to <literal>no</literal>.</para>
125
126         <para>Note that setting <varname>KillUserProcesses=1</varname>
127         will break tools like
128         <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
129       </varlistentry>
130
131       <varlistentry>
132         <term><varname>KillOnlyUsers=</varname></term>
133         <term><varname>KillExcludeUsers=</varname></term>
134
135         <listitem><para>These settings take space-separated lists of
136         usernames that influence the effect of
137         <varname>KillUserProcesses=</varname>. If not empty, only
138         processes of users listed in <varname>KillOnlyUsers=</varname>
139         will be killed when they log out entirely. Processes of users
140         listed in <varname>KillExcludeUsers=</varname> are excluded
141         from being killed. <varname>KillExcludeUsers=</varname>
142         defaults to <literal>root</literal> and takes precedence over
143         <varname>KillOnlyUsers=</varname>, which defaults to the empty
144         list.</para></listitem>
145       </varlistentry>
146
147       <varlistentry>
148         <term><varname>IdleAction=</varname></term>
149
150         <listitem><para>Configures the action to take when the system
151         is idle. Takes one of
152         <literal>ignore</literal>,
153         <literal>poweroff</literal>,
154         <literal>reboot</literal>,
155         <literal>halt</literal>,
156         <literal>kexec</literal>,
157         <literal>suspend</literal>,
158         <literal>hibernate</literal>,
159         <literal>hybrid-sleep</literal>, and
160         <literal>lock</literal>.
161         Defaults to <literal>ignore</literal>.</para>
162
163         <para>Note that this requires that user sessions correctly
164         report the idle status to the system. The system will execute
165         the action after all sessions report that they are idle, no
166         idle inhibitor lock is active, and subsequently, the time
167         configured with <varname>IdleActionSec=</varname> (see below)
168         has expired.</para>
169         </listitem>
170       </varlistentry>
171
172       <varlistentry>
173         <term><varname>IdleActionSec=</varname></term>
174
175         <listitem><para>Configures the delay after which the action
176         configured in <varname>IdleAction=</varname> (see above) is
177         taken after the system is idle.</para></listitem>
178       </varlistentry>
179
180       <varlistentry>
181         <term><varname>InhibitDelayMaxSec=</varname></term>
182
183         <listitem><para>Specifies the maximum time a system shutdown
184         or sleep request is delayed due to an inhibitor lock of type
185         <literal>delay</literal> being active before the inhibitor is
186         ignored and the operation executes anyway. Defaults to
187         5.</para></listitem>
188       </varlistentry>
189
190       <varlistentry>
191         <term><varname>HandlePowerKey=</varname></term>
192         <term><varname>HandleSuspendKey=</varname></term>
193         <term><varname>HandleHibernateKey=</varname></term>
194         <term><varname>HandleLidSwitch=</varname></term>
195         <term><varname>HandleLidSwitchDocked=</varname></term>
196
197         <listitem><para>Controls whether logind shall handle the
198         system power and sleep keys and the lid switch to trigger
199         actions such as system power-off or suspend. Can be one of
200         <literal>ignore</literal>,
201         <literal>poweroff</literal>,
202         <literal>reboot</literal>,
203         <literal>halt</literal>,
204         <literal>kexec</literal>,
205         <literal>suspend</literal>,
206         <literal>hibernate</literal>,
207         <literal>hybrid-sleep</literal>, and
208         <literal>lock</literal>.
209         If <literal>ignore</literal>, logind will never handle these
210         keys. If <literal>lock</literal>, all running sessions will be
211         screen-locked; otherwise, the specified action will be taken
212         in the respective event. Only input devices with the
213         <literal>power-switch</literal> udev tag will be watched for
214         key/lid switch events. <varname>HandlePowerKey=</varname>
215         defaults to <literal>poweroff</literal>.
216         <varname>HandleSuspendKey=</varname> and
217         <varname>HandleLidSwitch=</varname> default to
218         <literal>suspend</literal>.
219         <varname>HandleLidSwitchDocked=</varname> defaults to
220         <literal>ignore</literal>.
221         <varname>HandleHibernateKey=</varname> defaults to
222         <literal>hibernate</literal>. If the system is inserted in a
223         docking station, or if more than one display is connected, the
224         action specified by <varname>HandleLidSwitchDocked=</varname>
225         occurs; otherwise the <varname>HandleLidSwitch=</varname>
226         action occurs.</para></listitem>
227       </varlistentry>
228
229       <varlistentry>
230         <term><varname>PowerKeyIgnoreInhibited=</varname></term>
231         <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
232         <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
233         <term><varname>LidSwitchIgnoreInhibited=</varname></term>
234
235         <listitem><para>Controls whether actions triggered by the
236         power and sleep keys and the lid switch are subject to
237         inhibitor locks. These settings take boolean arguments. If
238         <literal>no</literal>, the inhibitor locks taken by
239         applications in order to block the requested operation are
240         respected. If <literal>yes</literal>, the requested operation
241         is executed in any case.
242         <varname>PowerKeyIgnoreInhibited=</varname>,
243         <varname>SuspendKeyIgnoreInhibited=</varname> and
244         <varname>HibernateKeyIgnoreInhibited=</varname> default to
245         <literal>no</literal>.
246         <varname>LidSwitchIgnoreInhibited=</varname> defaults to
247         <literal>yes</literal>. This means that the lid switch does
248         not respect suspend blockers by default, but the power and
249         sleep keys do. </para></listitem>
250       </varlistentry>
251
252       <varlistentry>
253         <term><varname>HoldoffTimeoutSec=</varname></term>
254
255         <listitem><para>Specifies the timeout after system startup or
256         system resume in which systemd will hold off on reacting to
257         LID events. This is required for the system to properly
258         detect any hotplugged devices so systemd can ignore LID events
259         if external monitors, or docks, are connected. If set to 0,
260         systemd will always react immediately, possibly before the
261         kernel fully probed all hotplugged devices. This is safe, as
262         long as you do not care for systemd to account for devices
263         that have been plugged or unplugged while the system was off.
264         Defaults to 30s.</para></listitem>
265       </varlistentry>
266
267       <varlistentry>
268         <term><varname>RuntimeDirectorySize=</varname></term>
269
270         <listitem><para>Sets the size limit on the
271         <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
272         user who logs in. Takes a size in bytes, optionally suffixed
273         with the usual K, G, M, and T suffixes, to the base 1024
274         (IEC). Alternatively, a numerical percentage suffixed by
275         <literal>%</literal> may be specified, which sets the size
276         limit relative to the amount of physical RAM. Defaults to 10%.
277         Note that this size is a safety limit only. As each runtime
278         directory is a tmpfs file system, it will only consume as much
279         memory as is needed. </para></listitem>
280       </varlistentry>
281
282       <varlistentry>
283         <term><varname>RemoveIPC=</varname></term>
284
285         <listitem><para>Controls whether System V and POSIX IPC
286         objects belonging to the user shall be removed when the user
287         fully logs out. Takes a boolean argument. If enabled, the user
288         may not consume IPC resources after the last of the user's
289         sessions terminated. This covers System V semaphores, shared
290         memory and message queues, as well as POSIX shared memory and
291         message queues. Note that IPC objects of the root user are
292         excluded from the effect of this setting. Defaults to
293         <literal>yes</literal>.</para></listitem>
294       </varlistentry>
295
296     </variablelist>
297   </refsect1>
298
299   <refsect1>
300       <title>See Also</title>
301       <para>
302         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
303         <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
304         <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
305         <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
306       </para>
307   </refsect1>
308
309 </refentry>