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">
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 file</refpurpose>
51 <para><filename>/etc/systemd/logind.conf</filename></para>
55 <title>Description</title>
57 <para>This file configures various parameters of the systemd login manager <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
62 <title>Options</title>
64 <para>All options are configured in the
65 <literal>[Login]</literal> section:</para>
70 <term><varname>NAutoVTs=</varname></term>
72 <listitem><para>Takes a positive
73 integer. Configures how many virtual
74 terminals to allocate by default that
75 -- when switched to --
76 <literal>autovt</literal> services are
77 automatically spawned on. These
78 services are instantiated from the
80 <filename>autovt@.service</filename>
81 with the virtual terminal TTY name,
82 e.g. <filename>autovt@tty4.service</filename>. By
84 <filename>autovt@.service</filename>
86 <filename>getty@.service</filename>,
87 i.e. login prompts are started
88 dynamically as the user switches to
89 unused virtual terminals. This
90 parameter hence controls how many
91 gettys are available on the virtual
92 terminals. Defaults to 6. When set to
93 0, automatic spawning of
94 <literal>autovt</literal> services is
95 disabled.</para></listitem>
99 <term><varname>KillUserProcesses=</varname></term>
101 <listitem><para>Takes a boolean
102 argument. Configures whether the
103 processes of a user should be killed
104 when she or he completely logs out (i.e. after
105 her/his last session ended). Defaults to
106 <literal>no</literal>.</para></listitem>
110 <term><varname>KillOnlyUsers=</varname></term>
111 <term><varname>KillExcludeUsers=</varname></term>
113 <listitem><para>These settings take
114 space separated lists of user names
115 that influence the effect of
116 <varname>KillUserProcesses=</varname>. If
117 not empty only processes of users
119 <varname>KillOnlyUsers</varname> will
120 be killed when they log out
121 entirely. Processes of users listed in
122 <varname>KillExcludeUsers=</varname>
123 are excluded from being
124 killed. <varname>KillExcludeUsers=</varname>
125 defaults to <literal>root</literal>
126 and takes precedence over
127 <varname>KillOnlyUsers=</varname>
128 which defaults to the empty list.</para></listitem>
132 <term><varname>Controllers=</varname></term>
133 <term><varname>ResetControllers=</varname></term>
135 <listitem><para>These settings control
136 the default control group hierarchies
137 users logging in are added to. When
138 logging in users will get private
139 control groups in all hierarchies
141 <varname>Controllers=</varname> and be
142 reset to the root control group in all
143 hierarchies listed in
144 <varname>ResetControllers=</varname>. <varname>Controllers=</varname>
145 defaults to the empty list,
146 <varname>ResetControllers=</varname>
148 <literal>cpu</literal>.</para></listitem>
152 <term><varname>InhibitDelayMaxSec=</varname></term>
154 <listitem><para>Specifies the maximum
155 time a system shutdown or sleep
156 request is delayed due to an inhibitor
157 lock of type <literal>delay</literal>
158 being active -- before it is ignored
159 and the operation executed
161 5s.</para></listitem>
165 <term><varname>HandlePowerKey=</varname></term>
166 <term><varname>HandleSleepKey=</varname></term>
167 <term><varname>HandleLidSwitch=</varname></term>
169 <listitem><para>Controls whether
170 logind shall handle the system power
171 and sleep keys and the lid switch to
172 trigger system power-off or
173 suspend. Can be one of
174 <literal>off</literal>,
175 <literal>no-session</literal>,
176 <literal>tty-session</literal>,
177 <literal>any-session</literal> and
178 <literal>always</literal>. If
179 <literal>off</literal> logind will
180 never handle these keys. If
181 <literal>no-session</literal> logind
182 will handle these keys when no user is
183 logged in and no inhibitor lock is
184 taken, and trigger a warning beep
186 <literal>tty-session</literal> logind
187 will handle these keys if no inhibitor
188 lock is taken, and either no user is
189 logged in or the foreground session is
190 a text login and the only one
192 <literal>any-session</literal> is set
193 logind will handle these keys if no
194 inhibitor lock is taken, and either no
195 user is logged in or the foreground
196 session is the only one existing
197 (regardless whether graphical or
199 <literal>always</literal> logind will
200 handle these keys in any case, even if
201 one or more users are logged in or an
202 inhibitor lock is taken. Only input
204 <literal>power-switch</literal> udev
205 tag will be watched for key
206 events. <varname>HandlePowerKey=</varname>
208 <literal>no-session</literal>.
209 <varname>HandleSleepKey=</varname>
211 <literal>tty-session</literal>,
212 <varname>HandleLidSwitch=</varname>
214 <literal>off</literal>.</para></listitem>
219 <para>Note that setting
220 <varname>KillUserProcesses=1</varname> will break tools
222 <citerefentry><refentrytitle>screen</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
224 <para>Note that <varname>KillUserProcesses=1</varname>
225 is a weaker version of
226 <varname>kill-session-processes=1</varname> which may
227 be configured per-service for
228 <citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>. The
229 latter kills processes of a session as soon as it
230 ends, the former kills processes as soon as the last
231 session of the user ends.</para>
235 <title>See Also</title>
237 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
238 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
239 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
240 <citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>