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