source: general/sysutils/dbus.xml@ bf325a39

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 bf325a39 was bf325a39, checked in by Dan Nichilson <dnicholson@…>, 17 years ago

Updated to dbus-1.0.2 and added dbus-uuidgen to the bootscript

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

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