source: general/sysutils/dbus.xml@ c45cb57

10.0 10.1 11.0 11.1 11.2 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 krejzi/svn lazarus nosym perl-modules plabs/python-mods qt5new systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/soup3 xry111/test-20220226
Last change on this file since c45cb57 was c45cb57, checked in by Randy McMurchy <randy@…>, 16 years ago

Updated to D-BUS-0.62

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6174 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.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/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-version;.tar.gz">
8 <!-- <!ENTITY dbus-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/dbus-&dbus-version;.tar.gz"> -->
9 <!ENTITY dbus-download-ftp " ">
10 <!ENTITY dbus-md5sum "ba7692f63d0e9f1ef06703dff56cb650b">
11 <!ENTITY dbus-size "1.7 MB">
12 <!ENTITY dbus-buildsize "69.4 MB (includes building and installing all docs)">
13 <!ENTITY dbus-time "1.0 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">Optional</bridgehead>
68 <para role="optional"><xref linkend="pkgconfig"/>,
69 <xref linkend="expat"/> or <xref linkend="libxml2"/>,
70 <xref linkend="glib2"/>,
71 <xref linkend="gtk2"/>,
72 <xref linkend="qt"/>,
73 <ulink url="http://www.trolltech.com/products/qt">Qt-4.x.x</ulink>,
74 <xref linkend="x-window-system"/>,
75 <xref linkend="gcc"/> (for the Java compiler and tools),
76 <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">Pyrex</ulink>
77 (requires <xref linkend="python"/>),
78 <ulink url="http://www.mono-project.com/GtkSharp">GtkSharp-1.0.x</ulink>
79 (requires <ulink url="http://go-mono.org">Mono</ulink>),
80 <ulink url="http://go-mono.com/sources-stable/">Monodoc</ulink>,
81 <xref linkend="doxygen"/> (to generate the API documentation), and
82 <ulink url="http://cyberelk.net/tim/xmlto/">xmlto</ulink>
83 (to generate HTML documentation and manuals)</para>
84
85 <para>Listed below are some additional notes about the dependencies</para>
86
87 <itemizedlist spacing="compact">
88 <listitem>
89 <para>Review the information from running
90 <command>./configure --help</command> for the available parameters to
91 pass to the <command>configure</command> script to enable the various
92 dependencies.</para>
93 </listitem>
94 <listitem>
95 <para>To build the <application>Mono</application> bindings, you must
96 have <application>GtkSharp</application> installed. If you wish to use
97 recent versions of <application>GtkSharp</application>, you'll need to
98 make some trivial patches to the <application>D-BUS</application>
99 sources. See <ulink url="http://www.mono-project.com/GtkSharpUpgrade"/>
100 for details.</para>
101 </listitem>
102 <listitem>
103 <para>If you have a recent version of <ulink
104 url="http://go-mono.com/sources-stable/">Monodoc</ulink> installed
105 (&gt;= 1.1.10) and you passed the <option>--enable-mono-docs</option>
106 parameter to <command>configure</command>, the
107 <application>D-BUS</application> build will fail. You can review the
108 parts of this patch (<ulink
109 url="http://www.mail-archive.com/frugalware-darcs@frugalware.org/msg10156.html"/>)
110 that apply to the <application>Monodoc</application> installation, to
111 fix the build problems. Note this is untested by the BLFS Team, but
112 should work just fine.</para>
113 </listitem>
114 </itemizedlist>
115
116 <bridgehead renderas="sect4" id="hal-requirements"
117 xreflabel="HAL Requirements">HAL Requirements</bridgehead>
118
119 <para><xref linkend="glib2"/> must be installed before you begin building
120 <application>D-BUS</application> if you plan on installing
121 <xref linkend="hal"/>. <application>GLib</application> is required to build
122 the <filename class='libraryfile'>libdbus-glib</filename> library, which is
123 required by the <application>HAL</application> daemon.</para>
124
125 <para>If you plan on using <application>HAL</application> with
126 <application>KDE</application>, you'll need to link
127 <application>D-BUS</application> with the <application>Qt</application>
128 libraries. Ensure you've installed <application>Qt</application> before
129 beginning the <application>D-BUS</application> installation.</para>
130
131 <para>If you desire to use the <xref linkend="hal-device-manager"/>
132 program, <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">
133 Pyrex</ulink> must be installed before you begin building
134 <application>D-BUS</application> as the <application>D-BUS</application>
135 <application>Python</application> bindings are required. You will also
136 need to remove the <parameter>--disable-python</parameter> parameter from
137 the <command>configure</command> command in the instructions below.</para>
138
139 <para condition="html" role="usernotes">User Notes:
140 <ulink url="&blfs-wiki;/dbus"/></para>
141
142 </sect2>
143
144 <sect2 role="kernel" id='dbus-kernel'>
145 <title>Kernel Configuration</title>
146
147 <para>Ensure the following option is enabled in the kernel configuration
148 and recompile the kernel if necessary:</para>
149
150<screen><literal>General Setup
151 System V IPC</literal></screen>
152
153 <indexterm zone="dbus dbus-kernel">
154 <primary sortas="d-dbus">dbus</primary>
155 </indexterm>
156
157 </sect2>
158
159 <sect2 role="installation">
160 <title>Installation of D-BUS</title>
161
162 <para>As the <systemitem class="username">root</systemitem> user, create a
163 system user and group to handle the system message bus activity:</para>
164
165<screen role="root"><userinput>groupadd -g 18 messagebus &amp;&amp;
166useradd -c "D-BUS Message Daemon User" -d /dev/null \
167 -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
168
169 <para>Install <application>D-BUS</application> by running the following
170 commands (you may wish to review the output from
171 <command>./configure --help</command> first and add any desired parameters
172 to the <command>configure</command> command shown below):</para>
173
174<screen><userinput>./configure --prefix=/usr \
175 --sysconfdir=/etc \
176 --localstatedir=/var \
177 --disable-python &amp;&amp;
178make</userinput></screen>
179
180 <para>The <option>--enable-doxygen-docs</option> parameter does not work
181 properly. If you have <application>Doxygen</application> installed and you
182 wish to build the API documentation, issue
183 <command>doxygen</command>.</para>
184
185 <para>This package's test suite cannot be run without passing additional
186 parameters to <command>configure</command>. These parameters are not
187 intended to be used in a production build of
188 <application>D-BUS</application> so you will have to build twice (issuing
189 <command>make distclean</command> after the first build) if you
190 want to run the regression tests.</para>
191
192 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
193
194<screen role="root"><userinput>make install &amp;&amp;
195install -v -m755 -d /usr/share/doc/dbus-&dbus-version; &amp;&amp;
196install -v -m644 doc/{TODO,*.{dtd,xml,xsl,html,txt,c}} \
197 /usr/share/doc/dbus-&dbus-version;</userinput></screen>
198
199 <para>If you built the API documentation, install it by issuing the
200 following commands as the <systemitem class="username">root</systemitem> user:</para>
201
202<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/dbus-&dbus-version;/api &amp;&amp;
203install -v -m644 doc/api/html/* \
204 /usr/share/doc/dbus-&dbus-version;/api</userinput></screen>
205
206 </sect2>
207
208 <sect2 role="commands">
209 <title>Command Explanations</title>
210
211 <para><parameter>--localstatedir=/var</parameter>: This parameter causes
212 the daemon PID file to be created in
213 <filename class="directory">/var/run/dbus</filename> instead of
214 <filename class="directory">/usr/var/run/dbus</filename>.</para>
215
216 <para><parameter>--disable-python</parameter>: This parameter is required
217 if <application>Python</application> is not installed. Remove the parameter
218 if <application>Python</application> (and <application>Pyrex</application>)
219 is installed and you wish to build the
220 <application>Python</application> bindings.</para>
221
222 </sect2>
223
224 <sect2 role="configuration">
225 <title>Configuring dbus</title>
226
227 <sect3 id="dbus-config">
228 <title>Config Files</title>
229 <para><filename>/etc/dbus-1/session.conf</filename>,
230 <filename>/etc/dbus-1/system.conf</filename> and
231 <filename>/etc/dbus-1/system.d/*</filename></para>
232
233 <indexterm zone="dbus dbus-config">
234 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
235 </indexterm>
236
237 <indexterm zone="dbus dbus-config">
238 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
239 </indexterm>
240
241 <indexterm zone="dbus dbus-config">
242 <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
243 </indexterm>
244
245 </sect3>
246
247 <sect3><title>Configuration Information</title>
248
249 <para>The configuration files listed above should probably not be
250 modified. If changes are required, you should create
251 <filename>/etc/dbus-1/session-local.conf</filename> and/or
252 <filename>/etc/dbus-1/system-local.conf</filename> and make any
253 desired changes to these files.</para>
254
255 </sect3>
256
257 <sect3 id="dbus-init">
258 <title>Boot Script</title>
259
260 <para>To automatically start <command>dbus-daemon</command> when the
261 system is rebooted, install the
262 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
263 <xref linkend="bootscripts"/> package.</para>
264
265 <indexterm zone="dbus dbus-init">
266 <primary sortas="f-dbus">dbus</primary>
267 </indexterm>
268
269<screen role="root"><userinput>make install-dbus</userinput></screen>
270
271 <para>Note that this boot script only starts the system-wide
272 <application>D-BUS</application> daemon. Each user requiring access to
273 <application>D-BUS</application> services will also need to run a
274 session daemon as well. There are many methods you can use to start a
275 session daemon using the <command>dbus-launch</command> command. Review
276 the <command>dbus-launch</command> man page for details about the
277 available parameters and options. Here are some suggestions and
278 examples:</para>
279
280 <itemizedlist spacing="compact">
281 <listitem>
282 <para>Add <command>dbus-launch</command> to the line in the
283 <filename>~/.xinitrc</filename> file that starts your graphical
284 desktop environment as shown in <xref linkend="gnome-config"/>.</para>
285 </listitem>
286 <listitem>
287 <para>If you use <command>xdm</command> or some other display manager
288 that calls the <filename>~/.xsession</filename> file, you can add
289 <command>dbus-launch</command> to the line in your
290 <filename>~/.xsession</filename> file that starts your graphical
291 desktop environment. The syntax would be similar to the example in
292 the <filename>~/.xinitrc</filename> file.</para>
293 </listitem>
294 <listitem>
295 <para>If you use <command>gdm</command> or some other display manager
296 that utilizes custom files to initiate sessions, use the example in
297 <xref linkend="gdm-config-dbus"/> of the
298 <application>GDM</application> instructions to create a file
299 containing <command>dbus-launch</command>.</para>
300 </listitem>
301 <listitem>
302 <para>The examples shown previously use
303 <command>dbus-launch</command> to specify a program to be run. This
304 has the benefit (when also using the
305 <parameter>--exit-with-session</parameter> parameter) of stopping the
306 session daemon when the specified program is stopped. You can also
307 start the session daemon in your system or personal startup scripts
308 by adding the following lines:</para>
309
310<screen><userinput><literal># Start the D-BUS session daemon
311eval `dbus-launch`
312export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
313
314 <para>This method will not stop the session daemon when you exit
315 your shell, therefore you should add the following line to your
316 <filename>~/.bash_logout</filename> file:</para>
317
318<screen><userinput><literal># Kill the D-BUS session daemon
319kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
320 </listitem>
321
322 <listitem>
323 <para>A hint has been written that provides ways to start scripts
324 using the KDM session manager of KDE. The concepts in this hint could
325 possibly used with other session managers as well. The hint is
326 located at <ulink
327 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
328 </para>
329 </listitem>
330
331 </itemizedlist>
332
333 </sect3>
334
335 </sect2>
336
337 <sect2 role="content">
338 <title>Contents</title>
339
340 <segmentedlist>
341 <segtitle>Installed Programs</segtitle>
342 <segtitle>Installed Libraries</segtitle>
343 <segtitle>Installed Directories</segtitle>
344
345 <seglistitem>
346 <seg>dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch,
347 dbus-monitor, dbus-send and dbus-viewer</seg>
348 <seg>libdbus-1.{so,a} and optionally, dbus-1.jar, libdbus-gcj-1.{so,a},
349 libdbus-glib-1.{so,a}, libdbus-qt-1.{so,a}, libdbus-qt4-1.{so,a},
350 libdbus-mono-1.{so,a} and <application>Python</application>
351 modules</seg>
352 <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
353 /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1,
354 /usr/share/doc/dbus-&dbus-version; and /var/run/dbus</seg>
355 </seglistitem>
356 </segmentedlist>
357
358 <variablelist>
359 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
360 <?dbfo list-presentation="list"?>
361 <?dbhtml list-presentation="table"?>
362
363 <varlistentry id="dbus-binding-tool">
364 <term><command>dbus-binding-tool</command></term>
365 <listitem>
366 <para>is used to create header files from
367 <application>GLib</application> object files.</para>
368 <indexterm zone="dbus dbus-binding-tool">
369 <primary sortas="b-dbus-binding-tool">dbus-binding-tool</primary>
370 </indexterm>
371 </listitem>
372 </varlistentry>
373
374 <varlistentry id="dbus-cleanup-sockets">
375 <term><command>dbus-cleanup-sockets</command></term>
376 <listitem>
377 <para>is used to clean up leftover sockets in a directory.</para>
378 <indexterm zone="dbus dbus-cleanup-sockets">
379 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
380 </indexterm>
381 </listitem>
382 </varlistentry>
383
384 <varlistentry id="dbus-daemon">
385 <term><command>dbus-daemon</command></term>
386 <listitem>
387 <para>is the <application>D-BUS</application> message bus
388 daemon.</para>
389 <indexterm zone="dbus dbus-daemon">
390 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
391 </indexterm>
392 </listitem>
393 </varlistentry>
394
395 <varlistentry id="dbus-launch">
396 <term><command>dbus-launch</command></term>
397 <listitem>
398 <para>is used to start <command>dbus-daemon</command> from a shell
399 script. It would normally be called from a user's login
400 scripts.</para>
401 <indexterm zone="dbus dbus-launch">
402 <primary sortas="b-dbus-launch">dbus-launch</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="dbus-monitor">
408 <term><command>dbus-monitor</command></term>
409 <listitem>
410 <para>is used to monitor messages going through a
411 <application>D-BUS</application> message bus.</para>
412 <indexterm zone="dbus dbus-monitor">
413 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
414 </indexterm>
415 </listitem>
416 </varlistentry>
417
418 <varlistentry id="dbus-send">
419 <term><command>dbus-send</command></term>
420 <listitem>
421 <para>is used to send a message to a <application>D-BUS</application>
422 message bus.</para>
423 <indexterm zone="dbus dbus-send">
424 <primary sortas="b-dbus-send">dbus-send</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="dbus-viewer">
430 <term><command>dbus-viewer</command></term>
431 <listitem>
432 <para>is a graphical <application>D-BUS</application> frontend
433 utility.</para>
434 <indexterm zone="dbus dbus-viewer">
435 <primary sortas="b-dbus-viewer">dbus-viewer</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="libdbus-1">
441 <term><filename class='libraryfile'>libdbus-1.{so,a}</filename></term>
442 <listitem>
443 <para>contains the API functions used by the
444 <application>D-BUS</application> message daemon.
445 <application>D-BUS</application> is first a library that provides
446 one-to-one communication between any two applications;
447 <command>dbus-daemon</command> is an application that uses this
448 library to implement a message bus daemon.</para>
449 <indexterm zone="dbus libdbus-1">
450 <primary sortas="c-libdbus-1">libdbus-1.{so,a}</primary>
451 </indexterm>
452 </listitem>
453 </varlistentry>
454
455 </variablelist>
456
457 </sect2>
458
459</sect1>
Note: See TracBrowser for help on using the repository browser.