source: general/sysutils/dbus.xml@ 7a05cc54

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

Added a note to the D-BUS instructions that you must have Qt installed if you are planning on using HAL with KDE

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

  • Property mode set to 100644
File size: 16.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-md5sum "1addd5b600a8a4550766005d1f59401b">
10 <!ENTITY dbus-size "1.6 MB">
11 <!ENTITY dbus-buildsize "34.6 MB">
12 <!ENTITY dbus-time "0.9 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 <keywordset>
22 <keyword role="package">dbus-&dbus-version;.tar</keyword>
23 <keyword role="ftpdir">dbus</keyword>
24 </keywordset>
25 </sect1info>
26
27 <title>D-BUS-&dbus-version;</title>
28
29 <indexterm zone="dbus">
30 <primary sortas="a-D-BUS">D-BUS</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to D-BUS</title>
35
36 <para><application>D-BUS</application> is a message bus system, a simple
37 way for applications to talk to one another.
38 <application>D-BUS</application> supplies both a system daemon (for events
39 such as <quote>new hardware device added</quote> or <quote>printer queue
40 changed</quote>) and a per-user-login-session daemon (for general IPC needs
41 among user applications). Also, the message bus is built on top of a
42 general one-to-one message passing framework, which can be used by any two
43 applications to communicate directly (without going through the message bus
44 daemon).</para>
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>Download (HTTP): <ulink url="&dbus-download-http;"/></para>
50 </listitem>
51 <listitem>
52 <para>Download (FTP): <ulink url="&dbus-download-ftp;"/></para>
53 </listitem>
54 <listitem>
55 <para>Download MD5 sum: &dbus-md5sum;</para>
56 </listitem>
57 <listitem>
58 <para>Download size: &dbus-size;</para>
59 </listitem>
60 <listitem>
61 <para>Estimated disk space required: &dbus-buildsize;</para>
62 </listitem>
63 <listitem>
64 <para>Estimated build time: &dbus-time;</para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect3">D-BUS Dependencies</bridgehead>
69
70 <bridgehead renderas="sect4">Optional</bridgehead>
71 <para role="optional"><xref linkend="pkgconfig"/>,
72 <xref linkend="expat"/> or <xref linkend="libxml2"/>,
73 <xref linkend="glib2"/>,
74 <xref linkend="gtk2"/>,
75 <xref linkend="qt"/>,
76 <xref linkend="x-window-system"/>,
77 <xref linkend="gcc"/> (for the Java compiler and tools),
78 <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">Pyrex</ulink>
79 (requires <xref linkend="python"/>),
80 <ulink url="http://go-mono.org">Mono</ulink> (and
81 <ulink url="http://www.mono-project.com/GtkSharp">GtkSharp-1.0.x</ulink>),
82 <xref linkend="doxygen"/>, and
83 <ulink url="http://cyberelk.net/tim/xmlto/">xmlto</ulink></para>
84
85 <bridgehead renderas="sect4" id="hal-requirements"
86 xreflabel="HAL Requirements">HAL Requirements</bridgehead>
87
88 <para><xref linkend="glib2"/> must be installed before you begin building
89 <application>D-BUS</application> if you plan on installing
90 <xref linkend="hal"/>. <application>GLib</application> is required to build
91 the <filename class='libraryfile'>libdbus-glib</filename> library, which is
92 required by the <application>HAL</application> daemon.</para>
93
94 <para>If you plan on using <application>HAL</application> with
95 <application>KDE</application>, you'll need to link
96 <application>D-BUS</application> with the <application>Qt</application>
97 libraries. Ensure you've installed <application>Qt</application> before
98 beginning the <application>D-BUS</application> installation.</para>
99
100 <para>If you desire to use the <xref linkend="hal-device-manager"/>
101 program, <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">
102 Pyrex</ulink> must be installed before you begin building
103 <application>D-BUS</application> as the <application>D-BUS</application>
104 <application>Python</application> bindings are required. You will also
105 need to remove the <parameter>--disable-python</parameter> parameter from
106 the <command>configure</command> command in the instructions below.</para>
107
108 <para condition="html" role="usernotes">User Notes:
109 <ulink url="&blfs-wiki;/dbus"/></para>
110
111 </sect2>
112
113 <sect2 role="kernel" id='dbus-kernel'>
114 <title>Kernel Configuration</title>
115
116 <para>Ensure the following option is enabled in the kernel configuration
117 and recompile the kernel if necessary:</para>
118
119<screen><literal>General Setup
120 System V IPC</literal></screen>
121
122 <indexterm zone="dbus dbus-kernel">
123 <primary sortas="d-dbus">dbus</primary>
124 </indexterm>
125
126 </sect2>
127
128 <sect2 role="installation">
129 <title>Installation of D-BUS</title>
130
131 <para>As the <systemitem class="username">root</systemitem> user, create a
132 system user and group to handle the system message bus activity:</para>
133
134<screen role="root"><userinput>groupadd -g 18 messagebus &amp;&amp;
135useradd -c "D-BUS Message Daemon User" -d /dev/null \
136 -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
137
138 <para>Install <application>D-BUS</application> by running the following
139 commands (you may wish to review the output from
140 <command>./configure --help</command> first and add any desired parameters
141 to the <command>configure</command> command shown below):</para>
142
143<screen><userinput>sed -i 's/= jar/= fastjar/' gcj/Makefile.in &amp;&amp;
144./configure --prefix=/usr \
145 --sysconfdir=/etc \
146 --localstatedir=/var \
147 --disable-python &amp;&amp;
148make</userinput></screen>
149
150 <para>This package does not come with a test suite.</para>
151
152 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
153
154<screen role="root"><userinput>make install &amp;&amp;
155install -v -m755 -d /usr/share/doc/dbus-0.50 &amp;&amp;
156install -v -m644 doc/{TODO,*.{dtd,xml,xsl,html,txt,c}} \
157 /usr/share/doc/dbus-0.50</userinput></screen>
158
159 </sect2>
160
161 <sect2 role="commands">
162 <title>Command Explanations</title>
163
164 <para><command>sed -i 's/= jar/= fastjar/' gcj/Makefile.in</command>:
165 The <application>GCC</application>-&gcc-version; compiler installation
166 installs a command named <command>fastjar</command> to create Java
167 <filename class='extension'>.jar</filename> files instead of
168 <command>jar</command>. This <command>sed</command> command changes the
169 <filename>Makefile</filename> to use the appropriate command so the build
170 doesn't fail if you passed the <option>--enable-gcj</option> option to
171 the <command>configure</command> command.</para>
172
173 <para><parameter>--localstatedir=/var</parameter>: This parameter causes
174 the daemon PID file to be created in
175 <filename class="directory">/var/run/dbus</filename> instead of
176 <filename class="directory">/usr/var/run/dbus</filename>.</para>
177
178 <para><parameter>--disable-python</parameter>: This parameter is required
179 if <application>Python</application> is not installed. Remove the parameter
180 if <application>Python</application> (and <application>Pyrex</application>)
181 is installed and you wish to build the
182 <application>Python</application> bindings.</para>
183
184 </sect2>
185
186 <sect2 role="configuration">
187 <title>Configuring dbus</title>
188
189 <sect3 id="dbus-config">
190 <title>Config Files</title>
191 <para><filename>/etc/dbus-1/session.conf</filename>,
192 <filename>/etc/dbus-1/system.conf</filename> and
193 <filename>/etc/system.d/*</filename></para>
194
195 <indexterm zone="dbus dbus-config">
196 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
197 </indexterm>
198
199 <indexterm zone="dbus dbus-config">
200 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
201 </indexterm>
202
203 <indexterm zone="dbus dbus-config">
204 <primary sortas="e-etc-system.d-star">/etc/system.d/*</primary>
205 </indexterm>
206
207 </sect3>
208
209 <sect3><title>Configuration Information</title>
210
211 <para>The configuration files listed above should probably not be
212 modified. If changes are required, you should create
213 <filename>/etc/dbus-1/session-local.conf</filename> and/or
214 <filename>/etc/dbus-1/system-local.conf</filename> and make any
215 desired changes to these files.</para>
216
217 </sect3>
218
219 <sect3 id="dbus-init">
220 <title>Boot Script</title>
221
222 <para>To automatically start <command>dbus-daemon</command> when the
223 system is rebooted, install the
224 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
225 <xref linkend="bootscripts"/> package.</para>
226
227 <indexterm zone="dbus dbus-init">
228 <primary sortas="f-dbus">dbus</primary>
229 </indexterm>
230
231<screen role="root"><userinput>make install-dbus</userinput></screen>
232
233 <para>Note that this boot script only starts the system-wide
234 <application>D-BUS</application> daemon. Each user requiring access to
235 <application>D-BUS</application> services will also need to run a
236 session daemon as well. There are many methods you can use to start a
237 session daemon using the <command>dbus-launch</command> command. Review
238 the <command>dbus-launch</command> man page for details about the
239 available parameters and options. Here are some suggestions and
240 examples:</para>
241
242 <itemizedlist spacing="compact">
243 <listitem>
244 <para>Add <command>dbus-launch</command> to the line in the
245 <filename>~/.xinitrc</filename> file that starts your graphical
246 desktop environment as shown in <xref linkend="gnome-config"/>.</para>
247 </listitem>
248 <listitem>
249 <para>If you use <command>xdm</command> or some other display manager
250 that calls the <filename>~/.xsession</filename> file, you can add
251 <command>dbus-launch</command> to the line in your
252 <filename>~/.xsession</filename> file that starts your graphical
253 desktop environment. The syntax would be similar to the example in
254 the <filename>~/.xinitrc</filename> file.</para>
255 </listitem>
256 <listitem>
257 <para>If you use <command>gdm</command> or some other display manager
258 that utilizes custom files to initiate sessions, use the example in
259 <xref linkend="gdm-config-dbus"/> of the
260 <application>GDM</application> instructions to create a file
261 containing <command>dbus-launch</command>.</para>
262 </listitem>
263 <listitem>
264 <para>The examples shown previously use
265 <command>dbus-launch</command> to specify a program to be run. This
266 has the benefit (when also using the
267 <parameter>--exit-with-session</parameter> parameter) of stopping the
268 session daemon when the specified program is stopped. You can also
269 start the session daemon in your system or personal startup scripts
270 by adding the following lines:</para>
271
272<screen><userinput><literal># Start the D-BUS session daemon
273eval `dbus-launch`
274export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
275
276 <para>This method will not stop the session daemon when you exit
277 your shell, therefore you should add the following line to your
278 <filename>~/.bash_logout</filename> file:</para>
279
280<screen><userinput><literal># Kill the D-BUS session daemon
281kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
282 </listitem>
283
284<!-- Dead link. This hint isn't there.
285 <listitem>
286 <para>If you use <application>Linux-PAM</application>, you can review
287 the <ulink
288 url="&hints-root;/downloads/files/execute-session-scripts-using-pam.txt">
289 Execute Session Scripts Using PAM</ulink> hint to see if it would work
290 for you.</para>
291 </listitem>
292-->
293 </itemizedlist>
294
295 </sect3>
296
297 </sect2>
298
299 <sect2 role="content">
300 <title>Contents</title>
301
302 <segmentedlist>
303 <segtitle>Installed Programs</segtitle>
304 <segtitle>Installed Libraries</segtitle>
305 <segtitle>Installed Directories</segtitle>
306
307 <seglistitem>
308 <seg>dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch,
309 dbus-monitor, dbus-send and dbus-viewer</seg>
310 <seg>libdbus-1.{so,a} and optionally, dbus-1.jar, libdbus-gcj-1.{so,a},
311 libdbus-glib-1.{so,a}, libdbus-qt-1.{so,a} and
312 <application>Python</application> modules</seg>
313 <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
314 /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1,
315 /usr/share/doc/dbus-&dbus-version; and /var/run/dbus</seg>
316 </seglistitem>
317 </segmentedlist>
318
319 <variablelist>
320 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
321 <?dbfo list-presentation="list"?>
322 <?dbhtml list-presentation="table"?>
323
324 <varlistentry id="dbus-binding-tool">
325 <term><command>dbus-binding-tool</command></term>
326 <listitem>
327 <para>is used to create header files from
328 <application>GLib</application> object files.</para>
329 <indexterm zone="dbus dbus-binding-tool">
330 <primary sortas="b-dbus-binding-tool">dbus-binding-tool</primary>
331 </indexterm>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry id="dbus-cleanup-sockets">
336 <term><command>dbus-cleanup-sockets</command></term>
337 <listitem>
338 <para>is used to clean up leftover sockets in a directory.</para>
339 <indexterm zone="dbus dbus-cleanup-sockets">
340 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
341 </indexterm>
342 </listitem>
343 </varlistentry>
344
345 <varlistentry id="dbus-daemon">
346 <term><command>dbus-daemon</command></term>
347 <listitem>
348 <para>is the <application>D-BUS</application> message bus
349 daemon.</para>
350 <indexterm zone="dbus dbus-daemon">
351 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
352 </indexterm>
353 </listitem>
354 </varlistentry>
355
356 <varlistentry id="dbus-launch">
357 <term><command>dbus-launch</command></term>
358 <listitem>
359 <para>is used to start <command>dbus-daemon</command> from a shell
360 script. It would normally be called from a user's login
361 scripts.</para>
362 <indexterm zone="dbus dbus-launch">
363 <primary sortas="b-dbus-launch">dbus-launch</primary>
364 </indexterm>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry id="dbus-monitor">
369 <term><command>dbus-monitor</command></term>
370 <listitem>
371 <para>is used to monitor messages going through a
372 <application>D-BUS</application> message bus.</para>
373 <indexterm zone="dbus dbus-monitor">
374 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
375 </indexterm>
376 </listitem>
377 </varlistentry>
378
379 <varlistentry id="dbus-send">
380 <term><command>dbus-send</command></term>
381 <listitem>
382 <para>is used to send a message to a <application>D-BUS</application>
383 message bus.</para>
384 <indexterm zone="dbus dbus-send">
385 <primary sortas="b-dbus-send">dbus-send</primary>
386 </indexterm>
387 </listitem>
388 </varlistentry>
389
390 <varlistentry id="dbus-viewer">
391 <term><command>dbus-viewer</command></term>
392 <listitem>
393 <para>is a graphical <application>D-BUS</application> frontend
394 utility.</para>
395 <indexterm zone="dbus dbus-viewer">
396 <primary sortas="b-dbus-viewer">dbus-viewer</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="libdbus-1">
402 <term><filename class='libraryfile'>libdbus-1.{so,a}</filename></term>
403 <listitem>
404 <para>contains the API functions used by the
405 <application>D-BUS</application> message daemon.
406 <application>D-BUS</application> is first a library that provides
407 one-to-one communication between any two applications;
408 <command>dbus-daemon</command> is an application that uses this
409 library to implement a message bus daemon.</para>
410 <indexterm zone="dbus libdbus-1">
411 <primary sortas="c-libdbus-1">libdbus-1.{so,a}</primary>
412 </indexterm>
413 </listitem>
414 </varlistentry>
415
416 </variablelist>
417
418 </sect2>
419
420</sect1>
Note: See TracBrowser for help on using the repository browser.