[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 |
|
---|
[20a35ab] | 43 | &lfs110a_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 |
|
---|
| 157 | mkdir build &&
|
---|
[488cea3] | 158 | cd build &&
|
---|
[ff3264f] | 159 |
|
---|
| 160 | meson --prefix=/usr \
|
---|
[b7e2ce4] | 161 | --buildtype=release \
|
---|
[ff3264f] | 162 | -Dcgroup-controller=elogind \
|
---|
| 163 | -Ddbuspolicydir=/etc/dbus-1/system.d \
|
---|
[adb90981] | 164 | -Dman=auto \
|
---|
| 165 | .. &&
|
---|
[ff3264f] | 166 | ninja</userinput></screen>
|
---|
| 167 |
|
---|
| 168 | <para>
|
---|
[cce4984] | 169 | To test the results, issue: <command>ninja test</command>. A few tests
|
---|
| 170 | are skipped if not run with <systemitem class="username">root</systemitem>
|
---|
| 171 | privileges.
|
---|
[ff3264f] | 172 | </para>
|
---|
| 173 |
|
---|
| 174 | <para>
|
---|
| 175 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 176 | </para>
|
---|
| 177 |
|
---|
[1ede364c] | 178 | <screen role="root"><userinput>ninja install &&
|
---|
[ff3264f] | 179 | ln -sfv libelogind.pc /usr/lib/pkgconfig/libsystemd.pc &&
|
---|
| 180 | ln -sfvn elogind /usr/include/systemd</userinput></screen>
|
---|
| 181 |
|
---|
| 182 | </sect2>
|
---|
| 183 |
|
---|
| 184 | <sect2 role="commands">
|
---|
| 185 | <title>Command Explanations</title>
|
---|
| 186 |
|
---|
[65d85668] | 187 | <para>
|
---|
| 188 | <command>sed ... meson.build</command>: This change allows the
|
---|
| 189 | package to be built without polkit being installed (it is still a
|
---|
[8558044] | 190 | runtime dependency) but able to use polkit after that package is
|
---|
[65d85668] | 191 | installed.
|
---|
| 192 | </para>
|
---|
| 193 |
|
---|
[ff3264f] | 194 | <para>
|
---|
| 195 | <parameter>-Dcgroup-controller=elogind</parameter>: This switch ensures
|
---|
| 196 | that <application>elogind</application> is selected as the cgroup
|
---|
| 197 | controller, even if booted with another running cgroup controller.
|
---|
| 198 | </para>
|
---|
| 199 |
|
---|
| 200 | <para>
|
---|
| 201 | <parameter>-Ddbuspolicydir=/etc/dbus-1/system.d</parameter>: This switch
|
---|
| 202 | sets the location of the <application>D-Bus</application> policy
|
---|
| 203 | directory.
|
---|
| 204 | </para>
|
---|
[adb90981] | 205 |
|
---|
[cce4984] | 206 | <para>
|
---|
| 207 | <parameter>-Dman=auto</parameter>: The default value of this switch is
|
---|
| 208 | <emphasis>false</emphasis>. Setting it to <emphasis>auto</emphasis>
|
---|
| 209 | allows building and installing the man pages if the recommended
|
---|
| 210 | dependencies are installed.
|
---|
[adb90981] | 211 | </para>
|
---|
[ff3264f] | 212 |
|
---|
[6545b53f] | 213 | <para>
|
---|
| 214 | <option>-Ddefault-kill-user-processes=false</option>: Configure whether
|
---|
| 215 | the processes of a user should be killed when the user logs out. The
|
---|
| 216 | default is <emphasis>true</emphasis>, but this defeats the traditional
|
---|
| 217 | use of <command>screen</command> or <command>tmux</command>. This can
|
---|
| 218 | also be changed in the configuration file (see below).
|
---|
| 219 | </para>
|
---|
| 220 |
|
---|
[ff3264f] | 221 | <para>
|
---|
| 222 | <command>ln -s ...</command>: These commands install symlinks so that
|
---|
| 223 | software packages find systemd compatible library and headers.
|
---|
| 224 | </para>
|
---|
| 225 |
|
---|
| 226 | </sect2>
|
---|
| 227 |
|
---|
| 228 | <sect2 role="configuration">
|
---|
| 229 | <title>Configuring elogind</title>
|
---|
| 230 |
|
---|
[6545b53f] | 231 | <sect3 id="elogind-config">
|
---|
| 232 | <title>Config File</title>
|
---|
| 233 | <para>
|
---|
| 234 | <filename>/etc/elogind/logind.conf</filename>
|
---|
| 235 | </para>
|
---|
| 236 |
|
---|
| 237 | <indexterm zone="elogind elogind-config">
|
---|
| 238 | <primary
|
---|
| 239 | sortas="e-etc-elogind-logind.conf">/etc/elogind/logind.conf</primary>
|
---|
| 240 | </indexterm>
|
---|
| 241 | </sect3>
|
---|
| 242 |
|
---|
| 243 | <sect3><title>Configuration Information</title>
|
---|
| 244 |
|
---|
| 245 | <para>
|
---|
| 246 | The installed file <filename>/etc/elogind/logind.conf</filename>
|
---|
| 247 | contains all the possible options with their defaults, commented
|
---|
| 248 | out. You may wish to disable killing user processes when the user logs
|
---|
| 249 | out, by running, as the <systemitem class="username">root</systemitem>
|
---|
| 250 | user:
|
---|
| 251 | </para>
|
---|
| 252 |
|
---|
| 253 | <screen role="root"><userinput>sed -e '/\[Login\]/a KillUserProcesses=no' \
|
---|
| 254 | -i /etc/elogind/logind.conf</userinput></screen>
|
---|
| 255 |
|
---|
| 256 | <para>
|
---|
| 257 | Each user will need to register a user session using
|
---|
| 258 | <application>Linux-PAM</application> at login. The
|
---|
| 259 | <filename>/etc/pam.d/system-session</filename> file needs to
|
---|
| 260 | be modified and a new file needs to be created in order for
|
---|
| 261 | <command>elogind</command> to work correctly. Run the following
|
---|
| 262 | commands as the <systemitem class="username">root</systemitem> user:
|
---|
| 263 | </para>
|
---|
[ff3264f] | 264 |
|
---|
| 265 | <screen role="root"><userinput>cat >> /etc/pam.d/system-session << "EOF" &&
|
---|
| 266 | <literal># Begin elogind addition
|
---|
[8558044] | 267 |
|
---|
[ff3264f] | 268 | session required pam_loginuid.so
|
---|
| 269 | session optional pam_elogind.so
|
---|
| 270 |
|
---|
| 271 | # End elogind addition</literal>
|
---|
| 272 | EOF
|
---|
| 273 | cat > /etc/pam.d/elogind-user << "EOF"
|
---|
| 274 | <literal># Begin /etc/pam.d/elogind-user
|
---|
| 275 |
|
---|
| 276 | account required pam_access.so
|
---|
| 277 | account include system-account
|
---|
| 278 |
|
---|
| 279 | session required pam_env.so
|
---|
| 280 | session required pam_limits.so
|
---|
| 281 | session required pam_unix.so
|
---|
| 282 | session required pam_loginuid.so
|
---|
| 283 | session optional pam_keyinit.so force revoke
|
---|
| 284 | session optional pam_elogind.so
|
---|
| 285 |
|
---|
| 286 | auth required pam_deny.so
|
---|
| 287 | password required pam_deny.so
|
---|
| 288 |
|
---|
| 289 | # End /etc/pam.d/elogind-user</literal>
|
---|
| 290 | EOF</userinput></screen>
|
---|
| 291 |
|
---|
[6545b53f] | 292 | </sect3>
|
---|
[ff3264f] | 293 | </sect2>
|
---|
| 294 |
|
---|
| 295 | <sect2 role="content" revision="sysv">
|
---|
| 296 | <title>Contents</title>
|
---|
| 297 |
|
---|
| 298 | <segmentedlist>
|
---|
| 299 | <segtitle>Installed Programs</segtitle>
|
---|
| 300 | <segtitle>Installed Library</segtitle>
|
---|
| 301 | <segtitle>Installed Directories</segtitle>
|
---|
| 302 |
|
---|
| 303 | <seglistitem>
|
---|
| 304 | <seg>
|
---|
| 305 | busctl,
|
---|
| 306 | elogind-inhibit, and
|
---|
| 307 | loginctl
|
---|
| 308 | </seg>
|
---|
| 309 | <seg>
|
---|
| 310 | libelogind.so
|
---|
| 311 | </seg>
|
---|
| 312 | <seg>
|
---|
[1ede364c] | 313 | /lib/elogind,
|
---|
[ff3264f] | 314 | /etc/elogind,
|
---|
| 315 | /usr/include/elogind, and
|
---|
| 316 | /usr/share/doc/elogind-&elogind-version;
|
---|
| 317 | </seg>
|
---|
| 318 | </seglistitem>
|
---|
| 319 | </segmentedlist>
|
---|
| 320 |
|
---|
| 321 | <variablelist>
|
---|
| 322 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 323 | <?dbfo list-presentation="list"?>
|
---|
| 324 | <?dbhtml list-presentation="table"?>
|
---|
| 325 |
|
---|
| 326 | <varlistentry id="busctl">
|
---|
| 327 | <term><command>busctl</command></term>
|
---|
| 328 | <listitem>
|
---|
| 329 | <para>
|
---|
[4c24eb0a] | 330 | is used to introspect and monitor the D-Bus bus
|
---|
[ff3264f] | 331 | </para>
|
---|
| 332 | <indexterm zone="elogind busctl">
|
---|
| 333 | <primary sortas="b-busctl">busctl</primary>
|
---|
| 334 | </indexterm>
|
---|
| 335 | </listitem>
|
---|
| 336 | </varlistentry>
|
---|
| 337 |
|
---|
| 338 | <varlistentry id="elogind-inhibit">
|
---|
| 339 | <term><command>elogind-inhibit</command></term>
|
---|
| 340 | <listitem>
|
---|
| 341 | <para>
|
---|
| 342 | is used to execute a program with a shutdown, sleep or idle
|
---|
[4c24eb0a] | 343 | inhibitor lock taken
|
---|
[ff3264f] | 344 | </para>
|
---|
| 345 | <indexterm zone="elogind elogind-inhibit">
|
---|
| 346 | <primary sortas="b-elogind-inhibit">elogind-inhibit</primary>
|
---|
| 347 | </indexterm>
|
---|
| 348 | </listitem>
|
---|
| 349 | </varlistentry>
|
---|
| 350 |
|
---|
| 351 | <varlistentry id="loginctl">
|
---|
| 352 | <term><command>loginctl</command></term>
|
---|
| 353 | <listitem>
|
---|
| 354 | <para>
|
---|
| 355 | is used to introspect and control the state of the elogind Login
|
---|
[4c24eb0a] | 356 | Manager
|
---|
[ff3264f] | 357 | </para>
|
---|
| 358 | <indexterm zone="elogind loginctl">
|
---|
| 359 | <primary sortas="b-loginctl">loginctl</primary>
|
---|
| 360 | </indexterm>
|
---|
| 361 | </listitem>
|
---|
| 362 | </varlistentry>
|
---|
| 363 |
|
---|
| 364 | <varlistentry id="libelogind">
|
---|
| 365 | <term><filename class="libraryfile">libelogind.so</filename></term>
|
---|
| 366 | <listitem>
|
---|
| 367 | <para>
|
---|
[4c24eb0a] | 368 | is the main elogind utility library
|
---|
[ff3264f] | 369 | </para>
|
---|
| 370 | <indexterm zone="elogind libelogind">
|
---|
| 371 | <primary sortas="c-libelogind">libelogind.so</primary>
|
---|
| 372 | </indexterm>
|
---|
| 373 | </listitem>
|
---|
| 374 | </varlistentry>
|
---|
| 375 |
|
---|
| 376 | </variablelist>
|
---|
| 377 |
|
---|
| 378 | </sect2>
|
---|
| 379 |
|
---|
[4c24eb0a] | 380 | </sect1>
|
---|