source: general/sysutils/dbus.xml@ 57aa7a28

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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 57aa7a28 was 57aa7a28, checked in by Dan Nichilson <dnicholson@…>, 17 years ago

Added dbus service dir example and changed epiphany to reference it

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

  • Property mode set to 100644
File size: 19.6 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 <para>If any packages install a
256 <application>D-Bus</application> <filename>.service</filename>
257 file outside of the standard <filename
258 class="directory">/usr/share/dbus-1/services</filename> directory,
259 that directory should be added to the local session configuration.
260 For instance, <filename
261 class="directory">/usr/local/share/dbus-1/services</filename> can
262 be added by performing the following commands as the
263 <systemitem class="username">root</systemitem> user:</para>
264
265<screen role="root"><userinput>cat &gt; /etc/dbus-1/session-local.conf &lt;&lt; "EOF"
266<literal>&lt;!DOCTYPE busconfig PUBLIC
267 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
268 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
269&lt;busconfig&gt;
270
271 &lt;!-- Search for .service files in /usr/local --&gt;
272 &lt;servicedir&gt;/usr/local/share/dbus-1/services&lt;/servicedir&gt;
273
274&lt;/busconfig&gt;</literal>
275EOF</userinput></screen>
276
277 </sect3>
278
279 <sect3 id="dbus-init">
280 <title>Boot Script</title>
281
282 <para>To automatically start <command>dbus-daemon</command> when the
283 system is rebooted, install the
284 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
285 <xref linkend="bootscripts"/> package.</para>
286
287 <indexterm zone="dbus dbus-init">
288 <primary sortas="f-dbus">dbus</primary>
289 </indexterm>
290
291<screen role="root"><userinput>make install-dbus</userinput></screen>
292
293 <para>Note that this boot script only starts the system-wide
294 <application>D-BUS</application> daemon. Each user requiring access to
295 <application>D-BUS</application> services will also need to run a
296 session daemon as well. There are many methods you can use to start a
297 session daemon using the <command>dbus-launch</command> command. Review
298 the <command>dbus-launch</command> man page for details about the
299 available parameters and options. Here are some suggestions and
300 examples:</para>
301
302 <itemizedlist spacing="compact">
303 <listitem>
304 <para>Add <command>dbus-launch</command> to the line in the
305 <filename>~/.xinitrc</filename> file that starts your graphical
306 desktop environment as shown in <xref linkend="gnome-config"/>.</para>
307 </listitem>
308 <listitem>
309 <para>If you use <command>xdm</command> or some other display manager
310 that calls the <filename>~/.xsession</filename> file, you can add
311 <command>dbus-launch</command> to the line in your
312 <filename>~/.xsession</filename> file that starts your graphical
313 desktop environment. The syntax would be similar to the example in
314 the <filename>~/.xinitrc</filename> file.</para>
315 </listitem>
316 <listitem>
317 <para>If you use <command>gdm</command> or some other display manager
318 that utilizes custom files to initiate sessions, use the example in
319 <xref linkend="gdm-config-dbus"/> of the
320 <application>GDM</application> instructions to create a file
321 containing <command>dbus-launch</command>.</para>
322 </listitem>
323 <listitem>
324 <para>The examples shown previously use
325 <command>dbus-launch</command> to specify a program to be run. This
326 has the benefit (when also using the
327 <parameter>--exit-with-session</parameter> parameter) of stopping the
328 session daemon when the specified program is stopped. You can also
329 start the session daemon in your system or personal startup scripts
330 by adding the following lines:</para>
331
332<screen><userinput><literal># Start the D-BUS session daemon
333eval `dbus-launch`
334export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
335
336 <para>This method will not stop the session daemon when you exit
337 your shell, therefore you should add the following line to your
338 <filename>~/.bash_logout</filename> file:</para>
339
340<screen><userinput><literal># Kill the D-BUS session daemon
341kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
342 </listitem>
343
344 <listitem>
345 <para>A hint has been written that provides ways to start scripts
346 using the KDM session manager of KDE. The concepts in this hint could
347 possibly used with other session managers as well. The hint is
348 located at <ulink
349 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
350 </para>
351 </listitem>
352
353 </itemizedlist>
354
355 </sect3>
356
357 </sect2>
358
359 <sect2 role="content">
360 <title>Contents</title>
361
362 <segmentedlist>
363 <segtitle>Installed Programs</segtitle>
364 <segtitle>Installed Libraries</segtitle>
365 <segtitle>Installed Directories</segtitle>
366
367 <seglistitem>
368 <seg>dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch,
369 dbus-monitor, dbus-send and dbus-viewer</seg>
370 <seg>libdbus-1.{so,a} and optionally, dbus-1.jar, libdbus-gcj-1.{so,a},
371 libdbus-glib-1.{so,a}, libdbus-qt-1.{so,a}, libdbus-qt4-1.{so,a},
372 libdbus-mono-1.{so,a} and <application>Python</application>
373 modules</seg>
374 <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
375 /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1,
376 /usr/share/doc/dbus-&dbus-version; and /var/run/dbus</seg>
377 </seglistitem>
378 </segmentedlist>
379
380 <variablelist>
381 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
382 <?dbfo list-presentation="list"?>
383 <?dbhtml list-presentation="table"?>
384
385 <varlistentry id="dbus-binding-tool">
386 <term><command>dbus-binding-tool</command></term>
387 <listitem>
388 <para>is used to create header files from
389 <application>GLib</application> object files.</para>
390 <indexterm zone="dbus dbus-binding-tool">
391 <primary sortas="b-dbus-binding-tool">dbus-binding-tool</primary>
392 </indexterm>
393 </listitem>
394 </varlistentry>
395
396 <varlistentry id="dbus-cleanup-sockets">
397 <term><command>dbus-cleanup-sockets</command></term>
398 <listitem>
399 <para>is used to clean up leftover sockets in a directory.</para>
400 <indexterm zone="dbus dbus-cleanup-sockets">
401 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
402 </indexterm>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry id="dbus-daemon">
407 <term><command>dbus-daemon</command></term>
408 <listitem>
409 <para>is the <application>D-BUS</application> message bus
410 daemon.</para>
411 <indexterm zone="dbus dbus-daemon">
412 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
413 </indexterm>
414 </listitem>
415 </varlistentry>
416
417 <varlistentry id="dbus-launch">
418 <term><command>dbus-launch</command></term>
419 <listitem>
420 <para>is used to start <command>dbus-daemon</command> from a shell
421 script. It would normally be called from a user's login
422 scripts.</para>
423 <indexterm zone="dbus dbus-launch">
424 <primary sortas="b-dbus-launch">dbus-launch</primary>
425 </indexterm>
426 </listitem>
427 </varlistentry>
428
429 <varlistentry id="dbus-monitor">
430 <term><command>dbus-monitor</command></term>
431 <listitem>
432 <para>is used to monitor messages going through a
433 <application>D-BUS</application> message bus.</para>
434 <indexterm zone="dbus dbus-monitor">
435 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 <varlistentry id="dbus-send">
441 <term><command>dbus-send</command></term>
442 <listitem>
443 <para>is used to send a message to a <application>D-BUS</application>
444 message bus.</para>
445 <indexterm zone="dbus dbus-send">
446 <primary sortas="b-dbus-send">dbus-send</primary>
447 </indexterm>
448 </listitem>
449 </varlistentry>
450
451 <varlistentry id="dbus-viewer">
452 <term><command>dbus-viewer</command></term>
453 <listitem>
454 <para>is a graphical <application>D-BUS</application> frontend
455 utility.</para>
456 <indexterm zone="dbus dbus-viewer">
457 <primary sortas="b-dbus-viewer">dbus-viewer</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 <varlistentry id="libdbus-1">
463 <term><filename class='libraryfile'>libdbus-1.{so,a}</filename></term>
464 <listitem>
465 <para>contains the API functions used by the
466 <application>D-BUS</application> message daemon.
467 <application>D-BUS</application> is first a library that provides
468 one-to-one communication between any two applications;
469 <command>dbus-daemon</command> is an application that uses this
470 library to implement a message bus daemon.</para>
471 <indexterm zone="dbus libdbus-1">
472 <primary sortas="c-libdbus-1">libdbus-1.{so,a}</primary>
473 </indexterm>
474 </listitem>
475 </varlistentry>
476
477 </variablelist>
478
479 </sect2>
480
481</sect1>
Note: See TracBrowser for help on using the repository browser.