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