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