source: general/sysutils/elogind.xml@ 9de2208

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 9de2208 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 18 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

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