source: general/sysutils/dbus.xml@ 08de396

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 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 08de396 was 08de396, checked in by Bruce Dubbs <bdubbs@…>, 10 years ago

Synchronize D-Bus with LFS.

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

  • Property mode set to 100644
File size: 12.5 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 " ">
9 <!ENTITY dbus-md5sum "059fbe84e39fc99c67a14f15b1f39dff">
10 <!ENTITY dbus-size "1.8 MB">
11 <!ENTITY dbus-buildsize "86 MB (additional 26 MB installed)">
12 <!ENTITY dbus-time "0.35 SBU (additional 1.3 SBU for tests)">
13]>
14
15<sect1 id="dbus-launch" xreflabel="D-Bus-&dbus-version;/dbus-launch">
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; (dbus-launch)</title>
24
25 <indexterm zone="dbus-launch">
26 <primary sortas="a-dbus-launch">dbus-launch</primary>
27 </indexterm>
28
29 <sect2 role="package">
30 <title>Introduction to D-Bus (with Xorg)</title>
31
32 <para>
33 <application>D-Bus</application> was installed in LFS, but one program
34 needs to be updated after Xorg is installed to properly support
35 window managers.
36 </para>
37
38 <!-- &lfs75_checked; -->
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>
44 Download (HTTP): <ulink url="&dbus-download-http;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download (FTP): <ulink url="&dbus-download-ftp;"/>
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download MD5 sum: &dbus-md5sum;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Download size: &dbus-size;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated disk space required: &dbus-buildsize;
65 </para>
66 </listitem>
67 <listitem>
68 <para>
69 Estimated build time: &dbus-time;
70 </para>
71 </listitem>
72 </itemizedlist>
73
74 <bridgehead renderas="sect3">D-Bus Dependencies</bridgehead>
75
76 <bridgehead renderas="sect4">Required</bridgehead>
77 <para role="required">
78 <xref linkend="xorg7-lib"/>
79 (for <command>dbus-launch</command> program)
80 </para>
81
82 <bridgehead renderas="sect4">Optional</bridgehead>
83 <para role="optional">
84 For the tests:
85 <xref linkend="dbus-glib"/>,
86 <xref linkend="dbus-python"/>, and
87 <xref linkend="pygobject2"/>;
88 for the API documentation:
89 <xref linkend="doxygen"/>;
90 for man pages and XML/HTML documentation:
91 <xref linkend="xmlto"/>
92 </para>
93
94 <para condition="html" role="usernotes">User Notes:
95 <ulink url="&blfs-wiki;/dbus"/>
96 </para>
97 </sect2>
98
99 <sect2 role="installation">
100 <title>Installation of D-Bus</title>
101
102 <para>
103 Build <application>D-Bus</application> by running the following commands:
104 </para>
105
106<screen><userinput>./configure --prefix=/usr \
107 --sysconfdir=/etc \
108 --localstatedir=/var \
109 --with-console-auth-dir=/run/console/ \
110 --disable-static &amp;&amp;
111make</userinput></screen>
112
113 <para>
114 See below for test instructions.
115 </para>
116
117 <para>
118 Now, as the <systemitem class="username">root</systemitem> user:
119 </para>
120
121<screen role="root"><userinput>install -m 755 dbus-launch /usr/bin</userinput></screen>
122
123 <para>
124 If you built the optional documentation, install it as the
125 <systemitem class="username">root</systemitem> user:
126 </para>
127
128<screen role="root"><userinput>cp -a doc/api/{html,xml} /usr/share/doc/dbus-&dbus-version;</userinput></screen>
129
130 <para>
131 The dbus tests cannot be run until after <xref linkend="dbus-glib"/>
132 has been installed. They must be run as an unprivileged user from a
133 local session. Tests fail through ssh. If you want to run only the unit
134 tests, replace, below, <parameter>--enable-tests</parameter> by
135 <parameter>--enable-embedded-tests</parameter>, otherwise,
136 <xref linkend="dbus-python"/> has to be installed, before.
137 The tests require passing additional parameters to
138 <command>configure</command> and exposing additional functionality in
139 the binaries. These interfaces are not intended to be used in a
140 production build of <application>D-Bus</application>. If you would
141 like to run the tests, issue the following commands:
142 </para>
143
144<screen><userinput>make distclean &amp;&amp;
145./configure --enable-tests --enable-asserts &amp;&amp;
146make &amp;&amp;
147make check &amp;&amp;
148make distclean</userinput></screen>
149
150 <para>
151 If <command>run-test.sh</command> fails, it can be disabled with the
152 following sed, before running the commands for the tests:
153 </para>
154
155<screen><userinput>sed -i -e 's:run-test.sh:$(NULL):g' test/name-test/Makefile.in</userinput></screen>
156
157 <note><para>
158 There has been a report that the tests may fail if running
159 inside a Midnight Commander shell.
160 You may get out-of-memory error messages when running the tests.
161 These are normal and can be safely ignored.
162 </para></note>
163
164 </sect2>
165
166 <sect2 role="commands">
167 <title>Command Explanations</title>
168
169 <para>
170 <parameter>--with-console-auth-dir=/run/console/</parameter>: This
171 parameter specifies location of the
172 <application>ConsoleKit</application> auth dir.
173 </para>
174
175 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
176 href="../../xincludes/static-libraries.xml"/>
177
178 <para>
179 <parameter>--enable-tests</parameter>: Build extra parts of the code to
180 support all tests. Configure will end with a NOTE warning about increased
181 size of libraries and decreased security.
182 </para>
183
184 <para>
185 <parameter>--enable-embedded-tests</parameter>: Build extra parts of the
186 code to support only unit tests. Configure will end with a NOTE warning
187 about increased size of libraries and decreased security.
188 </para>
189
190 <para>
191 <parameter>--enable-asserts</parameter>: Enable debugging code to run
192 assertions for statements normally assumed to be true. This prevents a
193 warning that '<parameter>--enable-tests</parameter>' on its own is only
194 useful for profiling and might not give true results for all tests, but
195 adds its own NOTE that this should not be used in a production build.
196 </para>
197
198 </sect2>
199
200 <sect2 role="configuration">
201 <title>Configuring dbus</title>
202
203 <sect3 id="dbus-config">
204 <title>Config Files</title>
205
206 <para>
207 <filename>/etc/dbus-1/session.conf</filename>,
208 <filename>/etc/dbus-1/system.conf</filename> and
209 <filename>/etc/dbus-1/system.d/*</filename>
210 </para>
211
212 <indexterm zone="dbus-launch dbus-config">
213 <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
214 </indexterm>
215
216 <indexterm zone="dbus-launch dbus-config">
217 <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
218 </indexterm>
219
220 <indexterm zone="dbus-launch dbus-config">
221 <primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
222 </indexterm>
223
224 </sect3>
225
226 <sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
227 <title>Configuration Information</title>
228
229 <para>
230 The configuration files listed above should probably not be
231 modified. If changes are required, you should create
232 <filename>/etc/dbus-1/session-local.conf</filename> and/or
233 <filename>/etc/dbus-1/system-local.conf</filename> and make any
234 desired changes to these files.
235 </para>
236
237 <para>
238 If any packages install a
239 <application>D-Bus</application> <filename>.service</filename>
240 file outside of the standard <filename
241 class="directory">/usr/share/dbus-1/services</filename> directory,
242 that directory should be added to the local session configuration.
243 For instance, <filename
244 class="directory">/usr/local/share/dbus-1/services</filename> can
245 be added by performing the following commands as the
246 <systemitem class="username">root</systemitem> user:
247 </para>
248
249<screen role="root"><userinput>cat &gt; /etc/dbus-1/session-local.conf &lt;&lt; "EOF"
250<literal>&lt;!DOCTYPE busconfig PUBLIC
251 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
252 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"&gt;
253&lt;busconfig&gt;
254
255 &lt;!-- Search for .service files in /usr/local --&gt;
256 &lt;servicedir&gt;/usr/local/share/dbus-1/services&lt;/servicedir&gt;
257
258&lt;/busconfig&gt;</literal>
259EOF</userinput></screen>
260
261 </sect3>
262
263 <sect3 id="dbus-init">
264 <title>Starting D-Bus</title>
265
266 <para>
267 There are many methods you can use to start a
268 session daemon using the <command>dbus-launch</command> command. Review
269 the <command>dbus-launch</command> man page for details about the
270 available parameters and options. Here are some suggestions and
271 examples:
272 </para>
273
274 <itemizedlist spacing="compact">
275 <listitem>
276 <para>
277 Add <command>dbus-launch</command> to the line in the
278 <filename>~/.xinitrc</filename> file that starts your graphical
279 desktop environment.
280 </para>
281 </listitem>
282 <listitem>
283 <para>
284 If you use <command>xdm</command> or some other display manager
285 that calls the <filename>~/.xsession</filename> file, you can add
286 <command>dbus-launch</command> to the line in your
287 <filename>~/.xsession</filename> file that starts your graphical
288 desktop environment. The syntax would be similar to the example in
289 the <filename>~/.xinitrc</filename> file.
290 </para>
291 </listitem>
292 <listitem>
293 <para>
294 The examples shown previously use
295 <command>dbus-launch</command> to specify a program to be run. This
296 has the benefit (when also using the
297 <parameter>--exit-with-session</parameter> parameter) of stopping the
298 session daemon when the specified program is stopped. You can also
299 start the session daemon in your system or personal startup scripts
300 by adding the following lines:
301 </para>
302
303<screen><userinput><literal># Start the D-Bus session daemon
304eval `dbus-launch`
305export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
306
307 <para>
308 This method will not stop the session daemon when you exit
309 your shell, therefore you should add the following line to your
310 <filename>~/.bash_logout</filename> file:
311 </para>
312
313<screen><userinput><literal># Kill the D-Bus session daemon
314kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
315 </listitem>
316
317 <listitem>
318 <para>
319 A hint has been written that provides ways to start scripts
320 using the KDM session manager of KDE. The concepts in this hint could
321 possibly be used with other session managers as well. The hint is
322 located at <ulink
323 url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
324 </para>
325 </listitem>
326
327 </itemizedlist>
328
329 </sect3>
330
331 </sect2>
332
333 <sect2 role="content">
334 <title>Contents</title>
335
336 <segmentedlist>
337 <segtitle>Installed Programs</segtitle>
338 <segtitle>Installed Libraries</segtitle>
339 <segtitle>Installed Directories</segtitle>
340
341 <seglistitem>
342 <seg>
343 dbus-launch
344 </seg>
345 <seg>
346 None
347 </seg>
348 <seg>
349 None
350 </seg>
351 </seglistitem>
352 </segmentedlist>
353
354 <variablelist>
355 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
356 <?dbfo list-presentation="list"?>
357 <?dbhtml list-presentation="table"?>
358
359 <varlistentry id="dbus-launch-program">
360 <term><command>dbus-launch</command></term>
361 <listitem>
362 <para>
363 is used to start <command>dbus-daemon</command> from a shell
364 script. It would normally be called from a user's login
365 scripts.
366 </para>
367 <indexterm zone="dbus-launch dbus-launch-program">
368 <primary sortas="b-dbus-launch-program">dbus-launch</primary>
369 </indexterm>
370 </listitem>
371 </varlistentry>
372
373 </variablelist>
374
375 </sect2>
376
377</sect1>
378
Note: See TracBrowser for help on using the repository browser.