[e8e3312d] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[e8e3312d] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[996f3953] | 7 | <!ENTITY dbus-download-http "https://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.xz">
|
---|
[30d0aef] | 8 | <!ENTITY dbus-download-ftp " ">
|
---|
[996f3953] | 9 | <!ENTITY dbus-md5sum "ddd5570aff05191dbee8e42d751f1b7d">
|
---|
| 10 | <!ENTITY dbus-size "1.3 MB">
|
---|
[6742509c] | 11 | <!ENTITY dbus-buildsize "21 MB (add 18 MB for the tests)">
|
---|
[9e2a8bab] | 12 | <!ENTITY dbus-time "0.3 SBU (add 8.0 SBU for the tests)">
|
---|
[819a4c7] | 13 | <!-- The former value was 0.8 SBU, which was far more sensible. -->
|
---|
[e8e3312d] | 14 | ]>
|
---|
| 15 |
|
---|
[fdaae04] | 16 | <sect1 id="dbus" xreflabel="dbus-&dbus-version;">
|
---|
[e8e3312d] | 17 | <?dbhtml filename="dbus.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[53375fc] | 23 | <title>dbus-&dbus-version;</title>
|
---|
[e8e3312d] | 24 |
|
---|
[54666831] | 25 | <indexterm zone="dbus">
|
---|
| 26 | <primary sortas="a-D-Bus">D-Bus</primary>
|
---|
[e8e3312d] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
[54666831] | 30 | <title>Introduction to D-Bus</title>
|
---|
[e8e3312d] | 31 |
|
---|
[5c9e998] | 32 | <para revision="sysv">
|
---|
[108beaf] | 33 | <application>D-Bus</application> is a message bus system, a simple way
|
---|
| 34 | for applications to talk to one another.
|
---|
| 35 | <application>D-Bus</application> supplies both a system daemon (for
|
---|
| 36 | events such as <quote>new hardware device added</quote> or <quote>printer
|
---|
| 37 | queue changed</quote>) and a per-user-login-session daemon (for general
|
---|
| 38 | IPC needs among user applications). Also, the message bus is built on top
|
---|
| 39 | of a general one-to-one message passing framework, which can be used by
|
---|
| 40 | any two applications to communicate directly (without going through the
|
---|
| 41 | message bus daemon).
|
---|
[0b83a69] | 42 | </para>
|
---|
[e8e3312d] | 43 |
|
---|
[5c9e998] | 44 | <para revision="systemd">
|
---|
| 45 | Even though <application>D-Bus</application> was built in LFS, there are
|
---|
| 46 | some features provided by the package that other BLFS packages need, but
|
---|
| 47 | their dependencies didn't fit into LFS.
|
---|
| 48 | </para>
|
---|
| 49 |
|
---|
[03a2986] | 50 | &lfs111_checked;
|
---|
[482477c] | 51 |
|
---|
[e8e3312d] | 52 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 53 | <itemizedlist spacing="compact">
|
---|
| 54 | <listitem>
|
---|
[0b83a69] | 55 | <para>
|
---|
| 56 | Download (HTTP): <ulink url="&dbus-download-http;"/>
|
---|
| 57 | </para>
|
---|
[e8e3312d] | 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
[0b83a69] | 60 | <para>
|
---|
| 61 | Download (FTP): <ulink url="&dbus-download-ftp;"/>
|
---|
| 62 | </para>
|
---|
[e8e3312d] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[0b83a69] | 65 | <para>
|
---|
| 66 | Download MD5 sum: &dbus-md5sum;
|
---|
| 67 | </para>
|
---|
[e8e3312d] | 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
[0b83a69] | 70 | <para>
|
---|
| 71 | Download size: &dbus-size;
|
---|
| 72 | </para>
|
---|
[e8e3312d] | 73 | </listitem>
|
---|
| 74 | <listitem>
|
---|
[0b83a69] | 75 | <para>
|
---|
| 76 | Estimated disk space required: &dbus-buildsize;
|
---|
| 77 | </para>
|
---|
[e8e3312d] | 78 | </listitem>
|
---|
| 79 | <listitem>
|
---|
[0b83a69] | 80 | <para>
|
---|
| 81 | Estimated build time: &dbus-time;
|
---|
| 82 | </para>
|
---|
[e8e3312d] | 83 | </listitem>
|
---|
| 84 | </itemizedlist>
|
---|
| 85 |
|
---|
[02e742b] | 86 | <bridgehead renderas="sect3">D-Bus Dependencies</bridgehead>
|
---|
[e8e3312d] | 87 |
|
---|
[f29eb8a] | 88 | <bridgehead renderas="sect4" revision="systemd">Required</bridgehead>
|
---|
| 89 | <para role="required" revision="systemd">
|
---|
| 90 | <xref linkend="systemd"/>
|
---|
| 91 | </para>
|
---|
| 92 |
|
---|
[51dfb3e] | 93 |
|
---|
[54666831] | 94 | <bridgehead renderas="sect4">Recommended</bridgehead>
|
---|
| 95 | <para role="recommended">
|
---|
[8558044] | 96 | <xref linkend="xorg7-lib"/> (for <command>dbus-launch</command> program)
|
---|
[bc3bb455] | 97 | <phrase revision="sysv">and <xref linkend="elogind"/> (These are
|
---|
[8558044] | 98 | circular dependencies. First build without them, and then again after
|
---|
[bc3bb455] | 99 | both packages are installed.)</phrase>
|
---|
[0b83a69] | 100 | </para>
|
---|
[adfdc8b] | 101 |
|
---|
[e8e3312d] | 102 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[b6a2a0e] | 103 | <para role="optional">
|
---|
[f1d25d2] | 104 | For the tests:
|
---|
[cafc6c84] | 105 | <xref linkend="dbus-glib"/>,
|
---|
[c358685] | 106 | <xref linkend="dbus-python"/>,
|
---|
[1665413] | 107 | <xref linkend="pygobject3"/>,
|
---|
[48b0ed4] | 108 | and <xref linkend="valgrind"/>;
|
---|
[c358685] | 109 |
|
---|
| 110 | for documentation:
|
---|
| 111 | <xref linkend="doxygen"/>,
|
---|
| 112 | <xref linkend="xmlto"/>,
|
---|
| 113 | <ulink url="https://pypi.python.org/pypi/mallard-ducktype">Ducktype</ulink>,
|
---|
| 114 | and
|
---|
[01701da9] | 115 | <ulink url="&gnome-download-http;/yelp-tools/">Yelp Tools</ulink>
|
---|
[0b83a69] | 116 | </para>
|
---|
[c45cb57] | 117 |
|
---|
[1039de3] | 118 | <para condition="html" role="usernotes">User Notes:
|
---|
[0b83a69] | 119 | <ulink url="&blfs-wiki;/dbus"/>
|
---|
| 120 | </para>
|
---|
[e8e3312d] | 121 | </sect2>
|
---|
| 122 |
|
---|
| 123 | <sect2 role="installation">
|
---|
[02e742b] | 124 | <title>Installation of D-Bus</title>
|
---|
[2543b8af] | 125 | <!--
|
---|
[670d3f8] | 126 | <para revision="sysv">
|
---|
[ef52ec2] | 127 | If they do not already exist,
|
---|
| 128 | as the <systemitem class="username">root</systemitem> user, create a
|
---|
[54666831] | 129 | system user and group to handle the system message bus activity:
|
---|
| 130 | </para>
|
---|
| 131 |
|
---|
[670d3f8] | 132 | <screen role="root" revision="sysv"><userinput>groupadd -g 18 messagebus &&
|
---|
[54666831] | 133 | useradd -c "D-Bus Message Daemon User" -d /var/run/dbus \
|
---|
| 134 | -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
|
---|
[2543b8af] | 135 | -->
|
---|
[54666831] | 136 |
|
---|
| 137 | <para>
|
---|
| 138 | Install <application>D-Bus</application> by running the following
|
---|
[108beaf] | 139 | commands (you may wish to review the output from <command>./configure
|
---|
| 140 | --help</command> first and add any desired parameters to the
|
---|
| 141 | <command>configure</command> command shown below):
|
---|
[0b83a69] | 142 | </para>
|
---|
[e8e3312d] | 143 |
|
---|
[9eb7ee7] | 144 | <screen revision="sysv"><userinput>./configure --prefix=/usr \
|
---|
[f29eb8a] | 145 | --sysconfdir=/etc \
|
---|
| 146 | --localstatedir=/var \
|
---|
[86b410e3] | 147 | --runstatedir=/run \
|
---|
[51dfb3e] | 148 | --enable-user-session \
|
---|
[f29eb8a] | 149 | --disable-doxygen-docs \
|
---|
| 150 | --disable-xml-docs \
|
---|
| 151 | --disable-static \
|
---|
[51dfb3e] | 152 | --with-systemduserunitdir=no \
|
---|
| 153 | --with-systemdsystemunitdir=no \
|
---|
[0075912] | 154 | --docdir=/usr/share/doc/dbus-&dbus-version; \
|
---|
[fda8d05f] | 155 | --with-console-auth-dir=/run/console \
|
---|
[f29eb8a] | 156 | --with-system-socket=/run/dbus/system_bus_socket &&
|
---|
[e8e3312d] | 157 | make</userinput></screen>
|
---|
| 158 |
|
---|
[f29eb8a] | 159 | <screen revision="systemd"><userinput>./configure --prefix=/usr \
|
---|
| 160 | --sysconfdir=/etc \
|
---|
| 161 | --localstatedir=/var \
|
---|
[86b410e3] | 162 | --runstatedir=/run \
|
---|
[f29eb8a] | 163 | --enable-user-session \
|
---|
| 164 | --disable-doxygen-docs \
|
---|
| 165 | --disable-xml-docs \
|
---|
| 166 | --disable-static \
|
---|
[0075912] | 167 | --docdir=/usr/share/doc/dbus-&dbus-version; \
|
---|
[fda8d05f] | 168 | --with-console-auth-dir=/run/console \
|
---|
[f29eb8a] | 169 | --with-system-socket=/run/dbus/system_bus_socket &&
|
---|
[5c9e998] | 170 | make</userinput></screen>
|
---|
| 171 |
|
---|
[0b83a69] | 172 | <para>
|
---|
| 173 | See below for test instructions.
|
---|
| 174 | </para>
|
---|
[c45cb57] | 175 |
|
---|
[a761478] | 176 | <!--
|
---|
[5c9e998] | 177 | <warning revision="systemd">
|
---|
| 178 | <para>
|
---|
| 179 | Installing the package will override all files installed by
|
---|
| 180 | <application>D-Bus</application> in LFS. It is critical that
|
---|
| 181 | nothing uses <application>D-Bus</application> libraries or
|
---|
[670d3f8] | 182 | programs during the installation. The best way to ensure that these
|
---|
| 183 | libraries are not being used is to run the installation in rescue mode.
|
---|
| 184 | To switch to rescue mode, run the following command as the
|
---|
| 185 | <systemitem class="username">root</systemitem> user (from a TTY):
|
---|
[5c9e998] | 186 | </para>
|
---|
[670d3f8] | 187 |
|
---|
| 188 | <screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
|
---|
| 189 |
|
---|
[5c9e998] | 190 | </warning>
|
---|
[a761478] | 191 | -->
|
---|
[5c9e998] | 192 |
|
---|
[0b83a69] | 193 | <para>
|
---|
| 194 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 195 | </para>
|
---|
[e8e3312d] | 196 |
|
---|
[108beaf] | 197 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[b6a2a0e] | 198 |
|
---|
[d4eefa36] | 199 | <!-- FIXME: No longer needed with usr merge
|
---|
[51dfb3e] | 200 | <para>
|
---|
[787a2e75] | 201 | The shared library needs to be moved to
|
---|
| 202 | <filename class="directory">/lib</filename>, and as a result the
|
---|
| 203 | <filename class="extension">.so</filename> file in
|
---|
| 204 | <filename class="directory">/usr/lib</filename> will need to be
|
---|
| 205 | recreated. Run the following command as the
|
---|
| 206 | <systemitem class="username">root</systemitem> user:
|
---|
| 207 | </para>
|
---|
| 208 |
|
---|
[51dfb3e] | 209 | <screen role="root"><userinput>mv -v /usr/lib/libdbus-1.so.* /lib &&
|
---|
[787a2e75] | 210 | ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
|
---|
[d4eefa36] | 211 | -->
|
---|
[787a2e75] | 212 |
|
---|
[bf8eb65] | 213 | <para>
|
---|
| 214 | If you are using a DESTDIR install,
|
---|
| 215 | <command>dbus-daemon-launch-helper</command> needs to be fixed
|
---|
| 216 | afterwards. Issue, as <systemitem class="username">root</systemitem>
|
---|
| 217 | user:
|
---|
| 218 | </para>
|
---|
| 219 |
|
---|
| 220 | <screen role="root"><userinput>chown -v root:messagebus /usr/libexec/dbus-daemon-launch-helper &&
|
---|
| 221 | chmod -v 4750 /usr/libexec/dbus-daemon-launch-helper</userinput></screen>
|
---|
| 222 |
|
---|
[787a2e75] | 223 | <para revision="sysv">
|
---|
[54666831] | 224 | If you are still building your system in chroot or you did not start the
|
---|
| 225 | daemon yet, but you want to compile some packages that require
|
---|
[8558044] | 226 | <application>D-Bus</application>, generate the
|
---|
[54666831] | 227 | <application>D-Bus</application> UUID to avoid warnings when compiling
|
---|
| 228 | some packages with the following command as the
|
---|
[3bbf74c5] | 229 | <systemitem class="username">root</systemitem> user:
|
---|
| 230 | </para>
|
---|
| 231 |
|
---|
[787a2e75] | 232 | <screen role="root" revision="sysv"><userinput>dbus-uuidgen --ensure</userinput></screen>
|
---|
[54666831] | 233 |
|
---|
[51dfb3e] | 234 | <para revision="sysv">
|
---|
| 235 | If using <xref linkend="elogind"/>, create a symlink to the
|
---|
| 236 | <filename>/var/lib/dbus/machine-id</filename> file:
|
---|
| 237 | </para>
|
---|
| 238 |
|
---|
| 239 | <screen role="root" revision="sysv"><userinput>ln -sv /var/lib/dbus/machine-id /etc</userinput></screen>
|
---|
| 240 |
|
---|
[a761478] | 241 | <!--
|
---|
[5c9e998] | 242 | <para revision="systemd">
|
---|
| 243 | If not in chroot, at this point, you should reload the systemd daemon,
|
---|
| 244 | and reenter multi-user mode with the following commands (as the
|
---|
| 245 | <systemitem class="username">root</systemitem> user):
|
---|
| 246 | </para>
|
---|
| 247 |
|
---|
| 248 | <screen role="root" revision="systemd"><userinput>systemctl daemon-reload
|
---|
| 249 | systemctl start multi-user.target</userinput></screen>
|
---|
[a761478] | 250 | -->
|
---|
[5c9e998] | 251 |
|
---|
[3bbf74c5] | 252 | <para>
|
---|
[108beaf] | 253 | The dbus tests cannot be run until after <xref linkend="dbus-glib"/> has
|
---|
| 254 | been installed. They must be run as an unprivileged user from a local
|
---|
[1665413] | 255 | session with bus address. To run the standard tests issue
|
---|
| 256 | <command>make check</command>.
|
---|
| 257 | </para>
|
---|
| 258 |
|
---|
| 259 | <para>
|
---|
| 260 | If you want to run the unit regression tests, configure requires
|
---|
| 261 | additional parameters which expose additional functionality in the
|
---|
| 262 | binaries that are not intended to be used in a production build of
|
---|
[108beaf] | 263 | <application>D-Bus</application>. If you would like to run the tests,
|
---|
[6092d19] | 264 | issue the following commands (for the tests, you don't need to build the
|
---|
| 265 | docs):
|
---|
[0b83a69] | 266 | </para>
|
---|
[0d7900a] | 267 |
|
---|
[e532fc22] | 268 | <screen remap="test"><userinput>make distclean &&
|
---|
| 269 | PYTHON=python3 ./configure --enable-tests \
|
---|
| 270 | --enable-asserts \
|
---|
| 271 | --disable-doxygen-docs \
|
---|
| 272 | --disable-xml-docs &&
|
---|
| 273 | make &&
|
---|
[02fc2ae] | 274 | make check</userinput></screen>
|
---|
[c45cb57] | 275 |
|
---|
[53dd18f1] | 276 | <para>
|
---|
[8558044] | 277 | There have been reports that the tests may fail if running inside a
|
---|
| 278 | Midnight Commander shell. You may get out-of-memory error messages when
|
---|
[9e2a8bab] | 279 | running the tests. These are normal and can be safely ignored.
|
---|
[54666831] | 280 | </para>
|
---|
[e8e3312d] | 281 |
|
---|
| 282 | </sect2>
|
---|
| 283 |
|
---|
| 284 | <sect2 role="commands">
|
---|
| 285 | <title>Command Explanations</title>
|
---|
| 286 |
|
---|
[108beaf] | 287 | <para>
|
---|
| 288 | <parameter>--disable-doxygen-docs</parameter>: This switch disables
|
---|
[6092d19] | 289 | doxygen documentation build and install, if you have
|
---|
[670d3f8] | 290 | <application>doxygen</application> installed. If
|
---|
| 291 | <application>doxygen</application> is installed, and you wish to build
|
---|
| 292 | them, remove this parameter.
|
---|
[108beaf] | 293 | </para>
|
---|
| 294 |
|
---|
[6092d19] | 295 | <para>
|
---|
| 296 | <parameter>--disable-xml-docs</parameter>: This switch disables html
|
---|
| 297 | documentation build and install, if you have
|
---|
[670d3f8] | 298 | <application>xmlto</application> installed. If
|
---|
| 299 | <application>xmlto</application> is installed, and you wish to build
|
---|
| 300 | them, remove this parameter.
|
---|
[6092d19] | 301 | </para>
|
---|
| 302 |
|
---|
[4532b2f] | 303 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 304 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 305 |
|
---|
[51dfb3e] | 306 | <para>
|
---|
| 307 | <parameter>--enable-user-session</parameter>: This parameter enables
|
---|
| 308 | per-user DBus sessions with
|
---|
| 309 | <phrase revision="sysv"><application>elogind</application>.</phrase>
|
---|
| 310 | <phrase revision="systemd"><application>systemd</application>.</phrase>
|
---|
[54666831] | 311 | </para>
|
---|
| 312 |
|
---|
[5c9e998] | 313 | <para revision="sysv">
|
---|
[aa41434] | 314 | <parameter>--with-systemd{user,system}unitdir=no</parameter>: These
|
---|
[51dfb3e] | 315 | switches disable installation of systemd units on elogind based systems.
|
---|
[f29eb8a] | 316 | </para>
|
---|
[4532b2f] | 317 | <para>
|
---|
[aa41434] | 318 | <parameter>--with-console-auth-dir=/run/console</parameter>: This
|
---|
[9e2a8bab] | 319 | parameter specifies the directory to check for console ownership.
|
---|
[4532b2f] | 320 | </para>
|
---|
[0b83a69] | 321 |
|
---|
[f29eb8a] | 322 | <para>
|
---|
| 323 | <parameter>--with-system-pid-file=/run/dbus/pid</parameter>: This
|
---|
| 324 | parameter specifies the location of the PID file.
|
---|
| 325 | </para>
|
---|
| 326 |
|
---|
| 327 | <para>
|
---|
| 328 | <parameter>--with-system-socket=/run/dbus/system_bus_socket</parameter>:
|
---|
| 329 | This parameter specifies the location of the system bus socket.
|
---|
| 330 | </para>
|
---|
| 331 |
|
---|
[0b83a69] | 332 | <para>
|
---|
[9e2a8bab] | 333 | <parameter>--enable-tests</parameter>: Builds extra parts of the code to
|
---|
[1665413] | 334 | support all tests. Do not use on a production build.
|
---|
[4947a7a] | 335 | </para>
|
---|
| 336 |
|
---|
| 337 | <para>
|
---|
[9e2a8bab] | 338 | <option>--enable-embedded-tests</option>: Builds extra parts of the
|
---|
[1665413] | 339 | code to support only unit tests. Do not use on a production build.
|
---|
[0b83a69] | 340 | </para>
|
---|
| 341 |
|
---|
| 342 | <para>
|
---|
[9e2a8bab] | 343 | <parameter>--enable-asserts</parameter>: Enables debugging code to run
|
---|
[e5347c36] | 344 | assertions for statements normally assumed to be true. This prevents a
|
---|
| 345 | warning that '<parameter>--enable-tests</parameter>' on its own is only
|
---|
| 346 | useful for profiling and might not give true results for all tests, but
|
---|
| 347 | adds its own NOTE that this should not be used in a production build.
|
---|
[0b83a69] | 348 | </para>
|
---|
[30d0aef] | 349 |
|
---|
[e8e3312d] | 350 | </sect2>
|
---|
| 351 |
|
---|
| 352 | <sect2 role="configuration">
|
---|
[670d3f8] | 353 | <title>Configuring D-Bus</title>
|
---|
[e8e3312d] | 354 |
|
---|
| 355 | <sect3 id="dbus-config">
|
---|
| 356 | <title>Config Files</title>
|
---|
[0b83a69] | 357 |
|
---|
| 358 | <para>
|
---|
| 359 | <filename>/etc/dbus-1/session.conf</filename>,
|
---|
| 360 | <filename>/etc/dbus-1/system.conf</filename> and
|
---|
| 361 | <filename>/etc/dbus-1/system.d/*</filename>
|
---|
| 362 | </para>
|
---|
[e8e3312d] | 363 |
|
---|
[54666831] | 364 | <indexterm zone="dbus dbus-config">
|
---|
[e8e3312d] | 365 | <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
|
---|
| 366 | </indexterm>
|
---|
| 367 |
|
---|
[54666831] | 368 | <indexterm zone="dbus dbus-config">
|
---|
[e8e3312d] | 369 | <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
|
---|
| 370 | </indexterm>
|
---|
| 371 |
|
---|
[54666831] | 372 | <indexterm zone="dbus dbus-config">
|
---|
[c45cb57] | 373 | <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
|
---|
[e8e3312d] | 374 | </indexterm>
|
---|
| 375 |
|
---|
| 376 | </sect3>
|
---|
| 377 |
|
---|
[e9efab0b] | 378 | <sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
|
---|
| 379 | <title>Configuration Information</title>
|
---|
[e8e3312d] | 380 |
|
---|
[0b83a69] | 381 | <para>
|
---|
| 382 | The configuration files listed above should probably not be
|
---|
| 383 | modified. If changes are required, you should create
|
---|
| 384 | <filename>/etc/dbus-1/session-local.conf</filename> and/or
|
---|
| 385 | <filename>/etc/dbus-1/system-local.conf</filename> and make any
|
---|
| 386 | desired changes to these files.
|
---|
| 387 | </para>
|
---|
| 388 |
|
---|
| 389 | <para>
|
---|
| 390 | If any packages install a
|
---|
| 391 | <application>D-Bus</application> <filename>.service</filename>
|
---|
| 392 | file outside of the standard <filename
|
---|
| 393 | class="directory">/usr/share/dbus-1/services</filename> directory,
|
---|
| 394 | that directory should be added to the local session configuration.
|
---|
| 395 | For instance, <filename
|
---|
| 396 | class="directory">/usr/local/share/dbus-1/services</filename> can
|
---|
| 397 | be added by performing the following commands as the
|
---|
| 398 | <systemitem class="username">root</systemitem> user:
|
---|
| 399 | </para>
|
---|
[57aa7a28] | 400 |
|
---|
| 401 | <screen role="root"><userinput>cat > /etc/dbus-1/session-local.conf << "EOF"
|
---|
| 402 | <literal><!DOCTYPE busconfig PUBLIC
|
---|
| 403 | "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
---|
| 404 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
---|
| 405 | <busconfig>
|
---|
| 406 |
|
---|
| 407 | <!-- Search for .service files in /usr/local -->
|
---|
| 408 | <servicedir>/usr/local/share/dbus-1/services</servicedir>
|
---|
| 409 |
|
---|
| 410 | </busconfig></literal>
|
---|
| 411 | EOF</userinput></screen>
|
---|
| 412 |
|
---|
[e8e3312d] | 413 | </sect3>
|
---|
| 414 |
|
---|
[670d3f8] | 415 | <sect3 id="dbus-session">
|
---|
[5c9e998] | 416 | <title>D-Bus Session Daemon</title>
|
---|
[e8e3312d] | 417 |
|
---|
[5c9e998] | 418 | <para revision="sysv">
|
---|
[54666831] | 419 | To automatically start <command>dbus-daemon</command> when the
|
---|
| 420 | system is rebooted, install the
|
---|
| 421 | <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
|
---|
| 422 | <xref linkend="bootscripts"/> package.
|
---|
| 423 | </para>
|
---|
| 424 |
|
---|
[670d3f8] | 425 | <indexterm zone="dbus dbus-session" revision="sysv">
|
---|
[54666831] | 426 | <primary sortas="f-dbus">dbus</primary>
|
---|
| 427 | </indexterm>
|
---|
| 428 |
|
---|
[5c9e998] | 429 | <screen role="root" revision="sysv"><userinput>make install-dbus</userinput></screen>
|
---|
[54666831] | 430 |
|
---|
[5c9e998] | 431 | <para revision="sysv">
|
---|
[54666831] | 432 | Note that this boot script only starts the system-wide
|
---|
| 433 | <application>D-Bus</application> daemon. Each user requiring access to
|
---|
| 434 | <application>D-Bus</application> services will also need to run a
|
---|
| 435 | session daemon as well. There are many methods you can use to start a
|
---|
[0b83a69] | 436 | session daemon using the <command>dbus-launch</command> command. Review
|
---|
| 437 | the <command>dbus-launch</command> man page for details about the
|
---|
| 438 | available parameters and options. Here are some suggestions and
|
---|
| 439 | examples:
|
---|
| 440 | </para>
|
---|
[3565e02] | 441 |
|
---|
[5c9e998] | 442 | <para revision="systemd">
|
---|
| 443 | There are many methods you can use to start a session daemon
|
---|
| 444 | using the <command>dbus-launch</command> command. Review the
|
---|
| 445 | <command>dbus-launch</command> man page for details about the
|
---|
| 446 | available parameters and options. Here are some suggestions and
|
---|
| 447 | examples:
|
---|
| 448 | </para>
|
---|
| 449 |
|
---|
| 450 |
|
---|
[3565e02] | 451 | <itemizedlist spacing="compact">
|
---|
| 452 | <listitem>
|
---|
[0b83a69] | 453 | <para>
|
---|
| 454 | Add <command>dbus-launch</command> to the line in the
|
---|
| 455 | <filename>~/.xinitrc</filename> file that starts your graphical
|
---|
| 456 | desktop environment.
|
---|
| 457 | </para>
|
---|
[3565e02] | 458 | </listitem>
|
---|
| 459 | <listitem>
|
---|
[0b83a69] | 460 | <para>
|
---|
[9e2a8bab] | 461 | If you use <command>gdm</command> or some other display manager
|
---|
[0b83a69] | 462 | that calls the <filename>~/.xsession</filename> file, you can add
|
---|
| 463 | <command>dbus-launch</command> to the line in your
|
---|
| 464 | <filename>~/.xsession</filename> file that starts your graphical
|
---|
| 465 | desktop environment. The syntax would be similar to the example in
|
---|
| 466 | the <filename>~/.xinitrc</filename> file.
|
---|
| 467 | </para>
|
---|
[3565e02] | 468 | </listitem>
|
---|
| 469 | <listitem>
|
---|
[0b83a69] | 470 | <para>
|
---|
| 471 | The examples shown previously use
|
---|
| 472 | <command>dbus-launch</command> to specify a program to be run. This
|
---|
| 473 | has the benefit (when also using the
|
---|
| 474 | <parameter>--exit-with-session</parameter> parameter) of stopping the
|
---|
| 475 | session daemon when the specified program is stopped. You can also
|
---|
| 476 | start the session daemon in your system or personal startup scripts
|
---|
| 477 | by adding the following lines:
|
---|
| 478 | </para>
|
---|
[3565e02] | 479 |
|
---|
[dac5077] | 480 | <screen role="nodump"><userinput><literal># Start the D-Bus session daemon
|
---|
[3565e02] | 481 | eval `dbus-launch`
|
---|
| 482 | export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
|
---|
| 483 |
|
---|
[0b83a69] | 484 | <para>
|
---|
| 485 | This method will not stop the session daemon when you exit
|
---|
| 486 | your shell, therefore you should add the following line to your
|
---|
| 487 | <filename>~/.bash_logout</filename> file:
|
---|
| 488 | </para>
|
---|
[3565e02] | 489 |
|
---|
[dac5077] | 490 | <screen role="nodump"><userinput><literal># Kill the D-Bus session daemon
|
---|
[3565e02] | 491 | kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
|
---|
[bccbdaea] | 492 | </listitem>
|
---|
[4ec808b] | 493 |
|
---|
[9e2a8bab] | 494 | <!-- KDM is no longer usable, SDDM is it's replacement
|
---|
[3565e02] | 495 | <listitem>
|
---|
[0b83a69] | 496 | <para>
|
---|
| 497 | A hint has been written that provides ways to start scripts
|
---|
| 498 | using the KDM session manager of KDE. The concepts in this hint could
|
---|
| 499 | possibly be used with other session managers as well. The hint is
|
---|
| 500 | located at <ulink
|
---|
| 501 | url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
|
---|
[c45cb57] | 502 | </para>
|
---|
[3565e02] | 503 | </listitem>
|
---|
[9e2a8bab] | 504 | -->
|
---|
[c45cb57] | 505 |
|
---|
[3565e02] | 506 | </itemizedlist>
|
---|
| 507 |
|
---|
[e8e3312d] | 508 | </sect3>
|
---|
| 509 |
|
---|
| 510 | </sect2>
|
---|
| 511 |
|
---|
[5c9e998] | 512 | <sect2 role="content" revision="sysv">
|
---|
[e8e3312d] | 513 | <title>Contents</title>
|
---|
| 514 |
|
---|
| 515 | <segmentedlist>
|
---|
| 516 | <segtitle>Installed Programs</segtitle>
|
---|
[54666831] | 517 | <segtitle>Installed Library</segtitle>
|
---|
[e8e3312d] | 518 | <segtitle>Installed Directories</segtitle>
|
---|
| 519 |
|
---|
| 520 | <seglistitem>
|
---|
[0b83a69] | 521 | <seg>
|
---|
[54666831] | 522 | dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
|
---|
[c358685] | 523 | dbus-run-session, dbus-send, dbus-test-tool,
|
---|
[2cd6717] | 524 | dbus-update-activation-environment, and dbus-uuidgen
|
---|
[0b83a69] | 525 | </seg>
|
---|
| 526 | <seg>
|
---|
[54666831] | 527 | libdbus-1.so
|
---|
[0b83a69] | 528 | </seg>
|
---|
| 529 | <seg>
|
---|
[e20b59be] | 530 | /etc/dbus-1,
|
---|
[79ba2ea] | 531 | /usr/{include,lib}/dbus-1.0,
|
---|
[819a4c7] | 532 | /usr/lib/cmake/DBus1,
|
---|
[e20b59be] | 533 | /usr/share/dbus-1,
|
---|
[819a4c7] | 534 | /usr/share/xml/dbus-1,
|
---|
[e20b59be] | 535 | /usr/share/doc/dbus-&dbus-version;, and
|
---|
[79ba2ea] | 536 | /var/{lib,run}/dbus
|
---|
[0b83a69] | 537 | </seg>
|
---|
[e8e3312d] | 538 | </seglistitem>
|
---|
| 539 | </segmentedlist>
|
---|
| 540 |
|
---|
| 541 | <variablelist>
|
---|
| 542 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 543 | <?dbfo list-presentation="list"?>
|
---|
| 544 | <?dbhtml list-presentation="table"?>
|
---|
| 545 |
|
---|
[54666831] | 546 | <varlistentry id="dbus-cleanup-sockets">
|
---|
| 547 | <term><command>dbus-cleanup-sockets</command></term>
|
---|
| 548 | <listitem>
|
---|
| 549 | <para>
|
---|
[4c24eb0a] | 550 | is used to clean up leftover sockets in a directory
|
---|
[54666831] | 551 | </para>
|
---|
| 552 | <indexterm zone="dbus dbus-cleanup-sockets">
|
---|
| 553 | <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
|
---|
| 554 | </indexterm>
|
---|
| 555 | </listitem>
|
---|
| 556 | </varlistentry>
|
---|
| 557 |
|
---|
| 558 | <varlistentry id="dbus-daemon">
|
---|
| 559 | <term><command>dbus-daemon</command></term>
|
---|
| 560 | <listitem>
|
---|
| 561 | <para>
|
---|
[4c24eb0a] | 562 | is the <application>D-Bus</application> message bus daemon
|
---|
[54666831] | 563 | </para>
|
---|
| 564 | <indexterm zone="dbus dbus-daemon">
|
---|
| 565 | <primary sortas="b-dbus-daemon">dbus-daemon</primary>
|
---|
| 566 | </indexterm>
|
---|
| 567 | </listitem>
|
---|
| 568 | </varlistentry>
|
---|
| 569 |
|
---|
| 570 | <varlistentry id="dbus-launch">
|
---|
[e8e3312d] | 571 | <term><command>dbus-launch</command></term>
|
---|
| 572 | <listitem>
|
---|
[0b83a69] | 573 | <para>
|
---|
| 574 | is used to start <command>dbus-daemon</command> from a shell
|
---|
| 575 | script. It would normally be called from a user's login
|
---|
[4c24eb0a] | 576 | scripts
|
---|
[0b83a69] | 577 | </para>
|
---|
[54666831] | 578 | <indexterm zone="dbus dbus-launch">
|
---|
| 579 | <primary sortas="b-dbus-launch">dbus-launch</primary>
|
---|
| 580 | </indexterm>
|
---|
| 581 | </listitem>
|
---|
| 582 | </varlistentry>
|
---|
| 583 |
|
---|
| 584 | <varlistentry id="dbus-monitor">
|
---|
| 585 | <term><command>dbus-monitor</command></term>
|
---|
| 586 | <listitem>
|
---|
| 587 | <para>
|
---|
| 588 | is used to monitor messages going through a
|
---|
[4c24eb0a] | 589 | <application>D-Bus</application> message bus
|
---|
[54666831] | 590 | </para>
|
---|
| 591 | <indexterm zone="dbus dbus-monitor">
|
---|
| 592 | <primary sortas="b-dbus-monitor">dbus-monitor</primary>
|
---|
| 593 | </indexterm>
|
---|
| 594 | </listitem>
|
---|
| 595 | </varlistentry>
|
---|
| 596 |
|
---|
| 597 | <varlistentry id="dbus-run-session">
|
---|
| 598 | <term><command>dbus-run-session</command></term>
|
---|
| 599 | <listitem>
|
---|
| 600 | <para>
|
---|
[4c24eb0a] | 601 | starts a process as a new <application>D-Bus</application> session
|
---|
[54666831] | 602 | </para>
|
---|
| 603 | <indexterm zone="dbus dbus-run-session">
|
---|
| 604 | <primary sortas="b-dbus-run-session">dbus-run-session</primary>
|
---|
| 605 | </indexterm>
|
---|
| 606 | </listitem>
|
---|
| 607 | </varlistentry>
|
---|
| 608 |
|
---|
| 609 | <varlistentry id="dbus-send">
|
---|
| 610 | <term><command>dbus-send</command></term>
|
---|
| 611 | <listitem>
|
---|
| 612 | <para>
|
---|
| 613 | is used to send a message to a <application>D-Bus</application>
|
---|
[4c24eb0a] | 614 | message bus
|
---|
[54666831] | 615 | </para>
|
---|
| 616 | <indexterm zone="dbus dbus-send">
|
---|
| 617 | <primary sortas="b-dbus-send">dbus-send</primary>
|
---|
| 618 | </indexterm>
|
---|
| 619 | </listitem>
|
---|
| 620 | </varlistentry>
|
---|
| 621 |
|
---|
[c358685] | 622 | <varlistentry id="dbus-test-tool">
|
---|
| 623 | <term><command>dbus-test-tool</command></term>
|
---|
| 624 | <listitem>
|
---|
| 625 | <para>
|
---|
[8558044] | 626 | is a <application>D-Bus</application> traffic generator and test
|
---|
[11d14a27] | 627 | tool; it is a multi-purpose tool for debugging and profiling
|
---|
[4c24eb0a] | 628 | <application>D-Bus</application>
|
---|
[c358685] | 629 | </para>
|
---|
| 630 | <indexterm zone="dbus dbus-test-tool">
|
---|
| 631 | <primary sortas="b-dbus-test-tool">dbus-test-tool</primary>
|
---|
| 632 | </indexterm>
|
---|
| 633 | </listitem>
|
---|
| 634 | </varlistentry>
|
---|
| 635 |
|
---|
| 636 | <varlistentry id="dbus-update-activation-environment">
|
---|
| 637 | <term><command>dbus-update-activation-environment</command></term>
|
---|
| 638 | <listitem>
|
---|
| 639 | <para>
|
---|
[8558044] | 640 | is used to update the environment used for
|
---|
| 641 | <application>D-Bus</application> session services;
|
---|
[11d14a27] | 642 | it updates the list of environment variables used by
|
---|
[c358685] | 643 | <command>dbus-daemon --session</command> when it activates session
|
---|
[4c24eb0a] | 644 | services without using systemd
|
---|
[c358685] | 645 | </para>
|
---|
| 646 | <indexterm zone="dbus dbus-update-activation-environment">
|
---|
| 647 | <primary sortas="b-dbus-update-activation-environment">
|
---|
| 648 | dbus-update-activation-environment</primary>
|
---|
| 649 | </indexterm>
|
---|
| 650 | </listitem>
|
---|
| 651 | </varlistentry>
|
---|
| 652 |
|
---|
[54666831] | 653 | <varlistentry id="dbus-uuidgen">
|
---|
| 654 | <term><command>dbus-uuidgen</command></term>
|
---|
| 655 | <listitem>
|
---|
| 656 | <para>
|
---|
[4c24eb0a] | 657 | is used to generate a universally unique ID
|
---|
[54666831] | 658 | </para>
|
---|
| 659 | <indexterm zone="dbus dbus-uuidgen">
|
---|
| 660 | <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
|
---|
| 661 | </indexterm>
|
---|
| 662 | </listitem>
|
---|
| 663 | </varlistentry>
|
---|
| 664 |
|
---|
| 665 | <varlistentry id="libdbus-1">
|
---|
| 666 | <term><filename class="libraryfile">libdbus-1.so</filename></term>
|
---|
| 667 | <listitem>
|
---|
| 668 | <para>
|
---|
| 669 | contains the API functions used by the
|
---|
| 670 | <application>D-Bus</application> message daemon.
|
---|
| 671 | <application>D-Bus</application> is first a library that provides
|
---|
| 672 | one-to-one communication between any two applications;
|
---|
| 673 | <command>dbus-daemon</command> is an application that uses this
|
---|
[4c24eb0a] | 674 | library to implement a message bus daemon
|
---|
[54666831] | 675 | </para>
|
---|
| 676 | <indexterm zone="dbus libdbus-1">
|
---|
| 677 | <primary sortas="c-libdbus-1">libdbus-1.so</primary>
|
---|
[e8e3312d] | 678 | </indexterm>
|
---|
| 679 | </listitem>
|
---|
| 680 | </varlistentry>
|
---|
| 681 |
|
---|
| 682 | </variablelist>
|
---|
| 683 |
|
---|
| 684 | </sect2>
|
---|
[4c24eb0a] | 685 |
|
---|
[5c9e998] | 686 | <sect2 role="content" revision="systemd">
|
---|
| 687 | <title>Contents</title>
|
---|
| 688 |
|
---|
| 689 | <para>
|
---|
| 690 | A list of the installed files, along with their short
|
---|
| 691 | descriptions can be found at
|
---|
[50836740] | 692 | <ulink url="&lfs-root;/chapter08/dbus.html#contents-dbus"/>.
|
---|
[5c9e998] | 693 | </para>
|
---|
| 694 |
|
---|
| 695 | </sect2>
|
---|
| 696 |
|
---|
[e8e3312d] | 697 | </sect1>
|
---|