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