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