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