[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 |
|
---|
[8dfc5c3] | 7 | <!ENTITY dbus-download-http "https://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz">
|
---|
[30d0aef] | 8 | <!ENTITY dbus-download-ftp " ">
|
---|
[9e2a8bab] | 9 | <!ENTITY dbus-md5sum "dfe8a71f412e0b53be26ed4fbfdc91c4">
|
---|
[66d9ef8] | 10 | <!ENTITY dbus-size "2.0 MB">
|
---|
[6742509c] | 11 | <!ENTITY dbus-buildsize "21 MB (add 18 MB for the tests)">
|
---|
[9e2a8bab] | 12 | <!ENTITY dbus-time "0.3 SBU (add 8.0 SBU for the tests)">
|
---|
[819a4c7] | 13 | <!-- The former value was 0.8 SBU, which was far more sensible. -->
|
---|
[e8e3312d] | 14 | ]>
|
---|
| 15 |
|
---|
[fdaae04] | 16 | <sect1 id="dbus" xreflabel="dbus-&dbus-version;">
|
---|
[e8e3312d] | 17 | <?dbhtml filename="dbus.html"?>
|
---|
| 18 |
|
---|
| 19 | <sect1info>
|
---|
| 20 | <othername>$LastChangedBy$</othername>
|
---|
| 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 |
|
---|
[87351a9] | 51 | &lfs10_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">
|
---|
[bc3bb455] | 97 | <xref linkend="xorg7-lib"/> (for <command>dbus-launch</command> program)
|
---|
| 98 | <phrase revision="sysv">and <xref linkend="elogind"/> (These are
|
---|
| 99 | circular dependencies. First build without them, and then again after
|
---|
| 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
|
---|
| 116 | <ulink url="http://ftp.gnome.org/pub/gnome/sources/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 \
|
---|
[51dfb3e] | 148 | --enable-user-session \
|
---|
[f29eb8a] | 149 | --disable-doxygen-docs \
|
---|
| 150 | --disable-xml-docs \
|
---|
| 151 | --disable-static \
|
---|
[51dfb3e] | 152 | --with-systemduserunitdir=no \
|
---|
| 153 | --with-systemdsystemunitdir=no \
|
---|
[f29eb8a] | 154 | --docdir=/usr/share/doc/dbus-&dbus-version; \
|
---|
[fda8d05f] | 155 | --with-console-auth-dir=/run/console \
|
---|
[f29eb8a] | 156 | --with-system-pid-file=/run/dbus/pid \
|
---|
| 157 | --with-system-socket=/run/dbus/system_bus_socket &&
|
---|
[e8e3312d] | 158 | make</userinput></screen>
|
---|
| 159 |
|
---|
[f29eb8a] | 160 | <screen revision="systemd"><userinput>./configure --prefix=/usr \
|
---|
| 161 | --sysconfdir=/etc \
|
---|
| 162 | --localstatedir=/var \
|
---|
| 163 | --enable-user-session \
|
---|
| 164 | --disable-doxygen-docs \
|
---|
| 165 | --disable-xml-docs \
|
---|
| 166 | --disable-static \
|
---|
| 167 | --docdir=/usr/share/doc/dbus-&dbus-version; \
|
---|
[fda8d05f] | 168 | --with-console-auth-dir=/run/console \
|
---|
[f29eb8a] | 169 | --with-system-pid-file=/run/dbus/pid \
|
---|
| 170 | --with-system-socket=/run/dbus/system_bus_socket &&
|
---|
[5c9e998] | 171 | make</userinput></screen>
|
---|
| 172 |
|
---|
[0b83a69] | 173 | <para>
|
---|
| 174 | See below for test instructions.
|
---|
| 175 | </para>
|
---|
[c45cb57] | 176 |
|
---|
[a761478] | 177 | <!--
|
---|
[5c9e998] | 178 | <warning revision="systemd">
|
---|
| 179 | <para>
|
---|
| 180 | Installing the package will override all files installed by
|
---|
| 181 | <application>D-Bus</application> in LFS. It is critical that
|
---|
| 182 | nothing uses <application>D-Bus</application> libraries or
|
---|
[670d3f8] | 183 | programs during the installation. The best way to ensure that these
|
---|
| 184 | libraries are not being used is to run the installation in rescue mode.
|
---|
| 185 | To switch to rescue mode, run the following command as the
|
---|
| 186 | <systemitem class="username">root</systemitem> user (from a TTY):
|
---|
[5c9e998] | 187 | </para>
|
---|
[670d3f8] | 188 |
|
---|
| 189 | <screen role="root"><userinput>systemctl start rescue.target</userinput></screen>
|
---|
| 190 |
|
---|
[5c9e998] | 191 | </warning>
|
---|
[a761478] | 192 | -->
|
---|
[5c9e998] | 193 |
|
---|
[0b83a69] | 194 | <para>
|
---|
| 195 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 196 | </para>
|
---|
[e8e3312d] | 197 |
|
---|
[108beaf] | 198 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
[b6a2a0e] | 199 |
|
---|
[51dfb3e] | 200 | <para>
|
---|
[787a2e75] | 201 | The shared library needs to be moved to
|
---|
| 202 | <filename class="directory">/lib</filename>, and as a result the
|
---|
| 203 | <filename class="extension">.so</filename> file in
|
---|
| 204 | <filename class="directory">/usr/lib</filename> will need to be
|
---|
| 205 | recreated. Run the following command as the
|
---|
| 206 | <systemitem class="username">root</systemitem> user:
|
---|
| 207 | </para>
|
---|
| 208 |
|
---|
[51dfb3e] | 209 | <screen role="root"><userinput>mv -v /usr/lib/libdbus-1.so.* /lib &&
|
---|
[787a2e75] | 210 | ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
|
---|
| 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
|
---|
[819a4c7] | 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>
|
---|
[9e2a8bab] | 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
|
---|
| 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>
|
---|
[4532b2f] | 316 | <para>
|
---|
[aa41434] | 317 | <parameter>--with-console-auth-dir=/run/console</parameter>: This
|
---|
[9e2a8bab] | 318 | parameter specifies the directory to check for console ownership.
|
---|
[4532b2f] | 319 | </para>
|
---|
[0b83a69] | 320 |
|
---|
[f29eb8a] | 321 | <para>
|
---|
| 322 | <parameter>--with-system-pid-file=/run/dbus/pid</parameter>: This
|
---|
| 323 | parameter specifies the location of the PID file.
|
---|
| 324 | </para>
|
---|
| 325 |
|
---|
| 326 | <para>
|
---|
| 327 | <parameter>--with-system-socket=/run/dbus/system_bus_socket</parameter>:
|
---|
| 328 | This parameter specifies the location of the system bus socket.
|
---|
| 329 | </para>
|
---|
| 330 |
|
---|
[0b83a69] | 331 | <para>
|
---|
[9e2a8bab] | 332 | <parameter>--enable-tests</parameter>: Builds extra parts of the code to
|
---|
[1665413] | 333 | support all tests. Do not use on a production build.
|
---|
[4947a7a] | 334 | </para>
|
---|
| 335 |
|
---|
| 336 | <para>
|
---|
[9e2a8bab] | 337 | <option>--enable-embedded-tests</option>: Builds extra parts of the
|
---|
[1665413] | 338 | code to support only unit tests. Do not use on a production build.
|
---|
[0b83a69] | 339 | </para>
|
---|
| 340 |
|
---|
| 341 | <para>
|
---|
[9e2a8bab] | 342 | <parameter>--enable-asserts</parameter>: Enables debugging code to run
|
---|
[e5347c36] | 343 | assertions for statements normally assumed to be true. This prevents a
|
---|
| 344 | warning that '<parameter>--enable-tests</parameter>' on its own is only
|
---|
| 345 | useful for profiling and might not give true results for all tests, but
|
---|
| 346 | adds its own NOTE that this should not be used in a production build.
|
---|
[0b83a69] | 347 | </para>
|
---|
[30d0aef] | 348 |
|
---|
[e8e3312d] | 349 | </sect2>
|
---|
| 350 |
|
---|
| 351 | <sect2 role="configuration">
|
---|
[670d3f8] | 352 | <title>Configuring D-Bus</title>
|
---|
[e8e3312d] | 353 |
|
---|
| 354 | <sect3 id="dbus-config">
|
---|
| 355 | <title>Config Files</title>
|
---|
[0b83a69] | 356 |
|
---|
| 357 | <para>
|
---|
| 358 | <filename>/etc/dbus-1/session.conf</filename>,
|
---|
| 359 | <filename>/etc/dbus-1/system.conf</filename> and
|
---|
| 360 | <filename>/etc/dbus-1/system.d/*</filename>
|
---|
| 361 | </para>
|
---|
[e8e3312d] | 362 |
|
---|
[54666831] | 363 | <indexterm zone="dbus dbus-config">
|
---|
[e8e3312d] | 364 | <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
|
---|
| 365 | </indexterm>
|
---|
| 366 |
|
---|
[54666831] | 367 | <indexterm zone="dbus dbus-config">
|
---|
[e8e3312d] | 368 | <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
|
---|
| 369 | </indexterm>
|
---|
| 370 |
|
---|
[54666831] | 371 | <indexterm zone="dbus dbus-config">
|
---|
[c45cb57] | 372 | <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
|
---|
[e8e3312d] | 373 | </indexterm>
|
---|
| 374 |
|
---|
| 375 | </sect3>
|
---|
| 376 |
|
---|
[e9efab0b] | 377 | <sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
|
---|
| 378 | <title>Configuration Information</title>
|
---|
[e8e3312d] | 379 |
|
---|
[0b83a69] | 380 | <para>
|
---|
| 381 | The configuration files listed above should probably not be
|
---|
| 382 | modified. If changes are required, you should create
|
---|
| 383 | <filename>/etc/dbus-1/session-local.conf</filename> and/or
|
---|
| 384 | <filename>/etc/dbus-1/system-local.conf</filename> and make any
|
---|
| 385 | desired changes to these files.
|
---|
| 386 | </para>
|
---|
| 387 |
|
---|
| 388 | <para>
|
---|
| 389 | If any packages install a
|
---|
| 390 | <application>D-Bus</application> <filename>.service</filename>
|
---|
| 391 | file outside of the standard <filename
|
---|
| 392 | class="directory">/usr/share/dbus-1/services</filename> directory,
|
---|
| 393 | that directory should be added to the local session configuration.
|
---|
| 394 | For instance, <filename
|
---|
| 395 | class="directory">/usr/local/share/dbus-1/services</filename> can
|
---|
| 396 | be added by performing the following commands as the
|
---|
| 397 | <systemitem class="username">root</systemitem> user:
|
---|
| 398 | </para>
|
---|
[57aa7a28] | 399 |
|
---|
| 400 | <screen role="root"><userinput>cat > /etc/dbus-1/session-local.conf << "EOF"
|
---|
| 401 | <literal><!DOCTYPE busconfig PUBLIC
|
---|
| 402 | "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
---|
| 403 | "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
---|
| 404 | <busconfig>
|
---|
| 405 |
|
---|
| 406 | <!-- Search for .service files in /usr/local -->
|
---|
| 407 | <servicedir>/usr/local/share/dbus-1/services</servicedir>
|
---|
| 408 |
|
---|
| 409 | </busconfig></literal>
|
---|
| 410 | EOF</userinput></screen>
|
---|
| 411 |
|
---|
[e8e3312d] | 412 | </sect3>
|
---|
| 413 |
|
---|
[670d3f8] | 414 | <sect3 id="dbus-session">
|
---|
[5c9e998] | 415 | <title>D-Bus Session Daemon</title>
|
---|
[e8e3312d] | 416 |
|
---|
[5c9e998] | 417 | <para revision="sysv">
|
---|
[54666831] | 418 | To automatically start <command>dbus-daemon</command> when the
|
---|
| 419 | system is rebooted, install the
|
---|
| 420 | <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
|
---|
| 421 | <xref linkend="bootscripts"/> package.
|
---|
| 422 | </para>
|
---|
| 423 |
|
---|
[670d3f8] | 424 | <indexterm zone="dbus dbus-session" revision="sysv">
|
---|
[54666831] | 425 | <primary sortas="f-dbus">dbus</primary>
|
---|
| 426 | </indexterm>
|
---|
| 427 |
|
---|
[5c9e998] | 428 | <screen role="root" revision="sysv"><userinput>make install-dbus</userinput></screen>
|
---|
[54666831] | 429 |
|
---|
[5c9e998] | 430 | <para revision="sysv">
|
---|
[54666831] | 431 | Note that this boot script only starts the system-wide
|
---|
| 432 | <application>D-Bus</application> daemon. Each user requiring access to
|
---|
| 433 | <application>D-Bus</application> services will also need to run a
|
---|
| 434 | session daemon as well. There are many methods you can use to start a
|
---|
[0b83a69] | 435 | session daemon using the <command>dbus-launch</command> command. Review
|
---|
| 436 | the <command>dbus-launch</command> man page for details about the
|
---|
| 437 | available parameters and options. Here are some suggestions and
|
---|
| 438 | examples:
|
---|
| 439 | </para>
|
---|
[3565e02] | 440 |
|
---|
[5c9e998] | 441 | <para revision="systemd">
|
---|
| 442 | There are many methods you can use to start a session daemon
|
---|
| 443 | using the <command>dbus-launch</command> command. Review the
|
---|
| 444 | <command>dbus-launch</command> man page for details about the
|
---|
| 445 | available parameters and options. Here are some suggestions and
|
---|
| 446 | examples:
|
---|
| 447 | </para>
|
---|
| 448 |
|
---|
| 449 |
|
---|
[3565e02] | 450 | <itemizedlist spacing="compact">
|
---|
| 451 | <listitem>
|
---|
[0b83a69] | 452 | <para>
|
---|
| 453 | Add <command>dbus-launch</command> to the line in the
|
---|
| 454 | <filename>~/.xinitrc</filename> file that starts your graphical
|
---|
| 455 | desktop environment.
|
---|
| 456 | </para>
|
---|
[3565e02] | 457 | </listitem>
|
---|
| 458 | <listitem>
|
---|
[0b83a69] | 459 | <para>
|
---|
[9e2a8bab] | 460 | If you use <command>gdm</command> or some other display manager
|
---|
[0b83a69] | 461 | that calls the <filename>~/.xsession</filename> file, you can add
|
---|
| 462 | <command>dbus-launch</command> to the line in your
|
---|
| 463 | <filename>~/.xsession</filename> file that starts your graphical
|
---|
| 464 | desktop environment. The syntax would be similar to the example in
|
---|
| 465 | the <filename>~/.xinitrc</filename> file.
|
---|
| 466 | </para>
|
---|
[3565e02] | 467 | </listitem>
|
---|
| 468 | <listitem>
|
---|
[0b83a69] | 469 | <para>
|
---|
| 470 | The examples shown previously use
|
---|
| 471 | <command>dbus-launch</command> to specify a program to be run. This
|
---|
| 472 | has the benefit (when also using the
|
---|
| 473 | <parameter>--exit-with-session</parameter> parameter) of stopping the
|
---|
| 474 | session daemon when the specified program is stopped. You can also
|
---|
| 475 | start the session daemon in your system or personal startup scripts
|
---|
| 476 | by adding the following lines:
|
---|
| 477 | </para>
|
---|
[3565e02] | 478 |
|
---|
[dac5077] | 479 | <screen role="nodump"><userinput><literal># Start the D-Bus session daemon
|
---|
[3565e02] | 480 | eval `dbus-launch`
|
---|
| 481 | export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
|
---|
| 482 |
|
---|
[0b83a69] | 483 | <para>
|
---|
| 484 | This method will not stop the session daemon when you exit
|
---|
| 485 | your shell, therefore you should add the following line to your
|
---|
| 486 | <filename>~/.bash_logout</filename> file:
|
---|
| 487 | </para>
|
---|
[3565e02] | 488 |
|
---|
[dac5077] | 489 | <screen role="nodump"><userinput><literal># Kill the D-Bus session daemon
|
---|
[3565e02] | 490 | kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
|
---|
[bccbdaea] | 491 | </listitem>
|
---|
[4ec808b] | 492 |
|
---|
[9e2a8bab] | 493 | <!-- KDM is no longer usable, SDDM is it's replacement
|
---|
[3565e02] | 494 | <listitem>
|
---|
[0b83a69] | 495 | <para>
|
---|
| 496 | A hint has been written that provides ways to start scripts
|
---|
| 497 | using the KDM session manager of KDE. The concepts in this hint could
|
---|
| 498 | possibly be used with other session managers as well. The hint is
|
---|
| 499 | located at <ulink
|
---|
| 500 | url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
|
---|
[c45cb57] | 501 | </para>
|
---|
[3565e02] | 502 | </listitem>
|
---|
[9e2a8bab] | 503 | -->
|
---|
[c45cb57] | 504 |
|
---|
[3565e02] | 505 | </itemizedlist>
|
---|
| 506 |
|
---|
[e8e3312d] | 507 | </sect3>
|
---|
| 508 |
|
---|
| 509 | </sect2>
|
---|
| 510 |
|
---|
[5c9e998] | 511 | <sect2 role="content" revision="sysv">
|
---|
[e8e3312d] | 512 | <title>Contents</title>
|
---|
| 513 |
|
---|
| 514 | <segmentedlist>
|
---|
| 515 | <segtitle>Installed Programs</segtitle>
|
---|
[54666831] | 516 | <segtitle>Installed Library</segtitle>
|
---|
[e8e3312d] | 517 | <segtitle>Installed Directories</segtitle>
|
---|
| 518 |
|
---|
| 519 | <seglistitem>
|
---|
[0b83a69] | 520 | <seg>
|
---|
[54666831] | 521 | dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
|
---|
[c358685] | 522 | dbus-run-session, dbus-send, dbus-test-tool,
|
---|
[2cd6717] | 523 | dbus-update-activation-environment, and dbus-uuidgen
|
---|
[0b83a69] | 524 | </seg>
|
---|
| 525 | <seg>
|
---|
[54666831] | 526 | libdbus-1.so
|
---|
[0b83a69] | 527 | </seg>
|
---|
| 528 | <seg>
|
---|
[e20b59be] | 529 | /etc/dbus-1,
|
---|
[79ba2ea] | 530 | /usr/{include,lib}/dbus-1.0,
|
---|
[819a4c7] | 531 | /usr/lib/cmake/DBus1,
|
---|
[e20b59be] | 532 | /usr/share/dbus-1,
|
---|
[819a4c7] | 533 | /usr/share/xml/dbus-1,
|
---|
[e20b59be] | 534 | /usr/share/doc/dbus-&dbus-version;, and
|
---|
[79ba2ea] | 535 | /var/{lib,run}/dbus
|
---|
[0b83a69] | 536 | </seg>
|
---|
[e8e3312d] | 537 | </seglistitem>
|
---|
| 538 | </segmentedlist>
|
---|
| 539 |
|
---|
| 540 | <variablelist>
|
---|
| 541 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 542 | <?dbfo list-presentation="list"?>
|
---|
| 543 | <?dbhtml list-presentation="table"?>
|
---|
| 544 |
|
---|
[54666831] | 545 | <varlistentry id="dbus-cleanup-sockets">
|
---|
| 546 | <term><command>dbus-cleanup-sockets</command></term>
|
---|
| 547 | <listitem>
|
---|
| 548 | <para>
|
---|
| 549 | is used to clean up leftover sockets in a directory.
|
---|
| 550 | </para>
|
---|
| 551 | <indexterm zone="dbus dbus-cleanup-sockets">
|
---|
| 552 | <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
|
---|
| 553 | </indexterm>
|
---|
| 554 | </listitem>
|
---|
| 555 | </varlistentry>
|
---|
| 556 |
|
---|
| 557 | <varlistentry id="dbus-daemon">
|
---|
| 558 | <term><command>dbus-daemon</command></term>
|
---|
| 559 | <listitem>
|
---|
| 560 | <para>
|
---|
| 561 | is the <application>D-Bus</application> message bus daemon.
|
---|
| 562 | </para>
|
---|
| 563 | <indexterm zone="dbus dbus-daemon">
|
---|
| 564 | <primary sortas="b-dbus-daemon">dbus-daemon</primary>
|
---|
| 565 | </indexterm>
|
---|
| 566 | </listitem>
|
---|
| 567 | </varlistentry>
|
---|
| 568 |
|
---|
| 569 | <varlistentry id="dbus-launch">
|
---|
[e8e3312d] | 570 | <term><command>dbus-launch</command></term>
|
---|
| 571 | <listitem>
|
---|
[0b83a69] | 572 | <para>
|
---|
| 573 | is used to start <command>dbus-daemon</command> from a shell
|
---|
| 574 | script. It would normally be called from a user's login
|
---|
| 575 | scripts.
|
---|
| 576 | </para>
|
---|
[54666831] | 577 | <indexterm zone="dbus dbus-launch">
|
---|
| 578 | <primary sortas="b-dbus-launch">dbus-launch</primary>
|
---|
| 579 | </indexterm>
|
---|
| 580 | </listitem>
|
---|
| 581 | </varlistentry>
|
---|
| 582 |
|
---|
| 583 | <varlistentry id="dbus-monitor">
|
---|
| 584 | <term><command>dbus-monitor</command></term>
|
---|
| 585 | <listitem>
|
---|
| 586 | <para>
|
---|
| 587 | is used to monitor messages going through a
|
---|
| 588 | <application>D-Bus</application> message bus.
|
---|
| 589 | </para>
|
---|
| 590 | <indexterm zone="dbus dbus-monitor">
|
---|
| 591 | <primary sortas="b-dbus-monitor">dbus-monitor</primary>
|
---|
| 592 | </indexterm>
|
---|
| 593 | </listitem>
|
---|
| 594 | </varlistentry>
|
---|
| 595 |
|
---|
| 596 | <varlistentry id="dbus-run-session">
|
---|
| 597 | <term><command>dbus-run-session</command></term>
|
---|
| 598 | <listitem>
|
---|
| 599 | <para>
|
---|
[9e2a8bab] | 600 | starts a process as a new <application>D-Bus</application> session.
|
---|
[54666831] | 601 | </para>
|
---|
| 602 | <indexterm zone="dbus dbus-run-session">
|
---|
| 603 | <primary sortas="b-dbus-run-session">dbus-run-session</primary>
|
---|
| 604 | </indexterm>
|
---|
| 605 | </listitem>
|
---|
| 606 | </varlistentry>
|
---|
| 607 |
|
---|
| 608 | <varlistentry id="dbus-send">
|
---|
| 609 | <term><command>dbus-send</command></term>
|
---|
| 610 | <listitem>
|
---|
| 611 | <para>
|
---|
| 612 | is used to send a message to a <application>D-Bus</application>
|
---|
| 613 | message bus.
|
---|
| 614 | </para>
|
---|
| 615 | <indexterm zone="dbus dbus-send">
|
---|
| 616 | <primary sortas="b-dbus-send">dbus-send</primary>
|
---|
| 617 | </indexterm>
|
---|
| 618 | </listitem>
|
---|
| 619 | </varlistentry>
|
---|
| 620 |
|
---|
[c358685] | 621 | <varlistentry id="dbus-test-tool">
|
---|
| 622 | <term><command>dbus-test-tool</command></term>
|
---|
| 623 | <listitem>
|
---|
| 624 | <para>
|
---|
[11d14a27] | 625 | is a <application>D-Bus</application> traffic generator and test
|
---|
| 626 | tool; it is a multi-purpose tool for debugging and profiling
|
---|
[c358685] | 627 | <application>D-Bus</application>.
|
---|
| 628 | </para>
|
---|
| 629 | <indexterm zone="dbus dbus-test-tool">
|
---|
| 630 | <primary sortas="b-dbus-test-tool">dbus-test-tool</primary>
|
---|
| 631 | </indexterm>
|
---|
| 632 | </listitem>
|
---|
| 633 | </varlistentry>
|
---|
| 634 |
|
---|
| 635 | <varlistentry id="dbus-update-activation-environment">
|
---|
| 636 | <term><command>dbus-update-activation-environment</command></term>
|
---|
| 637 | <listitem>
|
---|
| 638 | <para>
|
---|
[11d14a27] | 639 | is used to update the environment used for
|
---|
| 640 | <application>D-Bus</application> session services;
|
---|
| 641 | it updates the list of environment variables used by
|
---|
[c358685] | 642 | <command>dbus-daemon --session</command> when it activates session
|
---|
| 643 | services without using systemd.
|
---|
| 644 | </para>
|
---|
| 645 | <indexterm zone="dbus dbus-update-activation-environment">
|
---|
| 646 | <primary sortas="b-dbus-update-activation-environment">
|
---|
| 647 | dbus-update-activation-environment</primary>
|
---|
| 648 | </indexterm>
|
---|
| 649 | </listitem>
|
---|
| 650 | </varlistentry>
|
---|
| 651 |
|
---|
[54666831] | 652 | <varlistentry id="dbus-uuidgen">
|
---|
| 653 | <term><command>dbus-uuidgen</command></term>
|
---|
| 654 | <listitem>
|
---|
| 655 | <para>
|
---|
| 656 | is used to generate a universally unique ID.
|
---|
| 657 | </para>
|
---|
| 658 | <indexterm zone="dbus dbus-uuidgen">
|
---|
| 659 | <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
|
---|
| 660 | </indexterm>
|
---|
| 661 | </listitem>
|
---|
| 662 | </varlistentry>
|
---|
| 663 |
|
---|
| 664 | <varlistentry id="libdbus-1">
|
---|
| 665 | <term><filename class="libraryfile">libdbus-1.so</filename></term>
|
---|
| 666 | <listitem>
|
---|
| 667 | <para>
|
---|
| 668 | contains the API functions used by the
|
---|
| 669 | <application>D-Bus</application> message daemon.
|
---|
| 670 | <application>D-Bus</application> is first a library that provides
|
---|
| 671 | one-to-one communication between any two applications;
|
---|
| 672 | <command>dbus-daemon</command> is an application that uses this
|
---|
| 673 | library to implement a message bus daemon.
|
---|
| 674 | </para>
|
---|
| 675 | <indexterm zone="dbus libdbus-1">
|
---|
| 676 | <primary sortas="c-libdbus-1">libdbus-1.so</primary>
|
---|
[e8e3312d] | 677 | </indexterm>
|
---|
| 678 | </listitem>
|
---|
| 679 | </varlistentry>
|
---|
| 680 |
|
---|
| 681 | </variablelist>
|
---|
| 682 |
|
---|
| 683 | </sect2>
|
---|
[5c9e998] | 684 |
|
---|
| 685 | <sect2 role="content" revision="systemd">
|
---|
| 686 | <title>Contents</title>
|
---|
| 687 |
|
---|
| 688 | <para>
|
---|
| 689 | A list of the installed files, along with their short
|
---|
| 690 | descriptions can be found at
|
---|
[f0dc9578] | 691 | <ulink url="&lfs-rootd;/chapter08/dbus.html#contents-dbus"/>.
|
---|
[5c9e998] | 692 | </para>
|
---|
| 693 |
|
---|
| 694 | </sect2>
|
---|
| 695 |
|
---|
[e8e3312d] | 696 |
|
---|
| 697 | </sect1>
|
---|
[0d7900a] | 698 |
|
---|