source: general/sysutils/dbus.xml@ e9efab0b

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 e9efab0b was e9efab0b, checked in by Randy McMurchy <randy@…>, 17 years ago

Added an xref id and label to the D-Bus configuration section so that other packages can easily link to the information

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

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