chiark / gitweb /
fs-util: unify code we use to check if dirent's d_name is "." or ".."
[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 elogind.
7
8   Copyright 2010 Lennart Poettering
9
10   elogind 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   elogind 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 elogind; 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>elogind</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     <refpurpose>Login manager configuration files</refpurpose>
47   </refnamediv>
48
49   <refsynopsisdiv>
50     <para><filename>/etc/elogind/logind.conf</filename></para>
51   </refsynopsisdiv>
52
53   <refsect1>
54     <title>Description</title>
55
56     <para>These files configure various parameters of the elogind
57     login manager.</para>
58   </refsect1>
59
60   <xi:include href="standard-conf.xml" xpointer="main-conf" />
61
62   <refsect1>
63     <title>Options</title>
64
65     <para>All login options are configured in the
66     <literal>[Login]</literal> section, system sleep options are
67     configured in the <literal>[Sleep]</literal> section.</para>
68
69     <refsect2><title>[Login] section:</title>
70       <variablelist>
71
72         <varlistentry>
73           <term><varname>KillUserProcesses=</varname></term>
74
75           <listitem><para>Takes a boolean argument. Configures whether
76           the processes of a user should be killed when the user
77           completely logs out (i.e. after the user's last session
78           ended). Defaults to <literal>no</literal>.</para>
79
80           <para>Note that setting <varname>KillUserProcesses=1</varname>
81           will break tools like
82           <citerefentry project='die-net'><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para></listitem>
83         </varlistentry>
84
85         <varlistentry>
86           <term><varname>KillOnlyUsers=</varname></term>
87           <term><varname>KillExcludeUsers=</varname></term>
88
89           <listitem><para>These settings take space-separated lists of
90           usernames that influence the effect of
91           <varname>KillUserProcesses=</varname>. If not empty, only
92           processes of users listed in <varname>KillOnlyUsers=</varname>
93           will be killed when they log out entirely. Processes of users
94           listed in <varname>KillExcludeUsers=</varname> are excluded
95           from being killed. <varname>KillExcludeUsers=</varname>
96           defaults to <literal>root</literal> and takes precedence over
97           <varname>KillOnlyUsers=</varname>, which defaults to the empty
98           list.</para></listitem>
99         </varlistentry>
100
101         <varlistentry>
102           <term><varname>IdleAction=</varname></term>
103
104           <listitem><para>Configures the action to take when the system
105           is idle. Takes one of
106           <literal>ignore</literal>,
107           <literal>poweroff</literal>,
108           <literal>reboot</literal>,
109           <literal>halt</literal>,
110           <literal>kexec</literal>,
111           <literal>suspend</literal>,
112           <literal>hibernate</literal>,
113           <literal>hybrid-sleep</literal>, and
114           <literal>lock</literal>.
115           Defaults to <literal>ignore</literal>.</para>
116
117           <para>Note that this requires that user sessions correctly
118           report the idle status to the system. The system will execute
119           the action after all sessions report that they are idle, no
120           idle inhibitor lock is active, and subsequently, the time
121           configured with <varname>IdleActionSec=</varname> (see below)
122           has expired.</para>
123           </listitem>
124         </varlistentry>
125
126         <varlistentry>
127           <term><varname>IdleActionSec=</varname></term>
128
129           <listitem><para>Configures the delay after which the action
130           configured in <varname>IdleAction=</varname> (see above) is
131           taken after the system is idle.</para></listitem>
132         </varlistentry>
133
134         <varlistentry>
135           <term><varname>InhibitDelayMaxSec=</varname></term>
136
137           <listitem><para>Specifies the maximum time a system shutdown
138           or sleep request is delayed due to an inhibitor lock of type
139           <literal>delay</literal> being active before the inhibitor is
140           ignored and the operation executes anyway. Defaults to
141           5.</para></listitem>
142         </varlistentry>
143
144         <varlistentry>
145           <term><varname>HandlePowerKey=</varname></term>
146           <term><varname>HandleSuspendKey=</varname></term>
147           <term><varname>HandleHibernateKey=</varname></term>
148           <term><varname>HandleLidSwitch=</varname></term>
149           <term><varname>HandleLidSwitchDocked=</varname></term>
150
151           <listitem><para>Controls how logind shall handle the
152           system power and sleep keys and the lid switch to trigger
153           actions such as system power-off or suspend. Can be one of
154           <literal>ignore</literal>,
155           <literal>poweroff</literal>,
156           <literal>reboot</literal>,
157           <literal>halt</literal>,
158           <literal>kexec</literal>,
159           <literal>suspend</literal>,
160           <literal>hibernate</literal>,
161           <literal>hybrid-sleep</literal>, and
162           <literal>lock</literal>.
163           If <literal>ignore</literal>, logind will never handle these
164           keys. If <literal>lock</literal>, all running sessions will be
165           screen-locked; otherwise, the specified action will be taken
166           in the respective event. Only input devices with the
167           <literal>power-switch</literal> udev tag will be watched for
168           key/lid switch events. <varname>HandlePowerKey=</varname>
169           defaults to <literal>poweroff</literal>.
170           <varname>HandleSuspendKey=</varname> and
171           <varname>HandleLidSwitch=</varname> default to
172           <literal>suspend</literal>.
173           <varname>HandleLidSwitchDocked=</varname> defaults to
174           <literal>ignore</literal>.
175           <varname>HandleHibernateKey=</varname> defaults to
176           <literal>hibernate</literal>. If the system is inserted in a
177           docking station, or if more than one display is connected, the
178           action specified by <varname>HandleLidSwitchDocked=</varname>
179           occurs; otherwise the <varname>HandleLidSwitch=</varname>
180         action occurs.</para>
181
182         <para>A different application may disable logind's handling of system power and
183         sleep keys and the lid switch by taking a low-level inhibitor lock
184         ("handle-power-key", "handle-suspend-key", "handle-hibernate-key",
185         "handle-lid-switch"). This is most commonly used by graphical desktop environments
186         to take over suspend and hibernation handling, and to use their own configuration
187         mechanisms. If a low-level inhibitor lock is taken, logind will not take any
188         action when that key or switch is triggered and the <varname>Handle*=</varname>
189         settings are irrelevant.</para></listitem>
190       </varlistentry>
191
192         <varlistentry>
193           <term><varname>PowerKeyIgnoreInhibited=</varname></term>
194           <term><varname>SuspendKeyIgnoreInhibited=</varname></term>
195           <term><varname>HibernateKeyIgnoreInhibited=</varname></term>
196           <term><varname>LidSwitchIgnoreInhibited=</varname></term>
197
198         <listitem><para>Controls whether actions that <command>systemd-logind</command>
199         takes when the power and sleep keys and the lid switch are triggered are subject
200         to high-level inhibitor locks ("shutdown", "sleep", "idle"). Low level inhibitor
201         locks ("handle-*-key"), are always honoured, irrespective of this setting.</para>
202
203         <para>These settings take boolean arguments. If <literal>no</literal>, the
204         inhibitor locks taken by applications are respected. If <literal>yes</literal>,
205         "shutdown", "sleep", and "idle" inhibitor locks are ignored.
206           <varname>PowerKeyIgnoreInhibited=</varname>,
207         <varname>SuspendKeyIgnoreInhibited=</varname>, and
208         <varname>HibernateKeyIgnoreInhibited=</varname> default to <literal>no</literal>.
209         <varname>LidSwitchIgnoreInhibited=</varname> defaults to <literal>yes</literal>.
210         This means that when <command>systemd-logind</command> is handling events by
211         itself (no low level inhibitor locks are taken by another application), the lid
212         switch does not respect suspend blockers by default, but the power and sleep keys
213         do.</para></listitem>
214         </varlistentry>
215
216         <varlistentry>
217           <term><varname>HoldoffTimeoutSec=</varname></term>
218
219           <listitem><para>Specifies the timeout after system startup or
220           system resume in which elogind will hold off on reacting to
221           LID events. This is required for the system to properly
222           detect any hotplugged devices so elogind can ignore LID events
223           if external monitors, or docks, are connected. If set to 0,
224           elogind will always react immediately, possibly before the
225           kernel fully probed all hotplugged devices. This is safe, as
226           long as you do not care for elogind to account for devices
227           that have been plugged or unplugged while the system was off.
228           Defaults to 30s.</para></listitem>
229         </varlistentry>
230
231         <varlistentry>
232           <term><varname>RuntimeDirectorySize=</varname></term>
233
234           <listitem><para>Sets the size limit on the
235           <varname>$XDG_RUNTIME_DIR</varname> runtime directory for each
236           user who logs in. Takes a size in bytes, optionally suffixed
237           with the usual K, G, M, and T suffixes, to the base 1024
238           (IEC). Alternatively, a numerical percentage suffixed by
239           <literal>%</literal> may be specified, which sets the size
240           limit relative to the amount of physical RAM. Defaults to 10%.
241           Note that this size is a safety limit only. As each runtime
242           directory is a tmpfs file system, it will only consume as much
243           memory as is needed. </para></listitem>
244         </varlistentry>
245
246         <varlistentry>
247           <term><varname>RemoveIPC=</varname></term>
248
249           <listitem><para>Controls whether System V and POSIX IPC objects belonging to the user shall be removed when the
250           user fully logs out. Takes a boolean argument. If enabled, the user may not consume IPC resources after the
251           last of the user's sessions terminated. This covers System V semaphores, shared memory and message queues, as
252           well as POSIX shared memory and message queues. Note that IPC objects of the root user and other system users
253           are excluded from the effect of this setting. Defaults to <literal>yes</literal>.</para></listitem>
254         </varlistentry>
255
256       </variablelist>
257     </refsect2>
258
259     <refsect2><title>[Sleep] section:</title>
260
261       <para><command>elogind</command> supports three general
262       power-saving modes:</para>
263
264       <variablelist>
265         <varlistentry>
266           <term>suspend</term>
267
268           <listitem><para>a low-power state
269           where execution of the OS is paused,
270           and complete power loss might result
271           in lost data, and which is fast to
272           enter and exit. This corresponds to
273           suspend, standby, or freeze states as
274           understood by the kernel.
275           </para></listitem>
276         </varlistentry>
277
278         <varlistentry>
279           <term>hibernate</term>
280
281           <listitem><para>a low-power state
282           where execution of the OS is paused,
283           and complete power loss does not
284           result in lost data, and which might
285           be slow to enter and exit. This
286           corresponds to the hibernation as
287           understood by the kernel.
288           </para></listitem>
289         </varlistentry>
290
291         <varlistentry>
292           <term>hybrid-sleep</term>
293
294           <listitem><para>a low-power state
295           where execution of the OS is paused,
296           which might be slow to enter, and on
297           complete power loss does not result in
298           lost data but might be slower to exit
299           in that case. This mode is called
300           suspend-to-both by the kernel.
301           </para></listitem>
302         </varlistentry>
303
304         <varlistentry>
305           <term><varname>SuspendMode=</varname></term>
306           <term><varname>HibernateMode=</varname></term>
307           <term><varname>HybridSleepMode=</varname></term>
308
309           <listitem><para>The string to be written to
310           <filename>/sys/power/disk</filename> by elogind.
311           More than one value can be specified by separating
312           multiple values with whitespace. They will be tried
313           in turn, until one is written without error. If
314           neither succeeds, the operation will be aborted.
315           </para></listitem>
316         </varlistentry>
317
318         <varlistentry>
319           <term><varname>SuspendState=</varname></term>
320           <term><varname>HibernateState=</varname></term>
321           <term><varname>HybridSleepState=</varname></term>
322
323           <listitem><para>The string to be written to
324           <filename>/sys/power/state</filename> by elogind.
325           More than one value can be specified by separating
326           multiple values with whitespace. They will be tried
327           in turn, until one is written without error. If
328           neither succeeds, the operation will be aborted.
329           </para></listitem>
330         </varlistentry>
331
332       </variablelist>
333     </refsect2>
334   </refsect1>
335
336   <refsect1>
337       <title>See Also</title>
338       <para>
339         <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
340         <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
341       </para>
342   </refsect1>
343
344 </refentry>