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