source: general/sysutils/dbus.xml@ 196bfc32

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 196bfc32 was 196bfc32, checked in by Randy McMurchy <randy@…>, 17 years ago

Enabled the D-BUS FTP download URL

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@6504 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-md5sum "ba7692f63d0e9f1ef06703dff56cb650b">
10 <!ENTITY dbus-size "1.7 MB">
11 <!ENTITY dbus-buildsize "69.4 MB (includes building and installing all docs)">
12 <!ENTITY dbus-time "1.0 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><application>D-BUS</application> is a message bus system, a simple
33 way for applications to talk to one another.
34 <application>D-BUS</application> supplies both a system daemon (for events
35 such as <quote>new hardware device added</quote> or <quote>printer queue
36 changed</quote>) and a per-user-login-session daemon (for general IPC needs
37 among user applications). Also, the message bus is built on top of a
38 general one-to-one message passing framework, which can be used by any two
39 applications to communicate directly (without going through the message bus
40 daemon).</para>
41
42 <bridgehead renderas="sect3">Package Information</bridgehead>
43 <itemizedlist spacing="compact">
44 <listitem>
45 <para>Download (HTTP): <ulink url="&dbus-download-http;"/></para>
46 </listitem>
47 <listitem>
48 <para>Download (FTP): <ulink url="&dbus-download-ftp;"/></para>
49 </listitem>
50 <listitem>
51 <para>Download MD5 sum: &dbus-md5sum;</para>
52 </listitem>
53 <listitem>
54 <para>Download size: &dbus-size;</para>
55 </listitem>
56 <listitem>
57 <para>Estimated disk space required: &dbus-buildsize;</para>
58 </listitem>
59 <listitem>
60 <para>Estimated build time: &dbus-time;</para>
61 </listitem>
62 </itemizedlist>
63
64 <bridgehead renderas="sect3">D-BUS Dependencies</bridgehead>
65
66 <bridgehead renderas="sect4">Optional</bridgehead>
67 <para role="optional"><xref linkend="pkgconfig"/>,
68 <xref linkend="expat"/> or <xref linkend="libxml2"/>,
69 <xref linkend="glib2"/>,
70 <xref linkend="gtk2"/>,
71 <xref linkend="qt"/>,
72 <ulink url="http://www.trolltech.com/products/qt">Qt-4.x.x</ulink>,
73 <xref linkend="x-window-system"/>,
74 <xref linkend="gcc"/> (for the Java compiler and tools),
75 <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">Pyrex</ulink>
76 (<ulink url="ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/Pyrex-0.9.4.1.tar.gz">version
77 0.9.4.1</ulink> is known to work and 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> (note the known working version listed in the dependencies)
134 must be installed before you begin building
135 <application>D-BUS</application> as the <application>D-BUS</application>
136 <application>Python</application> bindings are required. You will also
137 need to remove the <parameter>--disable-python</parameter> parameter from
138 the <command>configure</command> command in the instructions below.</para>
139
140 <para condition="html" role="usernotes">User Notes:
141 <ulink url="&blfs-wiki;/dbus"/></para>
142
143 </sect2>
144
145 <sect2 role="kernel" id='dbus-kernel'>
146 <title>Kernel Configuration</title>
147
148 <para>Ensure the following option is enabled in the kernel configuration
149 and recompile the kernel if necessary:</para>
150
151<screen><literal>General Setup
152 System V IPC</literal></screen>
153
154 <indexterm zone="dbus dbus-kernel">
155 <primary sortas="d-dbus">dbus</primary>
156 </indexterm>
157
158 </sect2>
159
160 <sect2 role="installation">
161 <title>Installation of D-BUS</title>
162
163 <para>As the <systemitem class="username">root</systemitem> user, create a
164 system user and group to handle the system message bus activity:</para>
165
166<screen role="root"><userinput>groupadd -g 18 messagebus &amp;&amp;
167useradd -c "D-BUS Message Daemon User" -d /dev/null \
168 -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
169
170 <para>Install <application>D-BUS</application> by running the following
171 commands (you may wish to review the output from
172 <command>./configure --help</command> first and add any desired parameters
173 to the <command>configure</command> command shown below):</para>
174
175<screen><userinput>./configure --prefix=/usr \
176 --sysconfdir=/etc \
177 --localstatedir=/var \
178 --disable-python &amp;&amp;
179make</userinput></screen>
180
181 <para>The <option>--enable-doxygen-docs</option> parameter does not work
182 properly. If you have <application>Doxygen</application> installed and you
183 wish to build the API documentation, issue
184 <command>doxygen</command>.</para>
185
186 <para>This package's test suite cannot be run without passing additional
187 parameters to <command>configure</command>. These parameters are not
188 intended to be used in a production build of
189 <application>D-BUS</application> so you will have to build twice (issuing
190 <command>make distclean</command> after the first build) if you
191 want to run the regression tests.</para>
192
193 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
194
195<screen role="root"><userinput>make install &amp;&amp;
196install -v -m755 -d /usr/share/doc/dbus-&dbus-version; &amp;&amp;
197install -v -m644 doc/{TODO,*.{dtd,xml,xsl,html,txt,c}} \
198 /usr/share/doc/dbus-&dbus-version;</userinput></screen>
199
200 <para>If you built the API documentation, install it by issuing the
201 following commands as the <systemitem class="username">root</systemitem> user:</para>
202
203<screen role="root"><userinput>install -v -m755 -d /usr/share/doc/dbus-&dbus-version;/api &amp;&amp;
204install -v -m644 doc/api/html/* \
205 /usr/share/doc/dbus-&dbus-version;/api</userinput></screen>
206
207 </sect2>
208
209 <sect2 role="commands">
210 <title>Command Explanations</title>
211
212 <para><parameter>--localstatedir=/var</parameter>: This parameter causes
213 the daemon PID file to be created in
214 <filename class="directory">/var/run/dbus</filename> instead of
215 <filename class="directory">/usr/var/run/dbus</filename>.</para>
216
217 <para><parameter>--disable-python</parameter>: This parameter is required
218 if <application>Python</application> is not installed. Remove the parameter
219 if <application>Python</application> (and <application>Pyrex</application>)
220 is installed and you wish to build the
221 <application>Python</application> bindings.</para>
222
223 </sect2>
224
225 <sect2 role="configuration">
226 <title>Configuring dbus</title>
227
228 <sect3 id="dbus-config">
229 <title>Config Files</title>
230 <para><filename>/etc/dbus-1/session.conf</filename>,
231 <filename>/etc/dbus-1/system.conf</filename> and
232 <filename>/etc/dbus-1/system.d/*</filename></para>
233
234 <indexterm zone="dbus dbus-config">
235 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
236 </indexterm>
237
238 <indexterm zone="dbus dbus-config">
239 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
240 </indexterm>
241
242 <indexterm zone="dbus dbus-config">
243 <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
244 </indexterm>
245
246 </sect3>
247
248 <sect3><title>Configuration Information</title>
249
250 <para>The configuration files listed above should probably not be
251 modified. If changes are required, you should create
252 <filename>/etc/dbus-1/session-local.conf</filename> and/or
253 <filename>/etc/dbus-1/system-local.conf</filename> and make any
254 desired changes to these files.</para>
255
256 <para>If any packages install a
257 <application>D-Bus</application> <filename>.service</filename>
258 file outside of the standard <filename
259 class="directory">/usr/share/dbus-1/services</filename> directory,
260 that directory should be added to the local session configuration.
261 For instance, <filename
262 class="directory">/usr/local/share/dbus-1/services</filename> can
263 be added by performing the following commands as the
264 <systemitem class="username">root</systemitem> user:</para>
265
266<screen role="root"><userinput>cat &gt; /etc/dbus-1/session-local.conf &lt;&lt; "EOF"
267<literal>&lt;!DOCTYPE busconfig PUBLIC
268 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
269 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
270&lt;busconfig&gt;
271
272 &lt;!-- Search for .service files in /usr/local --&gt;
273 &lt;servicedir&gt;/usr/local/share/dbus-1/services&lt;/servicedir&gt;
274
275&lt;/busconfig&gt;</literal>
276EOF</userinput></screen>
277
278 </sect3>
279
280 <sect3 id="dbus-init">
281 <title>Boot Script</title>
282
283 <para>To automatically start <command>dbus-daemon</command> when the
284 system is rebooted, install the
285 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
286 <xref linkend="bootscripts"/> package.</para>
287
288 <indexterm zone="dbus dbus-init">
289 <primary sortas="f-dbus">dbus</primary>
290 </indexterm>
291
292<screen role="root"><userinput>make install-dbus</userinput></screen>
293
294 <para>Note that this boot script only starts the system-wide
295 <application>D-BUS</application> daemon. Each user requiring access to
296 <application>D-BUS</application> services will also need to run a
297 session daemon as well. There are many methods you can use to start a
298 session daemon using the <command>dbus-launch</command> command. Review
299 the <command>dbus-launch</command> man page for details about the
300 available parameters and options. Here are some suggestions and
301 examples:</para>
302
303 <itemizedlist spacing="compact">
304 <listitem>
305 <para>Add <command>dbus-launch</command> to the line in the
306 <filename>~/.xinitrc</filename> file that starts your graphical
307 desktop environment as shown in <xref linkend="gnome-config"/>.</para>
308 </listitem>
309 <listitem>
310 <para>If you use <command>xdm</command> or some other display manager
311 that calls the <filename>~/.xsession</filename> file, you can add
312 <command>dbus-launch</command> to the line in your
313 <filename>~/.xsession</filename> file that starts your graphical
314 desktop environment. The syntax would be similar to the example in
315 the <filename>~/.xinitrc</filename> file.</para>
316 </listitem>
317 <listitem>
318 <para>If you use <command>gdm</command> or some other display manager
319 that utilizes custom files to initiate sessions, use the example in
320 <xref linkend="gdm-config-dbus"/> of the
321 <application>GDM</application> instructions to create a file
322 containing <command>dbus-launch</command>.</para>
323 </listitem>
324 <listitem>
325 <para>The examples shown previously use
326 <command>dbus-launch</command> to specify a program to be run. This
327 has the benefit (when also using the
328 <parameter>--exit-with-session</parameter> parameter) of stopping the
329 session daemon when the specified program is stopped. You can also
330 start the session daemon in your system or personal startup scripts
331 by adding the following lines:</para>
332
333<screen><userinput><literal># Start the D-BUS session daemon
334eval `dbus-launch`
335export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
336
337 <para>This method will not stop the session daemon when you exit
338 your shell, therefore you should add the following line to your
339 <filename>~/.bash_logout</filename> file:</para>
340
341<screen><userinput><literal># Kill the D-BUS session daemon
342kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
343 </listitem>
344
345 <listitem>
346 <para>A hint has been written that provides ways to start scripts
347 using the KDM session manager of KDE. The concepts in this hint could
348 possibly used with other session managers as well. The hint is
349 located at <ulink
350 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
351 </para>
352 </listitem>
353
354 </itemizedlist>
355
356 </sect3>
357
358 </sect2>
359
360 <sect2 role="content">
361 <title>Contents</title>
362
363 <segmentedlist>
364 <segtitle>Installed Programs</segtitle>
365 <segtitle>Installed Libraries</segtitle>
366 <segtitle>Installed Directories</segtitle>
367
368 <seglistitem>
369 <seg>dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch,
370 dbus-monitor, dbus-send and dbus-viewer</seg>
371 <seg>libdbus-1.{so,a} and optionally, dbus-1.jar, libdbus-gcj-1.{so,a},
372 libdbus-glib-1.{so,a}, libdbus-qt-1.{so,a}, libdbus-qt4-1.{so,a},
373 libdbus-mono-1.{so,a} and <application>Python</application>
374 modules</seg>
375 <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
376 /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1,
377 /usr/share/doc/dbus-&dbus-version; and /var/run/dbus</seg>
378 </seglistitem>
379 </segmentedlist>
380
381 <variablelist>
382 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
383 <?dbfo list-presentation="list"?>
384 <?dbhtml list-presentation="table"?>
385
386 <varlistentry id="dbus-binding-tool">
387 <term><command>dbus-binding-tool</command></term>
388 <listitem>
389 <para>is used to create header files from
390 <application>GLib</application> object files.</para>
391 <indexterm zone="dbus dbus-binding-tool">
392 <primary sortas="b-dbus-binding-tool">dbus-binding-tool</primary>
393 </indexterm>
394 </listitem>
395 </varlistentry>
396
397 <varlistentry id="dbus-cleanup-sockets">
398 <term><command>dbus-cleanup-sockets</command></term>
399 <listitem>
400 <para>is used to clean up leftover sockets in a directory.</para>
401 <indexterm zone="dbus dbus-cleanup-sockets">
402 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
403 </indexterm>
404 </listitem>
405 </varlistentry>
406
407 <varlistentry id="dbus-daemon">
408 <term><command>dbus-daemon</command></term>
409 <listitem>
410 <para>is the <application>D-BUS</application> message bus
411 daemon.</para>
412 <indexterm zone="dbus dbus-daemon">
413 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
414 </indexterm>
415 </listitem>
416 </varlistentry>
417
418 <varlistentry id="dbus-launch">
419 <term><command>dbus-launch</command></term>
420 <listitem>
421 <para>is used to start <command>dbus-daemon</command> from a shell
422 script. It would normally be called from a user's login
423 scripts.</para>
424 <indexterm zone="dbus dbus-launch">
425 <primary sortas="b-dbus-launch">dbus-launch</primary>
426 </indexterm>
427 </listitem>
428 </varlistentry>
429
430 <varlistentry id="dbus-monitor">
431 <term><command>dbus-monitor</command></term>
432 <listitem>
433 <para>is used to monitor messages going through a
434 <application>D-BUS</application> message bus.</para>
435 <indexterm zone="dbus dbus-monitor">
436 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
437 </indexterm>
438 </listitem>
439 </varlistentry>
440
441 <varlistentry id="dbus-send">
442 <term><command>dbus-send</command></term>
443 <listitem>
444 <para>is used to send a message to a <application>D-BUS</application>
445 message bus.</para>
446 <indexterm zone="dbus dbus-send">
447 <primary sortas="b-dbus-send">dbus-send</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
452 <varlistentry id="dbus-viewer">
453 <term><command>dbus-viewer</command></term>
454 <listitem>
455 <para>is a graphical <application>D-BUS</application> frontend
456 utility.</para>
457 <indexterm zone="dbus dbus-viewer">
458 <primary sortas="b-dbus-viewer">dbus-viewer</primary>
459 </indexterm>
460 </listitem>
461 </varlistentry>
462
463 <varlistentry id="libdbus-1">
464 <term><filename class='libraryfile'>libdbus-1.{so,a}</filename></term>
465 <listitem>
466 <para>contains the API functions used by the
467 <application>D-BUS</application> message daemon.
468 <application>D-BUS</application> is first a library that provides
469 one-to-one communication between any two applications;
470 <command>dbus-daemon</command> is an application that uses this
471 library to implement a message bus daemon.</para>
472 <indexterm zone="dbus libdbus-1">
473 <primary sortas="c-libdbus-1">libdbus-1.{so,a}</primary>
474 </indexterm>
475 </listitem>
476 </varlistentry>
477
478 </variablelist>
479
480 </sect2>
481
482</sect1>
Note: See TracBrowser for help on using the repository browser.