source: general/sysutils/dbus.xml@ 482477c

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 482477c was 482477c, checked in by Guy Dalziel <gdalziel@…>, 15 years ago

Updated to Fontconfig-2.7.1.

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

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