source: general/sysutils/elogind.xml@ ba6e7d32

12.2 gimp3 lazarus trunk xry111/for-12.3 xry111/spidermonkey128
Last change on this file since ba6e7d32 was 88f6e30, checked in by Bruce Dubbs <bdubbs@…>, 6 months ago

Update to elogind-252.23.

  • Property mode set to 100644
File size: 13.6 KB
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[ff3264f]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 " ">
[88f6e30]9 <!ENTITY elogind-md5sum "7e93e0df7348edac3c9fb1223a7deda8">
[1db852a]10 <!ENTITY elogind-size "1.8 MB">
[88f6e30]11 <!ENTITY elogind-buildsize "54 MB (with tests)">
12 <!ENTITY elogind-time "0.2 SBU (with parallelism=4; with tests)">
[ff3264f]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
[76a6005]30 <application>systemd</application> project's "logind", extracted to
[ff3264f]31 be a standalone daemon. It integrates with <xref linkend="linux-pam"/>
[76a6005]32 to track all the users logged in to a system, and whether they
[ff3264f]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>
[76a6005]36 interface, and also through the file system using systemd's standard
[ff3264f]37 <filename class="directory">/run/systemd</filename> layout.
38 </para>
39
[b9874725]40 &lfs121_checked;
[ff3264f]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">
[992c9e7]80 <xref role="runtime" linkend="dbus"/> (runtime),
[779b3223]81 <xref linkend="linux-pam"/> (required for Xorg),
[992c9e7]82 <xref role="runtime" linkend="polkit"/> (runtime),
[ff3264f]83 <xref linkend="DocBook"/>,
84 <xref linkend="docbook-xsl"/>, and
[8558044]85 <xref linkend="libxslt"/> (all three to build the man pages)
[ff3264f]86 </para>
87
88 <bridgehead renderas="sect4">Optional</bridgehead>
89 <para role="optional">
90 <xref linkend="lxml"/>,
91 <xref linkend="zsh"/>,
[992c9e7]92 <xref linkend="valgrind"/> (needed for tests),
[ff3264f]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
[6e2eb5cf]99 <ulink url="https://selinuxproject.org/page/Main_Page">
[ff3264f]100 SELinux</ulink>
101 </para>
102
[2f19398]103 <para condition="html" role="usernotes">
104 Editor Notes: <ulink url="&blfs-wiki;/Logind"/>
105 </para>
106
[ff3264f]107 </sect2>
108
[398b4239]109 <sect2 role="kernel" id="elogind-kernel">
110 <title>Kernel Configuration</title>
111
112 <para>
113 Enable the following options in the kernel configuration and recompile the
114 kernel if necessary:
115 </para>
116
[e7cd19a]117 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
118 href="elogind-kernel.xml"/>
[398b4239]119
[cce4984]120 <para>
121 In addition, some tests need the userspace cryptographic kernel API, which
122 is enabled with:
123 </para>
124
[e7cd19a]125 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
126 href="elogind-test-kernel.xml"/>
[cce4984]127
[398b4239]128 <indexterm zone="elogind elogind-kernel">
129 <primary sortas="d-elogind">elogind</primary>
130 </indexterm>
131 </sect2>
132
[ff3264f]133 <sect2 role="installation">
134 <title>Installation of elogind</title>
[7a1065c]135
[ff3264f]136 <para>
137 Install <application>elogind</application> by running the following
138 commands:
139 </para>
140
[88f6e30]141<screen><userinput>mkdir build &amp;&amp;
[488cea3]142cd build &amp;&amp;
[ff3264f]143
[1db852a]144meson setup .. \
145 --prefix=/usr \
146 --buildtype=release \
147 -Dman=auto \
148 -Ddocdir=/usr/share/doc/elogind-&elogind-version; \
149 -Dcgroup-controller=elogind \
[1a743079]150 -Ddev-kvm-mode=0660 \
[91318eb]151 -Ddbuspolicydir=/etc/dbus-1/system.d &amp;&amp;
[ff3264f]152ninja</userinput></screen>
153
154 <para>
[cce4984]155 To test the results, issue: <command>ninja test</command>. A few tests
[88f6e30]156 are skipped if not run with &root; privileges.
157 One test, <filename>test-fs-util</filename> is known to fail.
158 <!--
[eb9f0ef]159 <filename>test-id128</filename> require the
160 <filename>/etc/machine-id</filename> symlink, so they will fail if
161 this symlink is not created following the instruction in
162 <xref linkend='dbus'/> yet.
[88f6e30]163
164 I did have the symlink and test-fs-util still failed (the only
165 one). The error was
166 Assertion 'chase_symlinks(q, NULL, CHASE_SAFE, NULL, NULL) >= 0'
167 failed at src/test/test-fs-util.c:303, function
168 test_chase_symlinks(). Aborting.
169 Looking at teh code, I don't think that is related to the
170 /etc/machine-id symlink. - bdubbs, version 252.23
171 -->
[ff3264f]172 </para>
173
174 <para>
175 Now, as the <systemitem class="username">root</systemitem> user:
176 </para>
177
[1ede364c]178<screen role="root"><userinput>ninja install &amp;&amp;
[ff3264f]179ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &amp;&amp;
180ln -sfvn elogind /usr/include/systemd</userinput></screen>
181
182 </sect2>
183
184 <sect2 role="commands">
185 <title>Command Explanations</title>
[1db852a]186 <!--
[65d85668]187 <para>
188 <command>sed ... meson.build</command>: This change allows the
189 package to be built without polkit being installed (it is still a
[8558044]190 runtime dependency) but able to use polkit after that package is
[65d85668]191 installed.
192 </para>
193
[27e5cd4c]194 <para>
195 <command>sed ... src/login/logind.c</command>: This change allows the
196 elogind daemon to exit when it is disconnected from dbus (for example
197 when dbus is killed).
198 </para>
[1db852a]199 -->
200 <para>
201 <parameter>-Ddocdir=/usr/share/doc/elogind-&elogind-version;</parameter>:
202 This is needed to install documentation in a versioned directory.
203 </para>
[27e5cd4c]204
[ff3264f]205 <para>
[b980f67]206 <parameter>-Dcgroup-controller=elogind</parameter>: This switch is
207 necessary to build this package when the kernel is not built with
208 <option>CONFIG_CGROUPS</option> enabled. Note that
209 <application>elogind</application> strictly needs
210 a kernel with <option>CONFIG_CGROUPS</option> enabled at runtime,
211 but this switch will allow building the package first.
[ff3264f]212 </para>
213
214 <para>
215 <parameter>-Ddbuspolicydir=/etc/dbus-1/system.d</parameter>: This switch
216 sets the location of the <application>D-Bus</application> policy
217 directory.
218 </para>
[adb90981]219
[1a743079]220 <para>
[778470d]221 <parameter>-Ddev-kvm-mode=0660</parameter>: The LFS udev rule sets the
222 mode of <filename class='devicefile'>/dev/kvm</filename> to 0660.
223 This option ensures the elogind udev rules consistent with the LFS
224 configuration.
[1a743079]225 </para>
226
[cce4984]227 <para>
228 <parameter>-Dman=auto</parameter>: The default value of this switch is
229 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
230 allows building and installing the man pages if the recommended
231 dependencies are installed.
[adb90981]232 </para>
[ff3264f]233
[1db852a]234 <para>
235 <option>-Dhtml=auto</option>: The default value of this switch is
236 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
237 allows building and installing the html documentation if the recommended
238 dependencies are installed.
239 </para>
240
[6545b53f]241 <para>
[76a6005]242 <option>-Ddefault-kill-user-processes=false</option>: Determines whether
[6545b53f]243 the processes of a user should be killed when the user logs out. The
244 default is <emphasis>true</emphasis>, but this defeats the traditional
245 use of <command>screen</command> or <command>tmux</command>. This can
246 also be changed in the configuration file (see below).
247 </para>
248
[ff3264f]249 <para>
250 <command>ln -s ...</command>: These commands install symlinks so that
[76a6005]251 software packages can find the systemd-compatible library and headers.
[ff3264f]252 </para>
253
254 </sect2>
255
256 <sect2 role="configuration">
257 <title>Configuring elogind</title>
258
[6545b53f]259 <sect3 id="elogind-config">
260 <title>Config File</title>
261 <para>
262 <filename>/etc/elogind/logind.conf</filename>
263 </para>
264
265 <indexterm zone="elogind elogind-config">
266 <primary
267 sortas="e-etc-elogind-logind.conf">/etc/elogind/logind.conf</primary>
268 </indexterm>
269 </sect3>
270
271 <sect3><title>Configuration Information</title>
272
273 <para>
274 The installed file <filename>/etc/elogind/logind.conf</filename>
275 contains all the possible options with their defaults, commented
[76a6005]276 out. You may wish to disable automatically killing user processes when the user logs
[6545b53f]277 out, by running, as the <systemitem class="username">root</systemitem>
278 user:
279 </para>
280
281<screen role="root"><userinput>sed -e '/\[Login\]/a KillUserProcesses=no' \
282 -i /etc/elogind/logind.conf</userinput></screen>
283
284 <para>
285 Each user will need to register a user session using
286 <application>Linux-PAM</application> at login. The
287 <filename>/etc/pam.d/system-session</filename> file needs to
[76a6005]288 be modified and a new file must be created in order for
[6545b53f]289 <command>elogind</command> to work correctly. Run the following
290 commands as the <systemitem class="username">root</systemitem> user:
291 </para>
[ff3264f]292
293<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
294<literal># Begin elogind addition
[8558044]295
[ff3264f]296session required pam_loginuid.so
297session optional pam_elogind.so
298
299# End elogind addition</literal>
300EOF
301cat &gt; /etc/pam.d/elogind-user &lt;&lt; "EOF"
302<literal># Begin /etc/pam.d/elogind-user
303
304account required pam_access.so
305account include system-account
306
307session required pam_env.so
308session required pam_limits.so
309session required pam_unix.so
310session required pam_loginuid.so
311session optional pam_keyinit.so force revoke
312session optional pam_elogind.so
313
314auth required pam_deny.so
315password required pam_deny.so
316
317# End /etc/pam.d/elogind-user</literal>
318EOF</userinput></screen>
319
[9535ecf8]320 <note>
[4b853a96]321 <para>After completion of <application>elogind</application>,
[9535ecf8]322 you should check that it functions properly. First ensure that
323 <application>dbus</application> is running. It may be easiest
324 to do this by rebooting the system. After logging in again, run
325 the command <command>loginctl</command>. The result should indicate
326 that a SESSION and a SEAT have been created.</para>
327 </note>
328
[6545b53f]329 </sect3>
[ff3264f]330 </sect2>
331
332 <sect2 role="content" revision="sysv">
333 <title>Contents</title>
334
335 <segmentedlist>
336 <segtitle>Installed Programs</segtitle>
337 <segtitle>Installed Library</segtitle>
338 <segtitle>Installed Directories</segtitle>
339
340 <seglistitem>
341 <seg>
342 busctl,
343 elogind-inhibit, and
344 loginctl
345 </seg>
346 <seg>
347 libelogind.so
348 </seg>
349 <seg>
[1db852a]350 /usr/lib/elogind,
[ff3264f]351 /etc/elogind,
352 /usr/include/elogind, and
353 /usr/share/doc/elogind-&elogind-version;
354 </seg>
355 </seglistitem>
356 </segmentedlist>
357
358 <variablelist>
359 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
360 <?dbfo list-presentation="list"?>
361 <?dbhtml list-presentation="table"?>
362
363 <varlistentry id="busctl">
364 <term><command>busctl</command></term>
365 <listitem>
366 <para>
[4c24eb0a]367 is used to introspect and monitor the D-Bus bus
[ff3264f]368 </para>
369 <indexterm zone="elogind busctl">
370 <primary sortas="b-busctl">busctl</primary>
371 </indexterm>
372 </listitem>
373 </varlistentry>
374
375 <varlistentry id="elogind-inhibit">
376 <term><command>elogind-inhibit</command></term>
377 <listitem>
378 <para>
379 is used to execute a program with a shutdown, sleep or idle
[4c24eb0a]380 inhibitor lock taken
[ff3264f]381 </para>
382 <indexterm zone="elogind elogind-inhibit">
383 <primary sortas="b-elogind-inhibit">elogind-inhibit</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="loginctl">
389 <term><command>loginctl</command></term>
390 <listitem>
391 <para>
392 is used to introspect and control the state of the elogind Login
[4c24eb0a]393 Manager
[ff3264f]394 </para>
395 <indexterm zone="elogind loginctl">
396 <primary sortas="b-loginctl">loginctl</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="libelogind">
402 <term><filename class="libraryfile">libelogind.so</filename></term>
403 <listitem>
404 <para>
[4c24eb0a]405 is the main elogind utility library
[ff3264f]406 </para>
407 <indexterm zone="elogind libelogind">
408 <primary sortas="c-libelogind">libelogind.so</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
413 </variablelist>
414
415 </sect2>
416
[4c24eb0a]417</sect1>
Note: See TracBrowser for help on using the repository browser.