source: general/sysutils/elogind.xml@ 7cb4635

trunk
Last change on this file since 7cb4635 was 7cb4635, checked in by Pierre Labastie <pierre.labastie@…>, 2 months ago

Recommend a build order for elogind<->polkit circular dep

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