source: general/sysutils/dbus.xml@ 108beaf

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

Update to dbus-1.8.10.

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

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