source: general/sysutils/elogind.xml@ 08c3c25

12.0 12.1 ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18
Last change on this file since 08c3c25 was 32c1b77, checked in by Xi Ruoyao <xry111@…>, 11 months ago

Archive MarkupSafe and Jinja2

They are now a part of LFS for both sysv and systemd.

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