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