source: general/sysutils/elogind.xml@ 8d23330a

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus plabs/newcss python3.11 rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 8d23330a was cb594b6c, checked in by Xi Ruoyao <xry111@…>, 12 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
RevLine 
[ff3264f]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 " ">
[1db852a]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)">
[ff3264f]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
[76a6005]30 <application>systemd</application> project's "logind", extracted to
[ff3264f]31 be a standalone daemon. It integrates with <xref linkend="linux-pam"/>
[76a6005]32 to track all the users logged in to a system, and whether they
[ff3264f]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>
[76a6005]36 interface, and also through the file system using systemd's standard
[ff3264f]37 <filename class="directory">/run/systemd</filename> layout.
38 </para>
39
[dc1a45e]40 &lfs113_checked;
[ff3264f]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
[702c50c]78 <bridgehead renderas="sect4">Required</bridgehead>
79 <para role="required">
80 <xref linkend="Jinja2"/>
81 </para>
82
[ff3264f]83 <bridgehead renderas="sect4">Recommended</bridgehead>
84 <para role="recommended">
[992c9e7]85 <xref role="runtime" linkend="dbus"/> (runtime),
[779b3223]86 <xref linkend="linux-pam"/> (required for Xorg),
[992c9e7]87 <xref role="runtime" linkend="polkit"/> (runtime),
[ff3264f]88 <xref linkend="DocBook"/>,
89 <xref linkend="docbook-xsl"/>, and
[8558044]90 <xref linkend="libxslt"/> (all three to build the man pages)
[ff3264f]91 </para>
92
93 <bridgehead renderas="sect4">Optional</bridgehead>
94 <para role="optional">
95 <xref linkend="lxml"/>,
96 <xref linkend="zsh"/>,
[992c9e7]97 <xref linkend="valgrind"/> (needed for tests),
[ff3264f]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
[6e2eb5cf]104 <ulink url="https://selinuxproject.org/page/Main_Page">
[ff3264f]105 SELinux</ulink>
106 </para>
107
108 </sect2>
109
[398b4239]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;
[6735113]122 [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
123 Pseudo filesystems ---&gt;
124 [*] Tmpfs POSIX Access Control Lists [CONFIG_TMPFS_POSIX_ACL]</literal></screen>
[398b4239]125
[cce4984]126 <para>
127 In addition, some tests need the userspace cryptographic kernel API, which
128 is enabled with:
129 </para>
130
[c667e1e]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>
[cce4984]136
[398b4239]137 <indexterm zone="elogind elogind-kernel">
138 <primary sortas="d-elogind">elogind</primary>
139 </indexterm>
140 </sect2>
141
[ff3264f]142 <sect2 role="installation">
143 <title>Installation of elogind</title>
[7a1065c]144
[ff3264f]145 <para>
146 Install <application>elogind</application> by running the following
147 commands:
148 </para>
149
[1db852a]150<screen><userinput><!--sed -i '/Disable polkit/,+8 d' meson.build &amp;&amp;
[65d85668]151
[27e5cd4c]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
[1db852a]158-->mkdir build &amp;&amp;
[488cea3]159cd build &amp;&amp;
[ff3264f]160
[1db852a]161meson setup .. \
162 --prefix=/usr \
163 --buildtype=release \
164 -Dman=auto \
165 -Ddocdir=/usr/share/doc/elogind-&elogind-version; \
166 -Dcgroup-controller=elogind \
[91318eb]167 -Ddbuspolicydir=/etc/dbus-1/system.d &amp;&amp;
[ff3264f]168ninja</userinput></screen>
169
170 <para>
[cce4984]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.
[ff3264f]174 </para>
175
176 <para>
177 Now, as the <systemitem class="username">root</systemitem> user:
178 </para>
179
[1ede364c]180<screen role="root"><userinput>ninja install &amp;&amp;
[ff3264f]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>
[1db852a]188 <!--
[65d85668]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
[8558044]192 runtime dependency) but able to use polkit after that package is
[65d85668]193 installed.
194 </para>
195
[27e5cd4c]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>
[1db852a]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>
[27e5cd4c]206
[ff3264f]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>
[adb90981]218
[cce4984]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.
[adb90981]224 </para>
[ff3264f]225
[1db852a]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
[6545b53f]233 <para>
[76a6005]234 <option>-Ddefault-kill-user-processes=false</option>: Determines whether
[6545b53f]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
[ff3264f]241 <para>
242 <command>ln -s ...</command>: These commands install symlinks so that
[76a6005]243 software packages can find the systemd-compatible library and headers.
[ff3264f]244 </para>
245
246 </sect2>
247
248 <sect2 role="configuration">
249 <title>Configuring elogind</title>
250
[6545b53f]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
[76a6005]268 out. You may wish to disable automatically killing user processes when the user logs
[6545b53f]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
[76a6005]280 be modified and a new file must be created in order for
[6545b53f]281 <command>elogind</command> to work correctly. Run the following
282 commands as the <systemitem class="username">root</systemitem> user:
283 </para>
[ff3264f]284
285<screen role="root"><userinput>cat &gt;&gt; /etc/pam.d/system-session &lt;&lt; "EOF" &amp;&amp;
286<literal># Begin elogind addition
[8558044]287
[ff3264f]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
[6545b53f]312 </sect3>
[ff3264f]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>
[1db852a]333 /usr/lib/elogind,
[ff3264f]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>
[4c24eb0a]350 is used to introspect and monitor the D-Bus bus
[ff3264f]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
[4c24eb0a]363 inhibitor lock taken
[ff3264f]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
[4c24eb0a]376 Manager
[ff3264f]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>
[4c24eb0a]388 is the main elogind utility library
[ff3264f]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
[4c24eb0a]400</sect1>
Note: See TracBrowser for help on using the repository browser.