chiark / gitweb /
journald: remove unused variable
[elogind.git] / man / logind.conf.xml
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">
5
6 <!--
7   This file is part of systemd.
8
9   Copyright 2010 Lennart Poettering
10
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.
15
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.
20
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/>.
23 -->
24
25 <refentry id="logind.conf" conditional='ENABLE_LOGIND'>
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                 <refpurpose>Login manager configuration file</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <para><filename>/etc/systemd/logind.conf</filename></para>
52         </refsynopsisdiv>
53
54         <refsect1>
55                 <title>Description</title>
56
57                 <para>This file configures various parameters of the systemd login manager, <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
58
59         </refsect1>
60
61         <refsect1>
62                 <title>Options</title>
63
64                 <para>All options are configured in the
65                 <literal>[Login]</literal> section:</para>
66
67                 <variablelist>
68
69                         <varlistentry>
70                                 <term><varname>NAutoVTs=</varname></term>
71
72                                 <listitem><para>Takes a positive
73                                 integer. Configures how many virtual
74                                 terminals (VTs) to allocate by default
75                                 that, when switched to and are
76                                 previously unused,
77                                 <literal>autovt</literal> services are
78                                 automatically spawned on. These
79                                 services are instantiated from the
80                                 template unit
81                                 <filename>autovt@.service</filename>
82                                 for the respective VT TTY name,
83                                 e.g. <filename>autovt@tty4.service</filename>. By
84                                 default,
85                                 <filename>autovt@.service</filename>
86                                 is linked to
87                                 <filename>getty@.service</filename>,
88                                 i.e. login prompts are started
89                                 dynamically as the user switches to
90                                 unused virtual terminals. Hence, this
91                                 parameter controls how many login
92                                 <literal>gettys</literal> are
93                                 available on the VTs. If a VT is
94                                 already used by some other subsystem
95                                 (for example a graphical login), this
96                                 kind of activation will not be
97                                 attempted. Note that the VT configured
98                                 in <varname>ReserveVT=</varname> is
99                                 always subject to this kind of
100                                 activation, even if it is not one of
101                                 VTs configured with the
102                                 <varname>NAutoVTs=</varname>
103                                 directive. Defaults to 6. When set to
104                                 0, automatic spawning of
105                                 <literal>autovt</literal> services is
106                                 disabled.</para></listitem>
107                         </varlistentry>
108
109                         <varlistentry>
110                                 <term><varname>ReserveVT=</varname></term>
111
112                                 <listitem><para>Takes a positive
113                                 integer. Configures the number of one
114                                 virtual terminal that shall
115                                 unconditionally be reserved for
116                                 <filename>autovt@.service</filename>
117                                 activation (see above). The VT
118                                 selected with this option will be
119                                 marked busy unconditionally, so that no
120                                 other subsystem will allocate it. This
121                                 functionality is useful to ensure that
122                                 regardless of how many VTs are allocated
123                                 by other subsystems, one login
124                                 <literal>getty</literal> is always
125                                 available. Defaults to 6 (in other
126                                 words, there will always be a
127                                 <literal>getty</literal> available on
128                                 Alt-F6.). When set to 0, VT
129                                 reservation is
130                                 disabled.</para></listitem>
131                         </varlistentry>
132
133                         <varlistentry>
134                                 <term><varname>KillUserProcesses=</varname></term>
135
136                                 <listitem><para>Takes a boolean
137                                 argument. Configures whether the
138                                 processes of a user should be killed
139                                 when she or he completely logs out (i.e. after
140                                 her/his last session ended). Defaults to
141                                 <literal>no</literal>.</para></listitem>
142                         </varlistentry>
143
144                         <varlistentry>
145                                 <term><varname>IdleAction=</varname></term>
146
147                                 <listitem><para>Configures the action
148                                 to take when the system is idle. Takes
149                                 one of <literal>ignore</literal>,
150                                 <literal>poweroff</literal>,
151                                 <literal>reboot</literal>,
152                                 <literal>halt</literal>,
153                                 <literal>kexec</literal>,
154                                 <literal>suspend</literal>,
155                                 <literal>hibernate</literal>,
156                                 <literal>hybrid-sleep</literal>,
157                                 <literal>lock</literal>. Defaults to
158                                 <literal>ignore</literal>.</para>
159
160                                 <para>Note that this requires that
161                                 user sessions correctly report the
162                                 idle status to the system. The system
163                                 will execute the action after all
164                                 sessions report that they are idle,
165                                 no idle inhibitor lock is active,
166                                 and subsequently, the time configured
167                                 with <varname>IdleActionSec=</varname>
168                                 (see below) has expired.</para>
169                                 </listitem>
170                         </varlistentry>
171
172                         <varlistentry>
173                                 <term><varname>IdleActionSec=</varname></term>
174
175                                 <listitem><para>Configures the delay
176                                 after which the action configured in
177                                 <varname>IdleAction=</varname> (see
178                                 above) is taken after the system is
179                                 idle.</para></listitem>
180                         </varlistentry>
181
182                         <varlistentry>
183                                 <term><varname>KillOnlyUsers=</varname></term>
184                                 <term><varname>KillExcludeUsers=</varname></term>
185
186                                 <listitem><para>These settings take
187                                 space-separated lists of usernames
188                                 that influence the effect of
189                                 <varname>KillUserProcesses=</varname>. If
190                                 not empty, only processes of users
191                                 listed in
192                                 <varname>KillOnlyUsers</varname> will
193                                 be killed when they log out
194                                 entirely. Processes of users listed in
195                                 <varname>KillExcludeUsers=</varname>
196                                 are excluded from being
197                                 killed. <varname>KillExcludeUsers=</varname>
198                                 defaults to <literal>root</literal>
199                                 and takes precedence over
200                                 <varname>KillOnlyUsers=</varname>,
201                                 which defaults to the empty list.</para></listitem>
202                         </varlistentry>
203
204                         <varlistentry>
205                                 <term><varname>Controllers=</varname></term>
206                                 <term><varname>ResetControllers=</varname></term>
207
208                                 <listitem><para>These settings control
209                                 the default control group hierarchies
210                                 users logging in are added to, in
211                                 addition to the
212                                 <literal>name=systemd</literal> named
213                                 hierarchy. These settings take
214                                 space-separated lists of controller
215                                 names. Pass the empty string to ensure
216                                 that logind does not touch any
217                                 hierarchies but systemd's own. When
218                                 logging in, user sessions will get
219                                 private control groups in all
220                                 hierarchies listed in
221                                 <varname>Controllers=</varname> and be
222                                 reset to the root control group in all
223                                 hierarchies listed in
224                                 <varname>ResetControllers=</varname>.
225                                 <varname>Controllers=</varname>
226                                 defaults to the empty list.
227                                 <varname>ResetControllers=</varname>
228                                 defaults to
229                                 <literal>cpu</literal>. Note that for
230                                 all controllers that are not listed in
231                                 either <varname>Controllers=</varname>
232                                 or
233                                 <varname>ResetControllers=</varname>,
234                                 newly created sessions will be part of
235                                 the control groups of the system
236                                 service that created the
237                                 session.</para></listitem>
238                         </varlistentry>
239
240                         <varlistentry>
241                                 <term><varname>InhibitDelayMaxSec=</varname></term>
242
243                                 <listitem><para>Specifies the maximum
244                                 time a system shutdown or sleep
245                                 request is delayed due to an inhibitor
246                                 lock of type <literal>delay</literal>
247                                 being active before the inhibitor is
248                                 ignored and the operation executes
249                                 anyway. Defaults to
250                                 5s.</para></listitem>
251                         </varlistentry>
252
253                         <varlistentry>
254                                 <term><varname>HandlePowerKey=</varname></term>
255                                 <term><varname>HandleSuspendKey=</varname></term>
256                                 <term><varname>HandleHibernateKey=</varname></term>
257                                 <term><varname>HandleLidSwitch=</varname></term>
258
259                                 <listitem><para>Controls whether
260                                 logind shall handle the system power
261                                 and sleep keys and the lid switch to
262                                 trigger actions such as system
263                                 power-off or suspend. Can be one of
264                                 <literal>ignore</literal>,
265                                 <literal>poweroff</literal>,
266                                 <literal>reboot</literal>,
267                                 <literal>halt</literal>,
268                                 <literal>kexec</literal>,
269                                 <literal>suspend</literal>,
270                                 <literal>hibernate</literal>,
271                                 <literal>hybrid-sleep</literal> and
272                                 <literal>lock</literal>. If
273                                 <literal>ignore</literal>, logind will
274                                 never handle these keys. If
275                                 <literal>lock</literal>, all running
276                                 sessions will be screen-locked; otherwise,
277                                 the specified action
278                                 will be taken in the respective
279                                 event. Only input devices with the
280                                 <literal>power-switch</literal> udev
281                                 tag will be watched for key/lid switch
282                                 events. <varname>HandlePowerKey=</varname>
283                                 defaults to
284                                 <literal>poweroff</literal>.
285                                 <varname>HandleSuspendKey=</varname>
286                                 and
287                                 <varname>HandleLidSwitch=</varname>
288                                 default to <literal>suspend</literal>.
289                                 <varname>HandleHibernateKey=</varname>
290                                 defaults to
291                                 <literal>hibernate</literal>.</para></listitem>
292                         </varlistentry>
293
294                         <varlistentry>
295                                 <term><varname>PowerKeyIgnoreInhibited=</varname></term>
296                                 <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
297                                 <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
298                                 <term><varname>LidSwitchIgnoreInhibited=</varname></term>
299
300                                 <listitem><para>Controls whether
301                                 actions triggered by the power and
302                                 sleep keys and the lid switch are
303                                 subject to inhibitor locks. These
304                                 settings take boolean arguments. If
305                                 <literal>off</literal>, the inhibitor
306                                 locks taken by applications in order
307                                 to block the requested operation are
308                                 respected. If <literal>on</literal>,
309                                 the requested operation is executed in
310                                 any
311                                 case. <varname>PowerKeyIgnoreInhibited=</varname>,
312                                 <varname>SuspendKeyIgnoreInhibited=</varname>
313                                 and
314                                 <varname>HibernateKeyIgnoreInhibited=</varname>
315                                 default to <literal>off</literal>.
316                                 <varname>LidSwitchIgnoreInhibited=</varname>
317                                 defaults to
318                                 <literal>yes</literal>. This means
319                                 that the lid switch does not respect
320                                 suspend blockers by default, but the
321                                 power and sleep keys do.
322                                 </para></listitem>
323                         </varlistentry>
324
325                 </variablelist>
326
327                 <para>Note that setting
328                 <varname>KillUserProcesses=1</varname> will break tools
329                 like
330                 <citerefentry><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
331
332                 <para>Note that <varname>KillUserProcesses=1</varname>
333                 is a weaker version of
334                 <varname>kill-session-processes=1</varname>, which may
335                 be configured per-service for
336                 <citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
337                 latter kills processes of a session as soon as it
338                 ends, the former kills processes as soon as the last
339                 session of the user ends.</para>
340         </refsect1>
341
342         <refsect1>
343                   <title>See Also</title>
344                   <para>
345                           <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
346                           <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
347                           <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
348                           <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
349                   </para>
350         </refsect1>
351
352 </refentry>