source: general/sysutils/elogind.xml@ d3daa9fe

12.0 12.1 gimp3 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since d3daa9fe was 702c50c, checked in by Pierre Labastie <pierre.labastie@…>, 15 months ago

Add Jinja2 as required for elogind

It's a new dependency in 252.9. I had not seen it when upgrading.

  • Property mode set to 100644
File size: 13.0 KB
RevLine 
[ff3264f]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 " ">
[1db852a]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)">
[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
[dc1a45e]40 &lfs113_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
[702c50c]78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required">
80 <xref linkend="Jinja2"/>
81 </para>
82
[ff3264f]83 <bridgehead renderas="sect4">Recommended</bridgehead>
84 <para role="recommended">
[992c9e7]85 <xref role="runtime" linkend="dbus"/> (runtime),
[779b3223]86 <xref linkend="linux-pam"/> (required for Xorg),
[992c9e7]87 <xref role="runtime" linkend="polkit"/> (runtime),
[ff3264f]88 <xref linkend="DocBook"/>,
89 <xref linkend="docbook-xsl"/>, and
[8558044]90 <xref linkend="libxslt"/> (all three to build the man pages)
[ff3264f]91 </para>
92
93 <bridgehead renderas="sect4">Optional</bridgehead>
94 <para role="optional">
95 <xref linkend="lxml"/>,
96 <xref linkend="zsh"/>,
[992c9e7]97 <xref linkend="valgrind"/> (needed for tests),
[ff3264f]98 <ulink url="https://github.com/linux-audit/audit-userspace">
99 audit-userspace</ulink>,
100 <ulink url="https://github.com/scop/bash-completion">
101 bash-completion</ulink>,
102 <ulink url="https://mirrors.edge.kernel.org/pub/linux/utils/kernel/kexec/">
103 kexec</ulink>, and
[6e2eb5cf]104 <ulink url="https://selinuxproject.org/page/Main_Page">
[ff3264f]105 SELinux</ulink>
106 </para>
107
108 <para condition="html" role="usernotes">User Notes:
109 <ulink url="&blfs-wiki;/elogind"/>
110 </para>
111 </sect2>
112
[398b4239]113 <sect2 role="kernel" id="elogind-kernel">
114 <title>Kernel Configuration</title>
115
116 <para>
117 Enable the following options in the kernel configuration and recompile the
118 kernel if necessary:
119 </para>
120
121<!-- Spaces are significant in <screen> sections -->
122<screen><literal>General setup ---&gt;
123 [*] Control Group support [CONFIG_CGROUPS]
124File systems ---&gt;
[6735113]125 [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
126 Pseudo filesystems ---&gt;
127 [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</literal></screen>
[398b4239]128
[cce4984]129 <para>
130 In addition, some tests need the userspace cryptographic kernel API, which
131 is enabled with:
132 </para>
133
[c667e1e]134<screen><literal>-*- Cryptographic API ---&gt; [CONFIG_CRYPTO]
135 Crypto core or helper --->
136 &lt;M/*&gt; Userspace cryptographic algorithm configuration [CONFIG_CRYPTO_USER]
137 Userspace interface --->
138 &lt;M/*&gt; Hash algorithms [CONFIG_CRYPTO_USER_API_HASH]</literal></screen>
[cce4984]139
[398b4239]140 <indexterm zone="elogind elogind-kernel">
141 <primary sortas="d-elogind">elogind</primary>
142 </indexterm>
143 </sect2>
144
[ff3264f]145 <sect2 role="installation">
146 <title>Installation of elogind</title>
[7a1065c]147
[ff3264f]148 <para>
149 Install <application>elogind</application> by running the following
150 commands:
151 </para>
152
[1db852a]153<screen><userinput><!--sed -i '/Disable polkit/,+8 d' meson.build &amp;&amp;
[65d85668]154
[27e5cd4c]155sed '/request_name/i\
156r = sd_bus_set_exit_on_disconnect(m->bus, true);\
157if (r &lt; 0)\
158 return log_error_errno(r, "Failed to set exit on disconnect: %m");' \
159 -i src/login/logind.c &amp;&amp;
160
[1db852a]161-->mkdir build &amp;&amp;
[488cea3]162cd build &amp;&amp;
[ff3264f]163
[1db852a]164meson setup .. \
165 --prefix=/usr \
166 --buildtype=release \
167 -Dman=auto \
168 -Ddocdir=/usr/share/doc/elogind-&elogind-version; \
169 -Dcgroup-controller=elogind \
[91318eb]170 -Ddbuspolicydir=/etc/dbus-1/system.d &amp;&amp;
[ff3264f]171ninja</userinput></screen>
172
173 <para>
[cce4984]174 To test the results, issue: <command>ninja test</command>. A few tests
175 are skipped if not run with <systemitem class="username">root</systemitem>
176 privileges.
[ff3264f]177 </para>
178
179 <para>
180 Now, as the <systemitem class="username">root</systemitem> user:
181 </para>
182
[1ede364c]183<screen role="root"><userinput>ninja install &amp;&amp;
[ff3264f]184ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &amp;&amp;
185ln -sfvn elogind /usr/include/systemd</userinput></screen>
186
187 </sect2>
188
189 <sect2 role="commands">
190 <title>Command Explanations</title>
[1db852a]191 <!--
[65d85668]192 <para>
193 <command>sed ... meson.build</command>: This change allows the
194 package to be built without polkit being installed (it is still a
[8558044]195 runtime dependency) but able to use polkit after that package is
[65d85668]196 installed.
197 </para>
198
[27e5cd4c]199 <para>
200 <command>sed ... src/login/logind.c</command>: This change allows the
201 elogind daemon to exit when it is disconnected from dbus (for example
202 when dbus is killed).
203 </para>
[1db852a]204 -->
205 <para>
206 <parameter>-Ddocdir=/usr/share/doc/elogind-&elogind-version;</parameter>:
207 This is needed to install documentation in a versioned directory.
208 </para>
[27e5cd4c]209
[ff3264f]210 <para>
211 <parameter>-Dcgroup-controller=elogind</parameter>: This switch ensures
212 that <application>elogind</application> is selected as the cgroup
213 controller, even if booted with another running cgroup controller.
214 </para>
215
216 <para>
217 <parameter>-Ddbuspolicydir=/etc/dbus-1/system.d</parameter>: This switch
218 sets the location of the <application>D-Bus</application> policy
219 directory.
220 </para>
[adb90981]221
[cce4984]222 <para>
223 <parameter>-Dman=auto</parameter>: The default value of this switch is
224 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
225 allows building and installing the man pages if the recommended
226 dependencies are installed.
[adb90981]227 </para>
[ff3264f]228
[1db852a]229 <para>
230 <option>-Dhtml=auto</option>: The default value of this switch is
231 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
232 allows building and installing the html documentation if the recommended
233 dependencies are installed.
234 </para>
235
[6545b53f]236 <para>
[76a6005]237 <option>-Ddefault-kill-user-processes=false</option>: Determines whether
[6545b53f]238 the processes of a user should be killed when the user logs out. The
239 default is <emphasis>true</emphasis>, but this defeats the traditional
240 use of <command>screen</command> or <command>tmux</command>. This can
241 also be changed in the configuration file (see below).
242 </para>
243
[ff3264f]244 <para>
245 <command>ln -s ...</command>: These commands install symlinks so that
[76a6005]246 software packages can find the systemd-compatible library and headers.
[ff3264f]247 </para>
248
249 </sect2>
250
251 <sect2 role="configuration">
252 <title>Configuring elogind</title>
253
[6545b53f]254 <sect3 id="elogind-config">
255 <title>Config File</title>
256 <para>
257 <filename>/etc/elogind/logind.conf</filename>
258 </para>
259
260 <indexterm zone="elogind elogind-config">
261 <primary
262 sortas="e-etc-elogind-logind.conf">/etc/elogind/logind.conf</primary>
263 </indexterm>
264 </sect3>
265
266 <sect3><title>Configuration Information</title>
267
268 <para>
269 The installed file <filename>/etc/elogind/logind.conf</filename>
270 contains all the possible options with their defaults, commented
[76a6005]271 out. You may wish to disable automatically killing user processes when the user logs
[6545b53f]272 out, by running, as the <systemitem class="username">root</systemitem>
273 user:
274 </para>
275
276<screen role="root"><userinput>sed -e '/\[Login\]/a KillUserProcesses=no' \
277 -i /etc/elogind/logind.conf</userinput></screen>
278
279 <para>
280 Each user will need to register a user session using
281 <application>Linux-PAM</application> at login. The
282 <filename>/etc/pam.d/system-session</filename> file needs to
[76a6005]283 be modified and a new file must be created in order for
[6545b53f]284 <command>elogind</command> to work correctly. Run the following
285 commands as the <systemitem class="username">root</systemitem> user:
286 </para>
[ff3264f]287
288<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
289<literal># Begin elogind addition
[8558044]290
[ff3264f]291session required pam_loginuid.so
292session optional pam_elogind.so
293
294# End elogind addition</literal>
295EOF
296cat &gt; /etc/pam.d/elogind-user &lt;&lt; "EOF"
297<literal># Begin /etc/pam.d/elogind-user
298
299account required pam_access.so
300account include system-account
301
302session required pam_env.so
303session required pam_limits.so
304session required pam_unix.so
305session required pam_loginuid.so
306session optional pam_keyinit.so force revoke
307session optional pam_elogind.so
308
309auth required pam_deny.so
310password required pam_deny.so
311
312# End /etc/pam.d/elogind-user</literal>
313EOF</userinput></screen>
314
[6545b53f]315 </sect3>
[ff3264f]316 </sect2>
317
318 <sect2 role="content" revision="sysv">
319 <title>Contents</title>
320
321 <segmentedlist>
322 <segtitle>Installed Programs</segtitle>
323 <segtitle>Installed Library</segtitle>
324 <segtitle>Installed Directories</segtitle>
325
326 <seglistitem>
327 <seg>
328 busctl,
329 elogind-inhibit, and
330 loginctl
331 </seg>
332 <seg>
333 libelogind.so
334 </seg>
335 <seg>
[1db852a]336 /usr/lib/elogind,
[ff3264f]337 /etc/elogind,
338 /usr/include/elogind, and
339 /usr/share/doc/elogind-&elogind-version;
340 </seg>
341 </seglistitem>
342 </segmentedlist>
343
344 <variablelist>
345 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
346 <?dbfo list-presentation="list"?>
347 <?dbhtml list-presentation="table"?>
348
349 <varlistentry id="busctl">
350 <term><command>busctl</command></term>
351 <listitem>
352 <para>
[4c24eb0a]353 is used to introspect and monitor the D-Bus bus
[ff3264f]354 </para>
355 <indexterm zone="elogind busctl">
356 <primary sortas="b-busctl">busctl</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="elogind-inhibit">
362 <term><command>elogind-inhibit</command></term>
363 <listitem>
364 <para>
365 is used to execute a program with a shutdown, sleep or idle
[4c24eb0a]366 inhibitor lock taken
[ff3264f]367 </para>
368 <indexterm zone="elogind elogind-inhibit">
369 <primary sortas="b-elogind-inhibit">elogind-inhibit</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="loginctl">
375 <term><command>loginctl</command></term>
376 <listitem>
377 <para>
378 is used to introspect and control the state of the elogind Login
[4c24eb0a]379 Manager
[ff3264f]380 </para>
381 <indexterm zone="elogind loginctl">
382 <primary sortas="b-loginctl">loginctl</primary>
383 </indexterm>
384 </listitem>
385 </varlistentry>
386
387 <varlistentry id="libelogind">
388 <term><filename class="libraryfile">libelogind.so</filename></term>
389 <listitem>
390 <para>
[4c24eb0a]391 is the main elogind utility library
[ff3264f]392 </para>
393 <indexterm zone="elogind libelogind">
394 <primary sortas="c-libelogind">libelogind.so</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 </variablelist>
400
401 </sect2>
402
[4c24eb0a]403</sect1>
Note: See TracBrowser for help on using the repository browser.