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