source: general/sysutils/dbus.xml@ f7be881

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

Added a sed command to the D-Bus instructions to change a 'jar' command to a 'fastjar' command due to the changes in GCC-4.0.2

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

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