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