source: general/sysutils/elogind.xml@ cb594b6c

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 cb594b6c was cb594b6c, checked in by Xi Ruoyao <xry111@…>, 11 months ago

general: Remove non-exist User Notes link

Part of User Notes removal by
https://www.linuxfromscratch.org/~xry111/remove-nonexist-usernote.sh

  • Property mode set to 100644
File size: 12.9 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.
174 </para>
175
176 <para>
177 Now, as the <systemitem class="username">root</systemitem> user:
178 </para>
179
180<screen role="root"><userinput>ninja install &amp;&amp;
181ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &amp;&amp;
182ln -sfvn elogind /usr/include/systemd</userinput></screen>
183
184 </sect2>
185
186 <sect2 role="commands">
187 <title>Command Explanations</title>
188 <!--
189 <para>
190 <command>sed ... meson.build</command>: This change allows the
191 package to be built without polkit being installed (it is still a
192 runtime dependency) but able to use polkit after that package is
193 installed.
194 </para>
195
196 <para>
197 <command>sed ... src/login/logind.c</command>: This change allows the
198 elogind daemon to exit when it is disconnected from dbus (for example
199 when dbus is killed).
200 </para>
201 -->
202 <para>
203 <parameter>-Ddocdir=/usr/share/doc/elogind-&elogind-version;</parameter>:
204 This is needed to install documentation in a versioned directory.
205 </para>
206
207 <para>
208 <parameter>-Dcgroup-controller=elogind</parameter>: This switch ensures
209 that <application>elogind</application> is selected as the cgroup
210 controller, even if booted with another running cgroup controller.
211 </para>
212
213 <para>
214 <parameter>-Ddbuspolicydir=/etc/dbus-1/system.d</parameter>: This switch
215 sets the location of the <application>D-Bus</application> policy
216 directory.
217 </para>
218
219 <para>
220 <parameter>-Dman=auto</parameter>: The default value of this switch is
221 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
222 allows building and installing the man pages if the recommended
223 dependencies are installed.
224 </para>
225
226 <para>
227 <option>-Dhtml=auto</option>: The default value of this switch is
228 <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
229 allows building and installing the html documentation if the recommended
230 dependencies are installed.
231 </para>
232
233 <para>
234 <option>-Ddefault-kill-user-processes=false</option>: Determines whether
235 the processes of a user should be killed when the user logs out. The
236 default is <emphasis>true</emphasis>, but this defeats the traditional
237 use of <command>screen</command> or <command>tmux</command>. This can
238 also be changed in the configuration file (see below).
239 </para>
240
241 <para>
242 <command>ln -s ...</command>: These commands install symlinks so that
243 software packages can find the systemd-compatible library and headers.
244 </para>
245
246 </sect2>
247
248 <sect2 role="configuration">
249 <title>Configuring elogind</title>
250
251 <sect3 id="elogind-config">
252 <title>Config File</title>
253 <para>
254 <filename>/etc/elogind/logind.conf</filename>
255 </para>
256
257 <indexterm zone="elogind elogind-config">
258 <primary
259 sortas="e-etc-elogind-logind.conf">/etc/elogind/logind.conf</primary>
260 </indexterm>
261 </sect3>
262
263 <sect3><title>Configuration Information</title>
264
265 <para>
266 The installed file <filename>/etc/elogind/logind.conf</filename>
267 contains all the possible options with their defaults, commented
268 out. You may wish to disable automatically killing user processes when the user logs
269 out, by running, as the <systemitem class="username">root</systemitem>
270 user:
271 </para>
272
273<screen role="root"><userinput>sed -e '/\[Login\]/a KillUserProcesses=no' \
274 -i /etc/elogind/logind.conf</userinput></screen>
275
276 <para>
277 Each user will need to register a user session using
278 <application>Linux-PAM</application> at login. The
279 <filename>/etc/pam.d/system-session</filename> file needs to
280 be modified and a new file must be created in order for
281 <command>elogind</command> to work correctly. Run the following
282 commands as the <systemitem class="username">root</systemitem> user:
283 </para>
284
285<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
286<literal># Begin elogind addition
287
288session required pam_loginuid.so
289session optional pam_elogind.so
290
291# End elogind addition</literal>
292EOF
293cat &gt; /etc/pam.d/elogind-user &lt;&lt; "EOF"
294<literal># Begin /etc/pam.d/elogind-user
295
296account required pam_access.so
297account include system-account
298
299session required pam_env.so
300session required pam_limits.so
301session required pam_unix.so
302session required pam_loginuid.so
303session optional pam_keyinit.so force revoke
304session optional pam_elogind.so
305
306auth required pam_deny.so
307password required pam_deny.so
308
309# End /etc/pam.d/elogind-user</literal>
310EOF</userinput></screen>
311
312 </sect3>
313 </sect2>
314
315 <sect2 role="content" revision="sysv">
316 <title>Contents</title>
317
318 <segmentedlist>
319 <segtitle>Installed Programs</segtitle>
320 <segtitle>Installed Library</segtitle>
321 <segtitle>Installed Directories</segtitle>
322
323 <seglistitem>
324 <seg>
325 busctl,
326 elogind-inhibit, and
327 loginctl
328 </seg>
329 <seg>
330 libelogind.so
331 </seg>
332 <seg>
333 /usr/lib/elogind,
334 /etc/elogind,
335 /usr/include/elogind, and
336 /usr/share/doc/elogind-&elogind-version;
337 </seg>
338 </seglistitem>
339 </segmentedlist>
340
341 <variablelist>
342 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
343 <?dbfo list-presentation="list"?>
344 <?dbhtml list-presentation="table"?>
345
346 <varlistentry id="busctl">
347 <term><command>busctl</command></term>
348 <listitem>
349 <para>
350 is used to introspect and monitor the D-Bus bus
351 </para>
352 <indexterm zone="elogind busctl">
353 <primary sortas="b-busctl">busctl</primary>
354 </indexterm>
355 </listitem>
356 </varlistentry>
357
358 <varlistentry id="elogind-inhibit">
359 <term><command>elogind-inhibit</command></term>
360 <listitem>
361 <para>
362 is used to execute a program with a shutdown, sleep or idle
363 inhibitor lock taken
364 </para>
365 <indexterm zone="elogind elogind-inhibit">
366 <primary sortas="b-elogind-inhibit">elogind-inhibit</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="loginctl">
372 <term><command>loginctl</command></term>
373 <listitem>
374 <para>
375 is used to introspect and control the state of the elogind Login
376 Manager
377 </para>
378 <indexterm zone="elogind loginctl">
379 <primary sortas="b-loginctl">loginctl</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="libelogind">
385 <term><filename class="libraryfile">libelogind.so</filename></term>
386 <listitem>
387 <para>
388 is the main elogind utility library
389 </para>
390 <indexterm zone="elogind libelogind">
391 <primary sortas="c-libelogind">libelogind.so</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 </variablelist>
397
398 </sect2>
399
400</sect1>
Note: See TracBrowser for help on using the repository browser.