source: general/sysutils/elogind.xml@ a1bb0d9

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since a1bb0d9 was 702c50c, checked in by Pierre Labastie <pierre.labastie@…>, 13 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
Line 
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 &lfs113_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">Required</bridgehead>
79 <para role="required">
80 <xref linkend="Jinja2"/>
81 </para>
82
83 <bridgehead renderas="sect4">Recommended</bridgehead>
84 <para role="recommended">
85 <xref role="runtime" linkend="dbus"/> (runtime),
86 <xref linkend="linux-pam"/> (required for Xorg),
87 <xref role="runtime" linkend="polkit"/> (runtime),
88 <xref linkend="DocBook"/>,
89 <xref linkend="docbook-xsl"/>, and
90 <xref linkend="libxslt"/> (all three to build the man pages)
91 </para>
92
93 <bridgehead renderas="sect4">Optional</bridgehead>
94 <para role="optional">
95 <xref linkend="lxml"/>,
96 <xref linkend="zsh"/>,
97 <xref linkend="valgrind"/> (needed for tests),
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
104 <ulink url="https://selinuxproject.org/page/Main_Page">
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
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;
125 [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
126 Pseudo filesystems ---&gt;
127 [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</literal></screen>
128
129 <para>
130 In addition, some tests need the userspace cryptographic kernel API, which
131 is enabled with:
132 </para>
133
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>
139
140 <indexterm zone="elogind elogind-kernel">
141 <primary sortas="d-elogind">elogind</primary>
142 </indexterm>
143 </sect2>
144
145 <sect2 role="installation">
146 <title>Installation of elogind</title>
147
148 <para>
149 Install <application>elogind</application> by running the following
150 commands:
151 </para>
152
153<screen><userinput><!--sed -i '/Disable polkit/,+8 d' meson.build &amp;&amp;
154
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
161-->mkdir build &amp;&amp;
162cd build &amp;&amp;
163
164meson setup .. \
165 --prefix=/usr \
166 --buildtype=release \
167 -Dman=auto \
168 -Ddocdir=/usr/share/doc/elogind-&elogind-version; \
169 -Dcgroup-controller=elogind \
170 -Ddbuspolicydir=/etc/dbus-1/system.d &amp;&amp;
171ninja</userinput></screen>
172
173 <para>
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.
177 </para>
178
179 <para>
180 Now, as the <systemitem class="username">root</systemitem> user:
181 </para>
182
183<screen role="root"><userinput>ninja install &amp;&amp;
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>
191 <!--
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
195 runtime dependency) but able to use polkit after that package is
196 installed.
197 </para>
198
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>
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>
209
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>
221
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.
227 </para>
228
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
236 <para>
237 <option>-Ddefault-kill-user-processes=false</option>: Determines whether
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
244 <para>
245 <command>ln -s ...</command>: These commands install symlinks so that
246 software packages can find the systemd-compatible library and headers.
247 </para>
248
249 </sect2>
250
251 <sect2 role="configuration">
252 <title>Configuring elogind</title>
253
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
271 out. You may wish to disable automatically killing user processes when the user logs
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
283 be modified and a new file must be created in order for
284 <command>elogind</command> to work correctly. Run the following
285 commands as the <systemitem class="username">root</systemitem> user:
286 </para>
287
288<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
289<literal># Begin elogind addition
290
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
315 </sect3>
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>
336 /usr/lib/elogind,
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>
353 is used to introspect and monitor the D-Bus bus
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
366 inhibitor lock taken
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
379 Manager
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>
391 is the main elogind utility library
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
403</sect1>
Note: See TracBrowser for help on using the repository browser.