source: general/sysutils/dbus.xml@ 1f93d11

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

Added significant updates to the HAL instructions: updated the dependencies, modified the command that changes the storage device policy, added text and a visual chart to explain the requirements of the hal-device-manager program, added commands to allow for locale specific needs in the storage device policy, and some general text cleanup. Also updated the D-BUS instructions to include text that identifies the needs of the HAL package

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

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