source: general/sysutils/dbus.xml@ f1d25d2

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since f1d25d2 was f1d25d2, checked in by Fernando de Oliveira <fernando@…>, 10 years ago

D-Bus-1.8.0: modify 'Optional' dependencies.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@12737 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 18.3 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
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 "http://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz">
8 <!ENTITY dbus-download-ftp " ">
9 <!ENTITY dbus-md5sum "059fbe84e39fc99c67a14f15b1f39dff">
10 <!ENTITY dbus-size "1.8 MB">
11 <!ENTITY dbus-buildsize "86 MB (additional 26 MB installed)">
12 <!ENTITY dbus-time "0.35 SBU (additional 1.3 SBU for tests)">
13]>
14
15<sect1 id="dbus" xreflabel="D-Bus-&dbus-version;">
16 <?dbhtml filename="dbus.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>D-Bus-&dbus-version;</title>
24
25 <indexterm zone="dbus">
26 <primary sortas="a-D-Bus">D-Bus</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to D-Bus</title>
31
32 <para>
33 <application>D-Bus</application> is a message bus system, a simple
34 way for applications to talk to one another.
35 <application>D-Bus</application> supplies both a system daemon (for events
36 such as <quote>new hardware device added</quote> or <quote>printer queue
37 changed</quote>) and a per-user-login-session daemon (for general IPC needs
38 among user applications). Also, the message bus is built on top of a
39 general one-to-one message passing framework, which can be used by any two
40 applications to communicate directly (without going through the message bus
41 daemon).
42 </para>
43
44 &lfs75_checked;
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>
50 Download (HTTP): <ulink url="&dbus-download-http;"/>
51 </para>
52 </listitem>
53 <listitem>
54 <para>
55 Download (FTP): <ulink url="&dbus-download-ftp;"/>
56 </para>
57 </listitem>
58 <listitem>
59 <para>
60 Download MD5 sum: &dbus-md5sum;
61 </para>
62 </listitem>
63 <listitem>
64 <para>
65 Download size: &dbus-size;
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Estimated disk space required: &dbus-buildsize;
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Estimated build time: &dbus-time;
76 </para>
77 </listitem>
78 </itemizedlist>
79
80 <bridgehead renderas="sect3">D-Bus Dependencies</bridgehead>
81
82 <bridgehead renderas="sect4">Required</bridgehead>
83 <para role="required">
84 <xref linkend="expat"/>
85 </para>
86
87 <bridgehead renderas="sect4">Recommended</bridgehead>
88 <para role="recommended">
89 <xref linkend="xorg7-lib"/>
90 (for <command>dbus-launch</command> program)
91 </para>
92
93 <bridgehead renderas="sect4">Optional</bridgehead>
94 <para role="optional">
95 For the tests:
96 <xref linkend="dbus-glib"/>,
97 <xref linkend="dbus-python"/>, and
98 <xref linkend="pygobject2"/>;
99 for the API documentation:
100 <xref linkend="doxygen"/>;
101 for man pages and XML/HTML documentation:
102 <xref linkend="xmlto"/>
103 </para>
104
105 <para condition="html" role="usernotes">User Notes:
106 <ulink url="&blfs-wiki;/dbus"/>
107 </para>
108 </sect2>
109
110 <sect2 role="installation">
111 <title>Installation of D-Bus</title>
112
113 <para>
114 As the <systemitem class="username">root</systemitem> user, create a
115 system user and group to handle the system message bus activity:
116 </para>
117
118<screen role="root"><userinput>groupadd -g 18 messagebus &amp;&amp;
119useradd -c "D-Bus Message Daemon User" -d /var/run/dbus \
120 -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
121
122 <para>
123 Install <application>D-Bus</application> by running the following
124 commands (you may wish to review the output from
125 <command>./configure --help</command> first and add any desired parameters
126 to the <command>configure</command> command shown below):
127 </para>
128
129<screen><userinput>./configure --prefix=/usr \
130 --sysconfdir=/etc \
131 --localstatedir=/var \
132 --libexecdir=/usr/lib/dbus-1.0 \
133 --with-console-auth-dir=/run/console/ \
134 --without-systemdsystemunitdir \
135 --disable-systemd \
136 --disable-static &amp;&amp;
137make</userinput></screen>
138
139 <para>
140 See below for test instructions.
141 </para>
142
143 <para>
144 Now, as the <systemitem class="username">root</systemitem> user:
145 </para>
146
147<screen role="root"><userinput>make install &amp;&amp;
148mv -v /usr/share/doc/dbus /usr/share/doc/dbus-&dbus-version;</userinput></screen>
149
150 <para>
151 If you are still building your system in chroot or you did not start the
152 daemon yet, but you want to compile some packages that require
153 <application>D-Bus</application>, generate
154 <application>D-Bus</application> UUID to avoid warnings when compiling
155 some packages with the following command as the
156 <systemitem class="username">root</systemitem> user:
157 </para>
158
159<screen role="root"><userinput>dbus-uuidgen --ensure</userinput></screen>
160
161 <para>
162 The dbus tests cannot be run until after <xref linkend="dbus-glib"/>
163 has been installed. They must be run as an unprivileged user from a
164 local session. Tests fail through ssh. If you want to run only the unit
165 tests, replace, below, <parameter>--enable-tests</parameter> by
166 <parameter>--enable-embedded-tests</parameter>, otherwise,
167 <xref linkend="dbus-python"/> has to be installed, before.
168 The tests require passing additional parameters to
169 <command>configure</command> and exposing additional functionality in
170 the binaries. These interfaces are not intended to be used in a
171 production build of <application>D-Bus</application>. If you would
172 like to run the tests, issue the following commands:
173 </para>
174
175<screen><userinput>make distclean &amp;&amp;
176./configure --enable-tests --enable-asserts &amp;&amp;
177make &amp;&amp;
178make check &amp;&amp;
179make distclean</userinput></screen>
180
181 <para>
182 If <command>run-test.sh</command> fails, it can be disabled with the
183 following sed, before running the commands for the tests:
184 </para>
185
186<screen><userinput>sed -i -e 's:run-test.sh:$(NULL):g' test/name-test/Makefile.in</userinput></screen>
187
188 <para>
189 Note there has been a report that the tests may fail if running
190 inside a Midnight Commander shell.
191 You may get out-of-memory error messages when running the tests.
192 These are normal and can be safely ignored.
193 </para>
194
195 </sect2>
196
197 <sect2 role="commands">
198 <title>Command Explanations</title>
199
200 <para>
201 <parameter>--with-console-auth-dir=/run/console/</parameter>: This
202 parameter specifies location of the
203 <application>ConsoleKit</application> auth dir.
204 </para>
205
206 <para>
207 <parameter>--without-systemdsystemunitdir</parameter>: This switch
208 prevents installation of systemd unit files.
209 </para>
210
211 <para>
212 <parameter>--disable-systemd</parameter>: This switch disables systemd
213 support in <application>D-Bus</application>
214 </para>
215
216 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
217 href="../../xincludes/static-libraries.xml"/>
218
219 <para>
220 <parameter>--enable-tests</parameter>: Build extra parts of the code to
221 support all tests. Configure will end with a NOTE warning about increased
222 size of libraries and decreased security.
223 </para>
224
225 <para>
226 <parameter>--enable-embedded-tests</parameter>: Build extra parts of the
227 code to support only unit tests. Configure will end with a NOTE warning
228 about increased size of libraries and decreased security.
229 </para>
230
231 <para>
232 <parameter>--enable-asserts</parameter>: Enable debugging code to run
233 assertions for statements normally assumed to be true. This prevents a
234 warning that '<parameter>--enable-tests</parameter>' on its own is only
235 useful for profiling and might not give true results for all tests, but
236 adds its own NOTE that this should not be used in a production build.
237 </para>
238
239 </sect2>
240
241 <sect2 role="configuration">
242 <title>Configuring dbus</title>
243
244 <sect3 id="dbus-config">
245 <title>Config Files</title>
246
247 <para>
248 <filename>/etc/dbus-1/session.conf</filename>,
249 <filename>/etc/dbus-1/system.conf</filename> and
250 <filename>/etc/dbus-1/system.d/*</filename>
251 </para>
252
253 <indexterm zone="dbus dbus-config">
254 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
255 </indexterm>
256
257 <indexterm zone="dbus dbus-config">
258 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
259 </indexterm>
260
261 <indexterm zone="dbus dbus-config">
262 <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
263 </indexterm>
264
265 </sect3>
266
267 <sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
268 <title>Configuration Information</title>
269
270 <para>
271 The configuration files listed above should probably not be
272 modified. If changes are required, you should create
273 <filename>/etc/dbus-1/session-local.conf</filename> and/or
274 <filename>/etc/dbus-1/system-local.conf</filename> and make any
275 desired changes to these files.
276 </para>
277
278 <para>
279 If any packages install a
280 <application>D-Bus</application> <filename>.service</filename>
281 file outside of the standard <filename
282 class="directory">/usr/share/dbus-1/services</filename> directory,
283 that directory should be added to the local session configuration.
284 For instance, <filename
285 class="directory">/usr/local/share/dbus-1/services</filename> can
286 be added by performing the following commands as the
287 <systemitem class="username">root</systemitem> user:
288 </para>
289
290<screen role="root"><userinput>cat &gt; /etc/dbus-1/session-local.conf &lt;&lt; "EOF"
291<literal>&lt;!DOCTYPE busconfig PUBLIC
292 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
293 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
294&lt;busconfig&gt;
295
296 &lt;!-- Search for .service files in /usr/local --&gt;
297 &lt;servicedir&gt;/usr/local/share/dbus-1/services&lt;/servicedir&gt;
298
299&lt;/busconfig&gt;</literal>
300EOF</userinput></screen>
301
302 </sect3>
303
304 <sect3 id="dbus-init">
305 <title>Boot Script</title>
306
307 <para>
308 To automatically start <command>dbus-daemon</command> when the
309 system is rebooted, install the
310 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
311 <xref linkend="bootscripts"/> package.
312 </para>
313
314 <indexterm zone="dbus dbus-init">
315 <primary sortas="f-dbus">dbus</primary>
316 </indexterm>
317
318<screen role="root"><userinput>make install-dbus</userinput></screen>
319
320 <para>
321 Note that this boot script only starts the system-wide
322 <application>D-Bus</application> daemon. Each user requiring access to
323 <application>D-Bus</application> services will also need to run a
324 session daemon as well. There are many methods you can use to start a
325 session daemon using the <command>dbus-launch</command> command. Review
326 the <command>dbus-launch</command> man page for details about the
327 available parameters and options. Here are some suggestions and
328 examples:
329 </para>
330
331 <itemizedlist spacing="compact">
332 <listitem>
333 <para>
334 Add <command>dbus-launch</command> to the line in the
335 <filename>~/.xinitrc</filename> file that starts your graphical
336 desktop environment.
337 </para>
338 </listitem>
339 <listitem>
340 <para>
341 If you use <command>xdm</command> or some other display manager
342 that calls the <filename>~/.xsession</filename> file, you can add
343 <command>dbus-launch</command> to the line in your
344 <filename>~/.xsession</filename> file that starts your graphical
345 desktop environment. The syntax would be similar to the example in
346 the <filename>~/.xinitrc</filename> file.
347 </para>
348 </listitem>
349 <listitem>
350 <para>
351 The examples shown previously use
352 <command>dbus-launch</command> to specify a program to be run. This
353 has the benefit (when also using the
354 <parameter>--exit-with-session</parameter> parameter) of stopping the
355 session daemon when the specified program is stopped. You can also
356 start the session daemon in your system or personal startup scripts
357 by adding the following lines:
358 </para>
359
360<screen><userinput><literal># Start the D-Bus session daemon
361eval `dbus-launch`
362export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
363
364 <para>
365 This method will not stop the session daemon when you exit
366 your shell, therefore you should add the following line to your
367 <filename>~/.bash_logout</filename> file:
368 </para>
369
370<screen><userinput><literal># Kill the D-Bus session daemon
371kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
372 </listitem>
373
374 <listitem>
375 <para>
376 A hint has been written that provides ways to start scripts
377 using the KDM session manager of KDE. The concepts in this hint could
378 possibly be used with other session managers as well. The hint is
379 located at <ulink
380 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
381 </para>
382 </listitem>
383
384 </itemizedlist>
385
386 </sect3>
387
388 </sect2>
389
390 <sect2 role="content">
391 <title>Contents</title>
392
393 <segmentedlist>
394 <segtitle>Installed Programs</segtitle>
395 <segtitle>Installed Library</segtitle>
396 <segtitle>Installed Directories</segtitle>
397
398 <seglistitem>
399 <seg>
400 dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
401 dbus-run-session, dbus-send and dbus-uuidgen
402 </seg>
403 <seg>
404 libdbus-1.so
405 </seg>
406 <seg>
407 /etc/dbus-1,
408 /usr/include/dbus-1.0,
409 /usr/lib/dbus-1.0,
410 /usr/share/dbus-1,
411 /usr/share/doc/dbus-&dbus-version;,
412 /var/lib/dbus and
413 /var/run/dbus
414 </seg>
415 </seglistitem>
416 </segmentedlist>
417
418 <variablelist>
419 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
420 <?dbfo list-presentation="list"?>
421 <?dbhtml list-presentation="table"?>
422
423 <varlistentry id="dbus-cleanup-sockets">
424 <term><command>dbus-cleanup-sockets</command></term>
425 <listitem>
426 <para>
427 is used to clean up leftover sockets in a directory.
428 </para>
429 <indexterm zone="dbus dbus-cleanup-sockets">
430 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
431 </indexterm>
432 </listitem>
433 </varlistentry>
434
435 <varlistentry id="dbus-daemon">
436 <term><command>dbus-daemon</command></term>
437 <listitem>
438 <para>
439 is the <application>D-Bus</application> message bus daemon.
440 </para>
441 <indexterm zone="dbus dbus-daemon">
442 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
443 </indexterm>
444 </listitem>
445 </varlistentry>
446
447 <varlistentry id="dbus-launch">
448 <term><command>dbus-launch</command></term>
449 <listitem>
450 <para>
451 is used to start <command>dbus-daemon</command> from a shell
452 script. It would normally be called from a user's login
453 scripts.
454 </para>
455 <indexterm zone="dbus dbus-launch">
456 <primary sortas="b-dbus-launch">dbus-launch</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="dbus-monitor">
462 <term><command>dbus-monitor</command></term>
463 <listitem>
464 <para>
465 is used to monitor messages going through a
466 <application>D-Bus</application> message bus.
467 </para>
468 <indexterm zone="dbus dbus-monitor">
469 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
474 <varlistentry id="dbus-run-session">
475 <term><command>dbus-run-session</command></term>
476 <listitem>
477 <para>
478 start a process as a new <application>D-Bus</application> session.
479 </para>
480 <indexterm zone="dbus dbus-run-session">
481 <primary sortas="b-dbus-run-session">dbus-run-session</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486 <varlistentry id="dbus-send">
487 <term><command>dbus-send</command></term>
488 <listitem>
489 <para>
490 is used to send a message to a <application>D-Bus</application>
491 message bus.
492 </para>
493 <indexterm zone="dbus dbus-send">
494 <primary sortas="b-dbus-send">dbus-send</primary>
495 </indexterm>
496 </listitem>
497 </varlistentry>
498
499 <varlistentry id="dbus-uuidgen">
500 <term><command>dbus-uuidgen</command></term>
501 <listitem>
502 <para>
503 is used to generate a universally unique ID.
504 </para>
505 <indexterm zone="dbus dbus-uuidgen">
506 <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
507 </indexterm>
508 </listitem>
509 </varlistentry>
510
511 <varlistentry id="libdbus-1">
512 <term><filename class="libraryfile">libdbus-1.so</filename></term>
513 <listitem>
514 <para>
515 contains the API functions used by the
516 <application>D-Bus</application> message daemon.
517 <application>D-Bus</application> is first a library that provides
518 one-to-one communication between any two applications;
519 <command>dbus-daemon</command> is an application that uses this
520 library to implement a message bus daemon.
521 </para>
522 <indexterm zone="dbus libdbus-1">
523 <primary sortas="c-libdbus-1">libdbus-1.so</primary>
524 </indexterm>
525 </listitem>
526 </varlistentry>
527
528 </variablelist>
529
530 </sect2>
531
532</sect1>
533
Note: See TracBrowser for help on using the repository browser.