source: general/sysutils/dbus.xml@ 3565e02

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 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 3565e02 was 3565e02, checked in by Randy McMurchy <randy@…>, 18 years ago

Added notes to start a D-BUS session daemon to the D-BUS, GDM and GNOME Configuration instructions

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

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