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 "e635fb5ae931685fc8dc61c27d4fb619">
|
---|
10 | <!ENTITY elogind-size "1.3 MB">
|
---|
11 | <!ENTITY elogind-buildsize "58 MB (add 1.5 MB for tests)">
|
---|
12 | <!ENTITY elogind-time "0.4 SBU (at -j1)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="elogind" revision="sysv" xreflabel="elogind-&elogind-version;">
|
---|
16 | <?dbhtml filename="elogind.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>elogind-&elogind-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="elogind">
|
---|
26 | <primary sortas="a-elogind">elogind</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to elogind</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>elogind</application> is the
|
---|
34 | <application>systemd</application> project's "logind", extracted out to
|
---|
35 | be a standalone daemon. It integrates with <xref linkend="linux-pam"/>
|
---|
36 | to know the set of users that are logged in to a system and whether they
|
---|
37 | are logged in graphically, on the console, or remotely.
|
---|
38 | <application>Elogind</application> exposes this information via the
|
---|
39 | standard org.freedesktop.login1 <application>D-Bus</application>
|
---|
40 | interface, as well as through the file system using systemd's standard
|
---|
41 | <filename class="directory">/run/systemd</filename> layout.
|
---|
42 | </para>
|
---|
43 |
|
---|
44 | &lfs10_checked;
|
---|
45 |
|
---|
46 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
47 | <itemizedlist spacing="compact">
|
---|
48 | <listitem>
|
---|
49 | <para>
|
---|
50 | Download (HTTP): <ulink url="&elogind-download-http;"/>
|
---|
51 | </para>
|
---|
52 | </listitem>
|
---|
53 | <listitem>
|
---|
54 | <para>
|
---|
55 | Download (FTP): <ulink url="&elogind-download-ftp;"/>
|
---|
56 | </para>
|
---|
57 | </listitem>
|
---|
58 | <listitem>
|
---|
59 | <para>
|
---|
60 | Download MD5 sum: &elogind-md5sum;
|
---|
61 | </para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>
|
---|
65 | Download size: &elogind-size;
|
---|
66 | </para>
|
---|
67 | </listitem>
|
---|
68 | <listitem>
|
---|
69 | <para>
|
---|
70 | Estimated disk space required: &elogind-buildsize;
|
---|
71 | </para>
|
---|
72 | </listitem>
|
---|
73 | <listitem>
|
---|
74 | <para>
|
---|
75 | Estimated build time: &elogind-time;
|
---|
76 | </para>
|
---|
77 | </listitem>
|
---|
78 | </itemizedlist>
|
---|
79 |
|
---|
80 | <bridgehead renderas="sect3">elogind Dependencies</bridgehead>
|
---|
81 |
|
---|
82 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
83 | <para role="required">
|
---|
84 | <xref role="first" linkend="dbus"/>
|
---|
85 | </para>
|
---|
86 |
|
---|
87 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
88 | <para role="recommended">
|
---|
89 | <xref linkend="DocBook"/>,
|
---|
90 | <xref linkend="docbook-xsl"/>, and
|
---|
91 | <xref linkend="libxslt"/> (to build the man pages),
|
---|
92 | <xref linkend="linux-pam"/>, and
|
---|
93 | <xref linkend="polkit" role="runtime"/> (runtime)
|
---|
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 --->
|
---|
128 | [*] Control Group support [CONFIG_CGROUPS]
|
---|
129 | File systems --->
|
---|
130 | [*] Inotify support for userspace [CONFIG_INOTIFY_USER]
|
---|
131 | Pseudo filesystems --->
|
---|
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 ---> [CONFIG_CRYPTO]
|
---|
140 | <M/*> Userspace cryptographic algorithm configuration [CONFIG_CRYPTO_USER]
|
---|
141 | <M/*> 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 &&
|
---|
157 | cd build &&
|
---|
158 |
|
---|
159 | meson --prefix=/usr \
|
---|
160 | -Dcgroup-controller=elogind \
|
---|
161 | -Ddbuspolicydir=/etc/dbus-1/system.d \
|
---|
162 | -Dman=auto \
|
---|
163 | .. &&
|
---|
164 | ninja</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 &&
|
---|
177 | ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &&
|
---|
178 | ln -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 >> /etc/pam.d/system-session << "EOF" &&
|
---|
257 | <literal># Begin elogind addition
|
---|
258 |
|
---|
259 | session required pam_loginuid.so
|
---|
260 | session optional pam_elogind.so
|
---|
261 |
|
---|
262 | # End elogind addition</literal>
|
---|
263 | EOF
|
---|
264 | cat > /etc/pam.d/elogind-user << "EOF"
|
---|
265 | <literal># Begin /etc/pam.d/elogind-user
|
---|
266 |
|
---|
267 | account required pam_access.so
|
---|
268 | account include system-account
|
---|
269 |
|
---|
270 | session required pam_env.so
|
---|
271 | session required pam_limits.so
|
---|
272 | session required pam_unix.so
|
---|
273 | session required pam_loginuid.so
|
---|
274 | session optional pam_keyinit.so force revoke
|
---|
275 | session optional pam_elogind.so
|
---|
276 |
|
---|
277 | auth required pam_deny.so
|
---|
278 | password required pam_deny.so
|
---|
279 |
|
---|
280 | # End /etc/pam.d/elogind-user</literal>
|
---|
281 | EOF</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>
|
---|
372 |
|
---|