source: general/sysutils/dbus.xml@ d0c67cbc

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 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 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 d0c67cbc was d0c67cbc, checked in by Randy McMurchy <randy@…>, 17 years ago

Fixed broken download URL for a known working version of Pyrex in the D-Bus instructions

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

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