1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY elogind-download-http "https://github.com/elogind/elogind/archive/v&elogind-version;/elogind-&elogind-version;.tar.gz">
|
---|
8 | <!ENTITY elogind-download-ftp " ">
|
---|
9 | <!ENTITY elogind-md5sum "2be2c43298e2fc41c5bee33dde605f01">
|
---|
10 | <!ENTITY elogind-size "1.8 MB">
|
---|
11 | <!ENTITY elogind-buildsize "45 MB (with tests)">
|
---|
12 | <!ENTITY elogind-time "0.3 SBU (with parallelism=4)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="elogind" revision="sysv" xreflabel="elogind-&elogind-version;">
|
---|
16 | <?dbhtml filename="elogind.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>elogind-&elogind-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="elogind">
|
---|
22 | <primary sortas="a-elogind">elogind</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to elogind</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | <application>elogind</application> is the
|
---|
30 | <application>systemd</application> project's "logind", extracted to
|
---|
31 | be a standalone daemon. It integrates with <xref linkend="linux-pam"/>
|
---|
32 | to track all the users logged in to a system, and whether they
|
---|
33 | are logged in graphically, on the console, or remotely.
|
---|
34 | <application>Elogind</application> exposes this information via the
|
---|
35 | standard org.freedesktop.login1 <application>D-Bus</application>
|
---|
36 | interface, and also through the file system using systemd's standard
|
---|
37 | <filename class="directory">/run/systemd</filename> layout.
|
---|
38 | </para>
|
---|
39 |
|
---|
40 | &lfs120_checked;
|
---|
41 |
|
---|
42 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
43 | <itemizedlist spacing="compact">
|
---|
44 | <listitem>
|
---|
45 | <para>
|
---|
46 | Download (HTTP): <ulink url="&elogind-download-http;"/>
|
---|
47 | </para>
|
---|
48 | </listitem>
|
---|
49 | <listitem>
|
---|
50 | <para>
|
---|
51 | Download (FTP): <ulink url="&elogind-download-ftp;"/>
|
---|
52 | </para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>
|
---|
56 | Download MD5 sum: &elogind-md5sum;
|
---|
57 | </para>
|
---|
58 | </listitem>
|
---|
59 | <listitem>
|
---|
60 | <para>
|
---|
61 | Download size: &elogind-size;
|
---|
62 | </para>
|
---|
63 | </listitem>
|
---|
64 | <listitem>
|
---|
65 | <para>
|
---|
66 | Estimated disk space required: &elogind-buildsize;
|
---|
67 | </para>
|
---|
68 | </listitem>
|
---|
69 | <listitem>
|
---|
70 | <para>
|
---|
71 | Estimated build time: &elogind-time;
|
---|
72 | </para>
|
---|
73 | </listitem>
|
---|
74 | </itemizedlist>
|
---|
75 |
|
---|
76 | <bridgehead renderas="sect3">elogind Dependencies</bridgehead>
|
---|
77 |
|
---|
78 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
79 | <para role="recommended">
|
---|
80 | <xref role="runtime" linkend="dbus"/> (runtime),
|
---|
81 | <xref linkend="linux-pam"/> (required for Xorg),
|
---|
82 | <xref role="runtime" linkend="polkit"/> (runtime),
|
---|
83 | <xref linkend="DocBook"/>,
|
---|
84 | <xref linkend="docbook-xsl"/>, and
|
---|
85 | <xref linkend="libxslt"/> (all three to build the man pages)
|
---|
86 | </para>
|
---|
87 |
|
---|
88 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
89 | <para role="optional">
|
---|
90 | <xref linkend="lxml"/>,
|
---|
91 | <xref linkend="zsh"/>,
|
---|
92 | <xref linkend="valgrind"/> (needed for tests),
|
---|
93 | <ulink url="https://github.com/linux-audit/audit-userspace">
|
---|
94 | audit-userspace</ulink>,
|
---|
95 | <ulink url="https://github.com/scop/bash-completion">
|
---|
96 | bash-completion</ulink>,
|
---|
97 | <ulink url="https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kexec/">
|
---|
98 | kexec</ulink>, and
|
---|
99 | <ulink url="https://selinuxproject.org/page/Main_Page">
|
---|
100 | SELinux</ulink>
|
---|
101 | </para>
|
---|
102 |
|
---|
103 | </sect2>
|
---|
104 |
|
---|
105 | <sect2 role="kernel" id="elogind-kernel">
|
---|
106 | <title>Kernel Configuration</title>
|
---|
107 |
|
---|
108 | <para>
|
---|
109 | Enable the following options in the kernel configuration and recompile the
|
---|
110 | kernel if necessary:
|
---|
111 | </para>
|
---|
112 |
|
---|
113 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
114 | href="elogind-kernel.xml"/>
|
---|
115 |
|
---|
116 | <para>
|
---|
117 | In addition, some tests need the userspace cryptographic kernel API, which
|
---|
118 | is enabled with:
|
---|
119 | </para>
|
---|
120 |
|
---|
121 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
122 | href="elogind-test-kernel.xml"/>
|
---|
123 |
|
---|
124 | <indexterm zone="elogind elogind-kernel">
|
---|
125 | <primary sortas="d-elogind">elogind</primary>
|
---|
126 | </indexterm>
|
---|
127 | </sect2>
|
---|
128 |
|
---|
129 | <sect2 role="installation">
|
---|
130 | <title>Installation of elogind</title>
|
---|
131 |
|
---|
132 | <para>
|
---|
133 | Install <application>elogind</application> by running the following
|
---|
134 | commands:
|
---|
135 | </para>
|
---|
136 |
|
---|
137 | <screen><userinput><!--sed -i '/Disable polkit/,+8 d' meson.build &&
|
---|
138 |
|
---|
139 | sed '/request_name/i\
|
---|
140 | r = sd_bus_set_exit_on_disconnect(m->bus, true);\
|
---|
141 | if (r < 0)\
|
---|
142 | return log_error_errno(r, "Failed to set exit on disconnect: %m");' \
|
---|
143 | -i src/login/logind.c &&
|
---|
144 |
|
---|
145 | -->mkdir build &&
|
---|
146 | cd build &&
|
---|
147 |
|
---|
148 | meson setup .. \
|
---|
149 | --prefix=/usr \
|
---|
150 | --buildtype=release \
|
---|
151 | -Dman=auto \
|
---|
152 | -Ddocdir=/usr/share/doc/elogind-&elogind-version; \
|
---|
153 | -Dcgroup-controller=elogind \
|
---|
154 | -Ddbuspolicydir=/etc/dbus-1/system.d &&
|
---|
155 | ninja</userinput></screen>
|
---|
156 |
|
---|
157 | <para>
|
---|
158 | To test the results, issue: <command>ninja test</command>. A few tests
|
---|
159 | are skipped if not run with <systemitem class="username">root</systemitem>
|
---|
160 | privileges. Two tests named <filename>test-fs-util</filename> and
|
---|
161 | <filename>test-id128</filename> require the
|
---|
162 | <filename>/etc/machine-id</filename> symlink, so they will fail if
|
---|
163 | this symlink is not created following the instruction in
|
---|
164 | <xref linkend='dbus'/> yet.
|
---|
165 | </para>
|
---|
166 |
|
---|
167 | <para>
|
---|
168 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
169 | </para>
|
---|
170 |
|
---|
171 | <screen role="root"><userinput>ninja install &&
|
---|
172 | ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &&
|
---|
173 | ln -sfvn elogind /usr/include/systemd</userinput></screen>
|
---|
174 |
|
---|
175 | </sect2>
|
---|
176 |
|
---|
177 | <sect2 role="commands">
|
---|
178 | <title>Command Explanations</title>
|
---|
179 | <!--
|
---|
180 | <para>
|
---|
181 | <command>sed ... meson.build</command>: This change allows the
|
---|
182 | package to be built without polkit being installed (it is still a
|
---|
183 | runtime dependency) but able to use polkit after that package is
|
---|
184 | installed.
|
---|
185 | </para>
|
---|
186 |
|
---|
187 | <para>
|
---|
188 | <command>sed ... src/login/logind.c</command>: This change allows the
|
---|
189 | elogind daemon to exit when it is disconnected from dbus (for example
|
---|
190 | when dbus is killed).
|
---|
191 | </para>
|
---|
192 | -->
|
---|
193 | <para>
|
---|
194 | <parameter>-Ddocdir=/usr/share/doc/elogind-&elogind-version;</parameter>:
|
---|
195 | This is needed to install documentation in a versioned directory.
|
---|
196 | </para>
|
---|
197 |
|
---|
198 | <para>
|
---|
199 | <parameter>-Dcgroup-controller=elogind</parameter>: This switch is
|
---|
200 | necessary to build this package when the kernel is not built with
|
---|
201 | <option>CONFIG_CGROUPS</option> enabled. Note that
|
---|
202 | <application>elogind</application> strictly needs
|
---|
203 | a kernel with <option>CONFIG_CGROUPS</option> enabled at runtime,
|
---|
204 | but this switch will allow building the package first.
|
---|
205 | </para>
|
---|
206 |
|
---|
207 | <para>
|
---|
208 | <parameter>-Ddbuspolicydir=/etc/dbus-1/system.d</parameter>: This switch
|
---|
209 | sets the location of the <application>D-Bus</application> policy
|
---|
210 | directory.
|
---|
211 | </para>
|
---|
212 |
|
---|
213 | <para>
|
---|
214 | <parameter>-Dman=auto</parameter>: The default value of this switch is
|
---|
215 | <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
|
---|
216 | allows building and installing the man pages if the recommended
|
---|
217 | dependencies are installed.
|
---|
218 | </para>
|
---|
219 |
|
---|
220 | <para>
|
---|
221 | <option>-Dhtml=auto</option>: The default value of this switch is
|
---|
222 | <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
|
---|
223 | allows building and installing the html documentation if the recommended
|
---|
224 | dependencies are installed.
|
---|
225 | </para>
|
---|
226 |
|
---|
227 | <para>
|
---|
228 | <option>-Ddefault-kill-user-processes=false</option>: Determines whether
|
---|
229 | the processes of a user should be killed when the user logs out. The
|
---|
230 | default is <emphasis>true</emphasis>, but this defeats the traditional
|
---|
231 | use of <command>screen</command> or <command>tmux</command>. This can
|
---|
232 | also be changed in the configuration file (see below).
|
---|
233 | </para>
|
---|
234 |
|
---|
235 | <para>
|
---|
236 | <command>ln -s ...</command>: These commands install symlinks so that
|
---|
237 | software packages can find the systemd-compatible library and headers.
|
---|
238 | </para>
|
---|
239 |
|
---|
240 | </sect2>
|
---|
241 |
|
---|
242 | <sect2 role="configuration">
|
---|
243 | <title>Configuring elogind</title>
|
---|
244 |
|
---|
245 | <sect3 id="elogind-config">
|
---|
246 | <title>Config File</title>
|
---|
247 | <para>
|
---|
248 | <filename>/etc/elogind/logind.conf</filename>
|
---|
249 | </para>
|
---|
250 |
|
---|
251 | <indexterm zone="elogind elogind-config">
|
---|
252 | <primary
|
---|
253 | sortas="e-etc-elogind-logind.conf">/etc/elogind/logind.conf</primary>
|
---|
254 | </indexterm>
|
---|
255 | </sect3>
|
---|
256 |
|
---|
257 | <sect3><title>Configuration Information</title>
|
---|
258 |
|
---|
259 | <para>
|
---|
260 | The installed file <filename>/etc/elogind/logind.conf</filename>
|
---|
261 | contains all the possible options with their defaults, commented
|
---|
262 | out. You may wish to disable automatically killing user processes when the user logs
|
---|
263 | out, by running, as the <systemitem class="username">root</systemitem>
|
---|
264 | user:
|
---|
265 | </para>
|
---|
266 |
|
---|
267 | <screen role="root"><userinput>sed -e '/\[Login\]/a KillUserProcesses=no' \
|
---|
268 | -i /etc/elogind/logind.conf</userinput></screen>
|
---|
269 |
|
---|
270 | <para>
|
---|
271 | Each user will need to register a user session using
|
---|
272 | <application>Linux-PAM</application> at login. The
|
---|
273 | <filename>/etc/pam.d/system-session</filename> file needs to
|
---|
274 | be modified and a new file must be created in order for
|
---|
275 | <command>elogind</command> to work correctly. Run the following
|
---|
276 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
277 | </para>
|
---|
278 |
|
---|
279 | <screen role="root"><userinput>cat >> /etc/pam.d/system-session << "EOF" &&
|
---|
280 | <literal># Begin elogind addition
|
---|
281 |
|
---|
282 | session required pam_loginuid.so
|
---|
283 | session optional pam_elogind.so
|
---|
284 |
|
---|
285 | # End elogind addition</literal>
|
---|
286 | EOF
|
---|
287 | cat > /etc/pam.d/elogind-user << "EOF"
|
---|
288 | <literal># Begin /etc/pam.d/elogind-user
|
---|
289 |
|
---|
290 | account required pam_access.so
|
---|
291 | account include system-account
|
---|
292 |
|
---|
293 | session required pam_env.so
|
---|
294 | session required pam_limits.so
|
---|
295 | session required pam_unix.so
|
---|
296 | session required pam_loginuid.so
|
---|
297 | session optional pam_keyinit.so force revoke
|
---|
298 | session optional pam_elogind.so
|
---|
299 |
|
---|
300 | auth required pam_deny.so
|
---|
301 | password required pam_deny.so
|
---|
302 |
|
---|
303 | # End /etc/pam.d/elogind-user</literal>
|
---|
304 | EOF</userinput></screen>
|
---|
305 |
|
---|
306 | </sect3>
|
---|
307 | </sect2>
|
---|
308 |
|
---|
309 | <sect2 role="content" revision="sysv">
|
---|
310 | <title>Contents</title>
|
---|
311 |
|
---|
312 | <segmentedlist>
|
---|
313 | <segtitle>Installed Programs</segtitle>
|
---|
314 | <segtitle>Installed Library</segtitle>
|
---|
315 | <segtitle>Installed Directories</segtitle>
|
---|
316 |
|
---|
317 | <seglistitem>
|
---|
318 | <seg>
|
---|
319 | busctl,
|
---|
320 | elogind-inhibit, and
|
---|
321 | loginctl
|
---|
322 | </seg>
|
---|
323 | <seg>
|
---|
324 | libelogind.so
|
---|
325 | </seg>
|
---|
326 | <seg>
|
---|
327 | /usr/lib/elogind,
|
---|
328 | /etc/elogind,
|
---|
329 | /usr/include/elogind, and
|
---|
330 | /usr/share/doc/elogind-&elogind-version;
|
---|
331 | </seg>
|
---|
332 | </seglistitem>
|
---|
333 | </segmentedlist>
|
---|
334 |
|
---|
335 | <variablelist>
|
---|
336 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
337 | <?dbfo list-presentation="list"?>
|
---|
338 | <?dbhtml list-presentation="table"?>
|
---|
339 |
|
---|
340 | <varlistentry id="busctl">
|
---|
341 | <term><command>busctl</command></term>
|
---|
342 | <listitem>
|
---|
343 | <para>
|
---|
344 | is used to introspect and monitor the D-Bus bus
|
---|
345 | </para>
|
---|
346 | <indexterm zone="elogind busctl">
|
---|
347 | <primary sortas="b-busctl">busctl</primary>
|
---|
348 | </indexterm>
|
---|
349 | </listitem>
|
---|
350 | </varlistentry>
|
---|
351 |
|
---|
352 | <varlistentry id="elogind-inhibit">
|
---|
353 | <term><command>elogind-inhibit</command></term>
|
---|
354 | <listitem>
|
---|
355 | <para>
|
---|
356 | is used to execute a program with a shutdown, sleep or idle
|
---|
357 | inhibitor lock taken
|
---|
358 | </para>
|
---|
359 | <indexterm zone="elogind elogind-inhibit">
|
---|
360 | <primary sortas="b-elogind-inhibit">elogind-inhibit</primary>
|
---|
361 | </indexterm>
|
---|
362 | </listitem>
|
---|
363 | </varlistentry>
|
---|
364 |
|
---|
365 | <varlistentry id="loginctl">
|
---|
366 | <term><command>loginctl</command></term>
|
---|
367 | <listitem>
|
---|
368 | <para>
|
---|
369 | is used to introspect and control the state of the elogind Login
|
---|
370 | Manager
|
---|
371 | </para>
|
---|
372 | <indexterm zone="elogind loginctl">
|
---|
373 | <primary sortas="b-loginctl">loginctl</primary>
|
---|
374 | </indexterm>
|
---|
375 | </listitem>
|
---|
376 | </varlistentry>
|
---|
377 |
|
---|
378 | <varlistentry id="libelogind">
|
---|
379 | <term><filename class="libraryfile">libelogind.so</filename></term>
|
---|
380 | <listitem>
|
---|
381 | <para>
|
---|
382 | is the main elogind utility library
|
---|
383 | </para>
|
---|
384 | <indexterm zone="elogind libelogind">
|
---|
385 | <primary sortas="c-libelogind">libelogind.so</primary>
|
---|
386 | </indexterm>
|
---|
387 | </listitem>
|
---|
388 | </varlistentry>
|
---|
389 |
|
---|
390 | </variablelist>
|
---|
391 |
|
---|
392 | </sect2>
|
---|
393 |
|
---|
394 | </sect1>
|
---|