source: general/sysutils/elogind.xml@ 76a6005

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 76a6005 was 76a6005, checked in by David Bryant <davidbryant@…>, 18 months ago

Removed redundant verbiage; edited for clarity.

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