source: general/sysutils/dbus.xml@ 1d5d30f8

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 1d5d30f8 was 1d5d30f8, checked in by Guy Dalziel <gdalziel@…>, 15 years ago

Updated to D-Bus-1.2.16.

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

  • Property mode set to 100644
File size: 17.6 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 "&gentoo-ftp-repo;/dbus-&dbus-version;.tar.gz">-->
9 <!ENTITY dbus-download-ftp " ">
10 <!ENTITY dbus-md5sum "c7a47b851ebe02f6726b65b78d1b730b">
11 <!ENTITY dbus-size "1.6 MB">
12 <!ENTITY dbus-buildsize "26 MB (65MB if all API docs and man pages are installed)">
13 <!ENTITY dbus-time "0.4 SBU">
14]>
15
16<sect1 id="dbus" xreflabel="D-BUS-&dbus-version;">
17 <?dbhtml filename="dbus.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 </sect1info>
23
24 <title>D-BUS-&dbus-version;</title>
25
26 <indexterm zone="dbus">
27 <primary sortas="a-D-BUS">D-BUS</primary>
28 </indexterm>
29
30 <sect2 role="package">
31 <title>Introduction to D-BUS</title>
32
33 <para><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).</para>
42
43 <bridgehead renderas="sect3">Package Information</bridgehead>
44 <itemizedlist spacing="compact">
45 <listitem>
46 <para>Download (HTTP): <ulink url="&dbus-download-http;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download (FTP): <ulink url="&dbus-download-ftp;"/></para>
50 </listitem>
51 <listitem>
52 <para>Download MD5 sum: &dbus-md5sum;</para>
53 </listitem>
54 <listitem>
55 <para>Download size: &dbus-size;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated disk space required: &dbus-buildsize;</para>
59 </listitem>
60 <listitem>
61 <para>Estimated build time: &dbus-time;</para>
62 </listitem>
63 </itemizedlist>
64
65 <bridgehead renderas="sect3">D-BUS Dependencies</bridgehead>
66
67 <bridgehead renderas="sect4">Required</bridgehead>
68 <para role="required"><xref linkend="expat"/> (preferred) or <!-- both
69 <xref linkend="pkgconfig"/> and --> <xref linkend="libxml2"/></para>
70
71 <bridgehead renderas="sect4">Optional</bridgehead>
72 <para role="optional"><xref linkend="xorg7-lib"/> and
73 <xref linkend="doxygen"/> (to generate the API documentation)</para>
74
75 <para>Note that the <command>configure</command> script will look for
76 <ulink url="http://cyberelk.net/tim/xmlto/">xmlto</ulink> but it does
77 nothing as the XML/HTML documentation is already shipped in the source
78 tree.</para>
79
80 <para condition="html" role="usernotes">User Notes:
81 <ulink url="&blfs-wiki;/dbus"/></para>
82
83 </sect2>
84
85 <sect2 role="kernel" id='dbus-kernel'>
86 <title>Kernel Configuration</title>
87
88 <para>Ensure the following option is enabled in the kernel configuration
89 and recompile the kernel if necessary:</para>
90
91<screen><literal>General Setup
92 System V IPC</literal></screen>
93
94 <indexterm zone="dbus dbus-kernel">
95 <primary sortas="d-dbus">dbus</primary>
96 </indexterm>
97
98 </sect2>
99
100 <sect2 role="installation">
101 <title>Installation of D-BUS</title>
102
103 <para>As the <systemitem class="username">root</systemitem> user, create a
104 system user and group to handle the system message bus activity:</para>
105
106<screen role="root"><userinput>groupadd -g 18 messagebus &amp;&amp;
107useradd -c "D-BUS Message Daemon User" -d /dev/null \
108 -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
109
110 <para>This package's test suite cannot be run without passing additional
111 parameters to <command>configure</command> and exposing additional
112 functionality in the binaries. These interfaces are not intended to be
113 used in a production build of <application>D-BUS</application>, so it
114 will have to be built twice in this situation. If you would like to run
115 the unit tests, issue the following commands:</para>
116
117<screen><userinput>./configure --enable-tests --enable-asserts &amp;&amp;
118make &amp;&amp;
119make check &amp;&amp;
120make distclean</userinput></screen>
121
122 <para>Note there has been a report that the tests may fail if running
123 inside a Midnight Commander shell.</para>
124
125 <para>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):</para>
129
130<screen><userinput>./configure --prefix=/usr \
131 --sysconfdir=/etc \
132 --libexecdir=/usr/lib/dbus-1.0 \
133 --localstatedir=/var &amp;&amp;
134make</userinput></screen>
135
136 <!-- D-Bus 1.2.16. Doxygen _still_ broken -->
137
138 <para>The <option>--enable-doxygen-docs</option> parameter does not work
139 properly. If you have <application>Doxygen</application> installed and you
140 wish to build the API documentation, issue
141 <command>doxygen</command>.</para>
142
143 <para>Now, as the <systemitem class="username">root</systemitem>
144 user:</para>
145
146<screen role="root"><userinput>make install &amp;&amp;
147install -v -m755 -d /usr/share/doc/dbus-&dbus-version; &amp;&amp;
148install -v -m644 doc/{TODO,*.{dtd,html,xml,xsl,txt,c}} \
149 /usr/share/doc/dbus-&dbus-version;</userinput></screen>
150
151 <para>If you built the API documentation, install it by issuing the
152 following commands as the <systemitem class="username">root</systemitem>
153 user:</para>
154
155<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/dbus-&dbus-version;/api \
156 /usr/share/man/man3dbus &amp;&amp;
157install -v -m644 doc/api/html/* \
158 /usr/share/doc/dbus-&dbus-version;/api &amp;&amp;
159install -v -m644 doc/api/man/man3dbus/* \
160 /usr/share/man/man3dbus</userinput></screen>
161
162 </sect2>
163
164 <sect2 role="commands">
165 <title>Command Explanations</title>
166
167 <para><parameter>--libexecdir=/usr/lib/dbus-1.0 </parameter>: This will
168 install binaries meant to be only used internally by
169 <application>D-BUS</application>, and the directory
170 <filename class="directory">dbus-1</filename> into
171 <filename class="directory">/usr/lib/dbus-1.0</filename> instead of
172 into <filename class="directory">/usr/libexec</filename>.</para>
173
174 <para><parameter>--localstatedir=/var</parameter>: This parameter causes
175 the daemon PID file, system bus socket and machine uuid file to be
176 created in the <filename class="directory">/var</filename> directory
177 instead of the <filename class="directory">/usr/var</filename>
178 directory.</para>
179
180 <para><parameter>--enable-tests</parameter>: Build extra parts of the code
181 to support testing. Configure will end with a NOTE warning about this.</para>
182
183 <para><parameter>--enable-asserts</parameter>: Enable debugging code to run
184 assertions for statements normally assumed to be true. This prevents a
185 warning that '<parameter>--enable-tests</parameter>' on its own is only useful
186 for profiling and might not give true results for all tests, but adds its own
187 NOTE that this should not be used in a production build.
188 </para>
189
190 <para><parameter>--disable-static</parameter>: Prevent the static libraries
191 being built and installed.</para>
192
193 </sect2>
194
195 <sect2 role="configuration">
196 <title>Configuring dbus</title>
197
198 <sect3 id="dbus-config">
199 <title>Config Files</title>
200 <para><filename>/etc/dbus-1/session.conf</filename>,
201 <filename>/etc/dbus-1/system.conf</filename> and
202 <filename>/etc/dbus-1/system.d/*</filename></para>
203
204 <indexterm zone="dbus dbus-config">
205 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
206 </indexterm>
207
208 <indexterm zone="dbus dbus-config">
209 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
210 </indexterm>
211
212 <indexterm zone="dbus dbus-config">
213 <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
214 </indexterm>
215
216 </sect3>
217
218 <sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
219 <title>Configuration Information</title>
220
221 <para>The configuration files listed above should probably not be
222 modified. If changes are required, you should create
223 <filename>/etc/dbus-1/session-local.conf</filename> and/or
224 <filename>/etc/dbus-1/system-local.conf</filename> and make any
225 desired changes to these files.</para>
226
227 <para>If any packages install a
228 <application>D-Bus</application> <filename>.service</filename>
229 file outside of the standard <filename
230 class="directory">/usr/share/dbus-1/services</filename> directory,
231 that directory should be added to the local session configuration.
232 For instance, <filename
233 class="directory">/usr/local/share/dbus-1/services</filename> can
234 be added by performing the following commands as the
235 <systemitem class="username">root</systemitem> user:</para>
236
237<screen role="root"><userinput>cat &gt; /etc/dbus-1/session-local.conf &lt;&lt; "EOF"
238<literal>&lt;!DOCTYPE busconfig PUBLIC
239 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
240 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
241&lt;busconfig&gt;
242
243 &lt;!-- Search for .service files in /usr/local --&gt;
244 &lt;servicedir&gt;/usr/local/share/dbus-1/services&lt;/servicedir&gt;
245
246&lt;/busconfig&gt;</literal>
247EOF</userinput></screen>
248
249 <!-- <para>Many packages will refuse to run if the file
250 <literal>/var/lib/dbus/machine-id</literal> does not exist, and
251 complain that <application>dbus</application> has not been properly
252 installed. To prevent this, run the following command as the
253 <systemitem class="username">root</systemitem> user:</para>
254
255<screen><userinput>dbus-uuidgen - -ensure</userinput></screen>
256
257 <para>This will create a unique identifier for the machine.</para> -->
258
259 </sect3>
260
261 <sect3 id="dbus-init">
262 <title>Boot Script</title>
263
264 <para>To automatically start <command>dbus-daemon</command> when the
265 system is rebooted, install the
266 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
267 <xref linkend="bootscripts"/> package.</para>
268
269 <indexterm zone="dbus dbus-init">
270 <primary sortas="f-dbus">dbus</primary>
271 </indexterm>
272
273<screen role="root"><userinput>make install-dbus</userinput></screen>
274
275 <para>Note that this boot script only starts the system-wide
276 <application>D-BUS</application> daemon. Each user requiring access to
277 <application>D-BUS</application> services will also need to run a
278 session daemon as well. There are many methods you can use to start a
279 session daemon using the <command>dbus-launch</command> command. Review
280 the <command>dbus-launch</command> man page for details about the
281 available parameters and options. Here are some suggestions and
282 examples:</para>
283
284 <itemizedlist spacing="compact">
285 <listitem>
286 <para>Add <command>dbus-launch</command> to the line in the
287 <filename>~/.xinitrc</filename> file that starts your graphical
288 desktop environment as shown in <xref linkend="gnome-config"/>.</para>
289 </listitem>
290 <listitem>
291 <para>If you use <command>xdm</command> or some other display manager
292 that calls the <filename>~/.xsession</filename> file, you can add
293 <command>dbus-launch</command> to the line in your
294 <filename>~/.xsession</filename> file that starts your graphical
295 desktop environment. The syntax would be similar to the example in
296 the <filename>~/.xinitrc</filename> file.</para>
297 </listitem>
298 <listitem>
299 <para>If you use <command>gdm</command> or some other display manager
300 that utilizes custom files to initiate sessions, use the example in
301 <xref linkend="gdm-config-dbus"/> of the
302 <application>GDM</application> instructions to create a file
303 containing <command>dbus-launch</command>.</para>
304 </listitem>
305 <listitem>
306 <para>The examples shown previously use
307 <command>dbus-launch</command> to specify a program to be run. This
308 has the benefit (when also using the
309 <parameter>--exit-with-session</parameter> parameter) of stopping the
310 session daemon when the specified program is stopped. You can also
311 start the session daemon in your system or personal startup scripts
312 by adding the following lines:</para>
313
314<screen><userinput><literal># Start the D-BUS session daemon
315eval `dbus-launch`
316export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
317
318 <para>This method will not stop the session daemon when you exit
319 your shell, therefore you should add the following line to your
320 <filename>~/.bash_logout</filename> file:</para>
321
322<screen><userinput><literal># Kill the D-BUS session daemon
323kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
324 </listitem>
325
326 <listitem>
327 <para>A hint has been written that provides ways to start scripts
328 using the KDM session manager of KDE. The concepts in this hint could
329 possibly used with other session managers as well. The hint is
330 located at <ulink
331 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
332 </para>
333 </listitem>
334
335 </itemizedlist>
336
337 </sect3>
338
339 </sect2>
340
341 <sect2 role="content">
342 <title>Contents</title>
343
344 <segmentedlist>
345 <segtitle>Installed Programs</segtitle>
346 <segtitle>Installed Library</segtitle>
347 <segtitle>Installed Directories</segtitle>
348
349 <seglistitem>
350 <seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
351 dbus-send, dbus-uuidgen</seg>
352 <seg>libdbus-1.{so,a}</seg>
353 <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
354 /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;,
355 /usr/share/man/man3dbus, /var/lib/dbus and /var/run/dbus</seg>
356 </seglistitem>
357 </segmentedlist>
358
359 <variablelist>
360 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
361 <?dbfo list-presentation="list"?>
362 <?dbhtml list-presentation="table"?>
363
364 <varlistentry id="dbus-cleanup-sockets">
365 <term><command>dbus-cleanup-sockets</command></term>
366 <listitem>
367 <para>is used to clean up leftover sockets in a directory.</para>
368 <indexterm zone="dbus dbus-cleanup-sockets">
369 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="dbus-daemon">
375 <term><command>dbus-daemon</command></term>
376 <listitem>
377 <para>is the <application>D-BUS</application> message bus
378 daemon.</para>
379 <indexterm zone="dbus dbus-daemon">
380 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
381 </indexterm>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry id="dbus-launch">
386 <term><command>dbus-launch</command></term>
387 <listitem>
388 <para>is used to start <command>dbus-daemon</command> from a shell
389 script. It would normally be called from a user's login
390 scripts.</para>
391 <indexterm zone="dbus dbus-launch">
392 <primary sortas="b-dbus-launch">dbus-launch</primary>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="dbus-monitor">
398 <term><command>dbus-monitor</command></term>
399 <listitem>
400 <para>is used to monitor messages going through a
401 <application>D-BUS</application> message bus.</para>
402 <indexterm zone="dbus dbus-monitor">
403 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
404 </indexterm>
405 </listitem>
406 </varlistentry>
407
408 <varlistentry id="dbus-send">
409 <term><command>dbus-send</command></term>
410 <listitem>
411 <para>is used to send a message to a <application>D-BUS</application>
412 message bus.</para>
413 <indexterm zone="dbus dbus-send">
414 <primary sortas="b-dbus-send">dbus-send</primary>
415 </indexterm>
416 </listitem>
417 </varlistentry>
418
419 <varlistentry id="dbus-uuidgen">
420 <term><command>dbus-uuidgen</command></term>
421 <listitem>
422 <para>is used to generate or read a universally unique ID.</para>
423 <indexterm zone="dbus dbus-uuidgen">
424 <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="libdbus-1">
430 <term><filename class='libraryfile'>libdbus-1.{so,a}</filename></term>
431 <listitem>
432 <para>contains the API functions used by the
433 <application>D-BUS</application> message daemon.
434 <application>D-BUS</application> is first a library that provides
435 one-to-one communication between any two applications;
436 <command>dbus-daemon</command> is an application that uses this
437 library to implement a message bus daemon.</para>
438 <indexterm zone="dbus libdbus-1">
439 <primary sortas="c-libdbus-1">libdbus-1.{so,a}</primary>
440 </indexterm>
441 </listitem>
442 </varlistentry>
443
444 </variablelist>
445
446 </sect2>
447
448</sect1>
Note: See TracBrowser for help on using the repository browser.