source: general/sysutils/elogind.xml@ b674aa1

12.0 12.1 gimp3 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/for-12.3 xry111/llvm18 xry111/spidermonkey128 xry111/xf86-video-removal
Last change on this file since b674aa1 was b980f67, checked in by Xi Ruoyao <xry111@…>, 14 months ago

elogind: Fix the desc for -Dcgroup-controller

The value of this switch only makes a difference with cgroupv1. But we
are using Linux 6.x, and elogind is built with
-Ddefault_hierarchy=unified (the default), so it actually uses cgroupv2
and it seems we don't really need this switch.

But after a closer look at the building system I realized if the kernel
is not built with CONFIG_CGROUPS enabled (for example in a chroot
environment where the host does not enable this), the building system
will refuse to build the package w/o an explicit setting here. So
update the description.

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