source: general/sysutils/elogind.xml@ f8b4f14

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

Update kernel config for elogind

The layout for cryptographic api has changed. This one is for
linux-6.2

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