source: general/sysutils/dbus.xml@ b6a2a0e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 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 gimp3 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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b6a2a0e was b6a2a0e, checked in by Bruce Dubbs <bdubbs@…>, 13 years ago

Updated to gobject-introspection-1.29.17

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

  • Property mode set to 100644
File size: 17.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/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-&dbus-version;.tar.gz">
8 <!--<!ENTITY dbus-download-ftp "&gentoo-ftp-repo;/dbus-&dbus-version;.tar.gz">-->
9 <!ENTITY dbus-download-ftp " ">
10 <!ENTITY dbus-md5sum "44a2a10678e7e50460879c3eb4453a65">
11 <!ENTITY dbus-size "1.8 MB">
12 <!ENTITY dbus-buildsize "83 MB">
13 <!ENTITY dbus-time "0.5 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 &lfs70_checked;
44
45 <bridgehead renderas="sect3">Package Information</bridgehead>
46 <itemizedlist spacing="compact">
47 <listitem>
48 <para>Download (HTTP): <ulink url="&dbus-download-http;"/></para>
49 </listitem>
50 <listitem>
51 <para>Download (FTP): <ulink url="&dbus-download-ftp;"/></para>
52 </listitem>
53 <listitem>
54 <para>Download MD5 sum: &dbus-md5sum;</para>
55 </listitem>
56 <listitem>
57 <para>Download size: &dbus-size;</para>
58 </listitem>
59 <listitem>
60 <para>Estimated disk space required: &dbus-buildsize;</para>
61 </listitem>
62 <listitem>
63 <para>Estimated build time: &dbus-time;</para>
64 </listitem>
65 </itemizedlist>
66
67 <bridgehead renderas="sect3">D-BUS Dependencies</bridgehead>
68
69 <bridgehead renderas="sect4">Required</bridgehead>
70 <para role="required">
71 <xref linkend="expat"/> (preferred) or
72 <xref linkend="libxml2"/>
73 </para>
74
75 <bridgehead renderas="sect4">Optional</bridgehead>
76 <para role="optional">
77 <xref linkend="xorg7-lib"/>,
78 <xref linkend="dbus-glib"/> (to run tests), and
79 <xref linkend="doxygen"/> (to generate the API documentation)
80 </para>
81
82 <para>Note that the <command>configure</command> script will look for
83 <xref linkend="xmlto"/> but it does nothing as the XML/HTML documentation is
84 already shipped in the source tree.</para>
85
86 <para condition="html" role="usernotes">User Notes:
87 <ulink url="&blfs-wiki;/dbus"/></para>
88
89 </sect2>
90
91 <sect2 role="kernel" id='dbus-kernel'>
92 <title>Kernel Configuration</title>
93
94 <para>Ensure the following option is enabled in the kernel configuration
95 and recompile the kernel if necessary:</para>
96
97<screen><literal>General Setup
98 System V IPC</literal></screen>
99
100 <indexterm zone="dbus dbus-kernel">
101 <primary sortas="d-dbus">dbus</primary>
102 </indexterm>
103
104 </sect2>
105
106 <sect2 role="installation">
107 <title>Installation of D-BUS</title>
108
109 <para>As the <systemitem class="username">root</systemitem> user, create a
110 system user and group to handle the system message bus activity:</para>
111
112<screen role="root"><userinput>groupadd -g 18 messagebus &amp;&amp;
113useradd -c "D-BUS Message Daemon User" -d /dev/null \
114 -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
115
116 <para>Install <application>D-BUS</application> by running the following
117 commands (you may wish to review the output from
118 <command>./configure --help</command> first and add any desired parameters
119 to the <command>configure</command> command shown below):</para>
120
121<screen><userinput>./configure --prefix=/usr \
122 --sysconfdir=/etc \
123 --libexecdir=/usr/lib/dbus-1.0 \
124 --localstatedir=/var &amp;&amp;
125make</userinput></screen>
126
127<!--
128 <para>The <option>- -enable-doxygen-docs</option> parameter does not work
129 properly. If you have <application>Doxygen</application> installed and you
130 wish to build the API documentation, issue
131 <command>doxygen</command>.</para>
132-->
133 <para>See below for test instructions.</para>
134
135 <para>Now, as the <systemitem class="username">root</systemitem>
136 user:</para>
137
138<screen role="root"><userinput>make install &amp;&amp;
139mv -v /usr/share/doc/dbus /usr/share/doc/dbus-&dbus-version;</userinput></screen>
140
141 <para>The dbus tests cannot be run until after <xref linkend="dbus-glib"/>
142 has been installed. The tests require passing additional parameters to
143 <command>configure</command> and exposing additional functionality in the
144 binaries. These interfaces are not intended to be used in a production
145 build of <application>D-BUS</application>. If you would like to run the
146 unit tests, issue the following commands:</para>
147
148
149<screen><userinput>make distclean &amp;&amp;
150./configure --enable-tests --enable-asserts &amp;&amp;
151make &amp;&amp;
152make check &amp;&amp;
153make distclean</userinput></screen>
154
155 <para>Note there has been a report that the tests may fail if running
156 inside a Midnight Commander shell.</para>
157
158 </sect2>
159
160 <sect2 role="commands">
161 <title>Command Explanations</title>
162
163 <para><parameter>--libexecdir=/usr/lib/dbus-1.0 </parameter>: This will
164 install binaries meant to be only used internally by
165 <application>D-BUS</application>, and the directory
166 <filename class="directory">dbus-1</filename> into
167 <filename class="directory">/usr/lib/dbus-1.0</filename> instead of
168 into <filename class="directory">/usr/libexec</filename>.</para>
169
170 <para><parameter>--localstatedir=/var</parameter>: This parameter causes
171 the daemon PID file, system bus socket and machine uuid file to be
172 created in the <filename class="directory">/var</filename> directory
173 instead of the <filename class="directory">/usr/var</filename>
174 directory.</para>
175
176 <para><parameter>--enable-tests</parameter>: Build extra parts of the code
177 to support testing. Configure will end with a NOTE warning about this.</para>
178
179 <para><parameter>--enable-asserts</parameter>: Enable debugging code to run
180 assertions for statements normally assumed to be true. This prevents a
181 warning that '<parameter>--enable-tests</parameter>' on its own is only useful
182 for profiling and might not give true results for all tests, but adds its own
183 NOTE that this should not be used in a production build.
184 </para>
185
186 <para><parameter>--disable-static</parameter>: Prevent the static libraries
187 being built and installed.</para>
188
189 </sect2>
190
191 <sect2 role="configuration">
192 <title>Configuring dbus</title>
193
194 <sect3 id="dbus-config">
195 <title>Config Files</title>
196 <para><filename>/etc/dbus-1/session.conf</filename>,
197 <filename>/etc/dbus-1/system.conf</filename> and
198 <filename>/etc/dbus-1/system.d/*</filename></para>
199
200 <indexterm zone="dbus dbus-config">
201 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
202 </indexterm>
203
204 <indexterm zone="dbus dbus-config">
205 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
206 </indexterm>
207
208 <indexterm zone="dbus dbus-config">
209 <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
210 </indexterm>
211
212 </sect3>
213
214 <sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
215 <title>Configuration Information</title>
216
217 <para>The configuration files listed above should probably not be
218 modified. If changes are required, you should create
219 <filename>/etc/dbus-1/session-local.conf</filename> and/or
220 <filename>/etc/dbus-1/system-local.conf</filename> and make any
221 desired changes to these files.</para>
222
223 <para>If any packages install a
224 <application>D-Bus</application> <filename>.service</filename>
225 file outside of the standard <filename
226 class="directory">/usr/share/dbus-1/services</filename> directory,
227 that directory should be added to the local session configuration.
228 For instance, <filename
229 class="directory">/usr/local/share/dbus-1/services</filename> can
230 be added by performing the following commands as the
231 <systemitem class="username">root</systemitem> user:</para>
232
233<screen role="root"><userinput>cat &gt; /etc/dbus-1/session-local.conf &lt;&lt; "EOF"
234<literal>&lt;!DOCTYPE busconfig PUBLIC
235 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
236 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
237&lt;busconfig&gt;
238
239 &lt;!-- Search for .service files in /usr/local --&gt;
240 &lt;servicedir&gt;/usr/local/share/dbus-1/services&lt;/servicedir&gt;
241
242&lt;/busconfig&gt;</literal>
243EOF</userinput></screen>
244
245 <!-- <para>Many packages will refuse to run if the file
246 <literal>/var/lib/dbus/machine-id</literal> does not exist, and
247 complain that <application>dbus</application> has not been properly
248 installed. To prevent this, run the following command as the
249 <systemitem class="username">root</systemitem> user:</para>
250
251<screen><userinput>dbus-uuidgen - -ensure</userinput></screen>
252
253 <para>This will create a unique identifier for the machine.</para> -->
254
255 </sect3>
256
257 <sect3 id="dbus-init">
258 <title>Boot Script</title>
259
260 <para>To automatically start <command>dbus-daemon</command> when the
261 system is rebooted, install the
262 <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
263 <xref linkend="bootscripts"/> package.</para>
264
265 <indexterm zone="dbus dbus-init">
266 <primary sortas="f-dbus">dbus</primary>
267 </indexterm>
268
269<screen role="root"><userinput>make install-dbus</userinput></screen>
270
271 <para>Note that this boot script only starts the system-wide
272 <application>D-BUS</application> daemon. Each user requiring access to
273 <application>D-BUS</application> services will also need to run a
274 session daemon as well. There are many methods you can use to start a
275 session daemon using the <command>dbus-launch</command> command. Review
276 the <command>dbus-launch</command> man page for details about the
277 available parameters and options. Here are some suggestions and
278 examples:</para>
279
280 <itemizedlist spacing="compact">
281 <listitem>
282 <para>Add <command>dbus-launch</command> to the line in the
283 <filename>~/.xinitrc</filename> file that starts your graphical
284 desktop environment as shown in <xref linkend="gnome-config"/>.</para>
285 </listitem>
286 <listitem>
287 <para>If you use <command>xdm</command> or some other display manager
288 that calls the <filename>~/.xsession</filename> file, you can add
289 <command>dbus-launch</command> to the line in your
290 <filename>~/.xsession</filename> file that starts your graphical
291 desktop environment. The syntax would be similar to the example in
292 the <filename>~/.xinitrc</filename> file.</para>
293 </listitem>
294 <listitem>
295 <para>If you use <command>gdm</command> or some other display manager
296 that utilizes custom files to initiate sessions, use the example in
297 <xref linkend="gdm-config-dbus"/> of the
298 <application>GDM</application> instructions to create a file
299 containing <command>dbus-launch</command>.</para>
300 </listitem>
301 <listitem>
302 <para>The examples shown previously use
303 <command>dbus-launch</command> to specify a program to be run. This
304 has the benefit (when also using the
305 <parameter>--exit-with-session</parameter> parameter) of stopping the
306 session daemon when the specified program is stopped. You can also
307 start the session daemon in your system or personal startup scripts
308 by adding the following lines:</para>
309
310<screen><userinput><literal># Start the D-BUS session daemon
311eval `dbus-launch`
312export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
313
314 <para>This method will not stop the session daemon when you exit
315 your shell, therefore you should add the following line to your
316 <filename>~/.bash_logout</filename> file:</para>
317
318<screen><userinput><literal># Kill the D-BUS session daemon
319kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
320 </listitem>
321
322 <listitem>
323 <para>A hint has been written that provides ways to start scripts
324 using the KDM session manager of KDE. The concepts in this hint could
325 possibly be used with other session managers as well. The hint is
326 located at <ulink
327 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
328 </para>
329 </listitem>
330
331 </itemizedlist>
332
333 </sect3>
334
335 </sect2>
336
337 <sect2 role="content">
338 <title>Contents</title>
339
340 <segmentedlist>
341 <segtitle>Installed Programs</segtitle>
342 <segtitle>Installed Library</segtitle>
343 <segtitle>Installed Directories</segtitle>
344
345 <seglistitem>
346 <seg>dbus-cleanup-sockets, dbus-daemon, dbus-daemon-launch-helper,
347 dbus-launch, dbus-monitor, dbus-send, and dbus-uuidgen</seg>
348 <seg>libdbus-1.{so,a}</seg>
349 <seg>/etc/dbus-1/{session.d,system.d}, /usr/{include/dbus-1.0/dbus,
350 lib/{dbus-1.0/include/dbus,dbus/dbus-1},share/dbus-1/{services,
351 system-services}}, /var/{lib/dbus,run/dbus}</seg>
352 </seglistitem>
353 </segmentedlist>
354
355 <variablelist>
356 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
357 <?dbfo list-presentation="list"?>
358 <?dbhtml list-presentation="table"?>
359
360 <varlistentry id="dbus-cleanup-sockets">
361 <term><command>dbus-cleanup-sockets</command></term>
362 <listitem>
363 <para>is used to clean up leftover sockets in a directory.</para>
364 <indexterm zone="dbus dbus-cleanup-sockets">
365 <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
366 </indexterm>
367 </listitem>
368 </varlistentry>
369
370 <varlistentry id="dbus-daemon">
371 <term><command>dbus-daemon</command></term>
372 <listitem>
373 <para>is the <application>D-BUS</application> message bus
374 daemon.</para>
375 <indexterm zone="dbus dbus-daemon">
376 <primary sortas="b-dbus-daemon">dbus-daemon</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="dbus-launch">
382 <term><command>dbus-launch</command></term>
383 <listitem>
384 <para>is used to start <command>dbus-daemon</command> from a shell
385 script. It would normally be called from a user's login
386 scripts.</para>
387 <indexterm zone="dbus dbus-launch">
388 <primary sortas="b-dbus-launch">dbus-launch</primary>
389 </indexterm>
390 </listitem>
391 </varlistentry>
392
393 <varlistentry id="dbus-monitor">
394 <term><command>dbus-monitor</command></term>
395 <listitem>
396 <para>is used to monitor messages going through a
397 <application>D-BUS</application> message bus.</para>
398 <indexterm zone="dbus dbus-monitor">
399 <primary sortas="b-dbus-monitor">dbus-monitor</primary>
400 </indexterm>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry id="dbus-send">
405 <term><command>dbus-send</command></term>
406 <listitem>
407 <para>is used to send a message to a <application>D-BUS</application>
408 message bus.</para>
409 <indexterm zone="dbus dbus-send">
410 <primary sortas="b-dbus-send">dbus-send</primary>
411 </indexterm>
412 </listitem>
413 </varlistentry>
414
415 <varlistentry id="dbus-uuidgen">
416 <term><command>dbus-uuidgen</command></term>
417 <listitem>
418 <para>is used to generate or read a universally unique ID.</para>
419 <indexterm zone="dbus dbus-uuidgen">
420 <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
421 </indexterm>
422 </listitem>
423 </varlistentry>
424
425 <varlistentry id="libdbus-1">
426 <term><filename class='libraryfile'>libdbus-1.{so,a}</filename></term>
427 <listitem>
428 <para>contains the API functions used by the
429 <application>D-BUS</application> message daemon.
430 <application>D-BUS</application> is first a library that provides
431 one-to-one communication between any two applications;
432 <command>dbus-daemon</command> is an application that uses this
433 library to implement a message bus daemon.</para>
434 <indexterm zone="dbus libdbus-1">
435 <primary sortas="c-libdbus-1">libdbus-1.{so,a}</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
440 </variablelist>
441
442 </sect2>
443
444</sect1>
Note: See TracBrowser for help on using the repository browser.