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