source: general/sysutils/dbus.xml@ 8aeb474

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 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 8aeb474 was 394c86f8, checked in by Krejzi <krejzi@…>, 12 years ago

Mark some packages as 7.2 checked. Part 5 - System Utilities.

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

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