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