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