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