[e8e3312d] | 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">
|
---|
[3565e02] | 8 | <!ENTITY dbus-download-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/dbus-&dbus-version;.tar.gz">
|
---|
[e8e3312d] | 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>
|
---|
[56762b82] | 21 | <keywordset>
|
---|
| 22 | <keyword role="package">dbus-&dbus-version;.tar</keyword>
|
---|
| 23 | <keyword role="ftptdir">dbus</keyword>
|
---|
| 24 | </keywordset>
|
---|
[e8e3312d] | 25 | </sect1info>
|
---|
| 26 |
|
---|
| 27 | <title>D-BUS-&dbus-version;</title>
|
---|
| 28 |
|
---|
| 29 | <indexterm zone="dbus">
|
---|
| 30 | <primary sortas="a-D-BUS">D-BUS</primary>
|
---|
| 31 | </indexterm>
|
---|
| 32 |
|
---|
| 33 | <sect2 role="package">
|
---|
| 34 | <title>Introduction to D-BUS</title>
|
---|
| 35 |
|
---|
| 36 | <para><application>D-BUS</application> is a message bus system, a simple
|
---|
| 37 | way for applications to talk to one another.
|
---|
| 38 | <application>D-BUS</application> supplies both a system daemon (for events
|
---|
| 39 | such as <quote>new hardware device added</quote> or <quote>printer queue
|
---|
| 40 | changed</quote>) and a per-user-login-session daemon (for general IPC needs
|
---|
| 41 | among user applications). Also, the message bus is built on top of a
|
---|
| 42 | general one-to-one message passing framework, which can be used by any two
|
---|
| 43 | applications to communicate directly (without going through the message bus
|
---|
| 44 | daemon).</para>
|
---|
| 45 |
|
---|
| 46 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 47 | <itemizedlist spacing="compact">
|
---|
| 48 | <listitem>
|
---|
| 49 | <para>Download (HTTP): <ulink url="&dbus-download-http;"/></para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>Download (FTP): <ulink url="&dbus-download-ftp;"/></para>
|
---|
| 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
| 55 | <para>Download MD5 sum: &dbus-md5sum;</para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>Download size: &dbus-size;</para>
|
---|
| 59 | </listitem>
|
---|
| 60 | <listitem>
|
---|
| 61 | <para>Estimated disk space required: &dbus-buildsize;</para>
|
---|
| 62 | </listitem>
|
---|
| 63 | <listitem>
|
---|
| 64 | <para>Estimated build time: &dbus-time;</para>
|
---|
| 65 | </listitem>
|
---|
| 66 | </itemizedlist>
|
---|
| 67 |
|
---|
| 68 | <bridgehead renderas="sect3">D-BUS Dependencies</bridgehead>
|
---|
| 69 |
|
---|
| 70 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
[56762b82] | 71 | <para role="optional"><xref linkend="pkgconfig"/>,
|
---|
[e8e3312d] | 72 | <xref linkend="expat"/> or <xref linkend="libxml2"/>,
|
---|
| 73 | <xref linkend="glib2"/>,
|
---|
| 74 | <xref linkend="gtk2"/>,
|
---|
| 75 | <xref linkend="qt"/>,
|
---|
| 76 | X (<xref linkend="xorg"/> or <xref linkend="xfree86"/>),
|
---|
| 77 | <xref linkend="gcc"/> (for the Java compiler and tools),
|
---|
[aa5632c] | 78 | <ulink url="http://nz.cosc.canterbury.ac.nz/~greg/python/Pyrex/">Pyrex</ulink>
|
---|
| 79 | (requires <xref linkend="python"/>),
|
---|
| 80 | <ulink url="http://go-mono.org">Mono</ulink> (and
|
---|
| 81 | <ulink url="http://www.mono-project.com/GtkSharp">GtkSharp-1.0.x</ulink>),
|
---|
[e8e3312d] | 82 | <xref linkend="doxygen"/> and
|
---|
| 83 | <ulink url="http://cyberelk.net/tim/xmlto/">xmlto</ulink></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 |
|
---|
[36c03b1] | 108 | <screen role="root"><userinput>groupadd -g 18 messagebus &&
|
---|
[ccc93e7] | 109 | useradd -c "D-BUS Message Daemon User" -d /dev/null \
|
---|
[36c03b1] | 110 | -u 18 -g messagebus -s /bin/false messagebus</userinput></screen>
|
---|
[e8e3312d] | 111 |
|
---|
| 112 | <para>Install <application>D-BUS</application> by running the following
|
---|
| 113 | commands (you may wish to review the output from
|
---|
| 114 | <command>./configure --help</command> first and add any desired parameters
|
---|
| 115 | to the <command>configure</command> command shown below):</para>
|
---|
| 116 |
|
---|
| 117 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 118 | --sysconfdir=/etc \
|
---|
[aa5632c] | 119 | --localstatedir=/var \
|
---|
| 120 | --disable-python &&
|
---|
[e8e3312d] | 121 | make</userinput></screen>
|
---|
| 122 |
|
---|
| 123 | <para>This package does not come with a test suite.</para>
|
---|
| 124 |
|
---|
| 125 | <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
|
---|
| 126 |
|
---|
| 127 | <screen role="root"><userinput>make install &&
|
---|
| 128 | install -v -m755 -d /usr/share/doc/dbus-0.50 &&
|
---|
| 129 | install -v -m644 doc/{TODO,*.{dtd,xml,xsl,html,txt,c}} \
|
---|
| 130 | /usr/share/doc/dbus-0.50</userinput></screen>
|
---|
| 131 |
|
---|
| 132 | </sect2>
|
---|
| 133 |
|
---|
| 134 | <sect2 role="commands">
|
---|
| 135 | <title>Command Explanations</title>
|
---|
| 136 |
|
---|
| 137 | <para><parameter>--localstatedir=/var</parameter>: This parameter causes
|
---|
| 138 | the daemon PID file to be created in
|
---|
| 139 | <filename class="directory">/var/run/dbus</filename> instead of
|
---|
| 140 | <filename class="directory">/usr/var/run/dbus</filename>.</para>
|
---|
| 141 |
|
---|
[aa5632c] | 142 | <para><parameter>--disable-python</parameter>: This parameter is required
|
---|
| 143 | if <application>Python</application> is not installed. Remove the parameter
|
---|
| 144 | if <application>Python</application> (and <application>Pyrex</application>)
|
---|
| 145 | is installed and you wish to build the
|
---|
| 146 | <application>Python</application> bindings.</para>
|
---|
| 147 |
|
---|
[e8e3312d] | 148 | </sect2>
|
---|
| 149 |
|
---|
| 150 | <sect2 role="configuration">
|
---|
| 151 | <title>Configuring dbus</title>
|
---|
| 152 |
|
---|
| 153 | <sect3 id="dbus-config">
|
---|
| 154 | <title>Config Files</title>
|
---|
| 155 | <para><filename>/etc/dbus-1/session.conf</filename>,
|
---|
| 156 | <filename>/etc/dbus-1/system.conf</filename> and
|
---|
| 157 | <filename>/etc/system.d/*</filename></para>
|
---|
| 158 |
|
---|
| 159 | <indexterm zone="dbus dbus-config">
|
---|
| 160 | <primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
|
---|
| 161 | </indexterm>
|
---|
| 162 |
|
---|
| 163 | <indexterm zone="dbus dbus-config">
|
---|
| 164 | <primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
|
---|
| 165 | </indexterm>
|
---|
| 166 |
|
---|
| 167 | <indexterm zone="dbus dbus-config">
|
---|
| 168 | <primary sortas="e-etc-system.d-star">/etc/system.d/*</primary>
|
---|
| 169 | </indexterm>
|
---|
| 170 |
|
---|
| 171 | </sect3>
|
---|
| 172 |
|
---|
| 173 | <sect3><title>Configuration Information</title>
|
---|
| 174 |
|
---|
| 175 | <para>The configuration files listed above should probably not be
|
---|
| 176 | modified. If changes are required, you should create
|
---|
| 177 | <filename>/etc/dbus-1/session-local.conf</filename> and/or
|
---|
[bccbdaea] | 178 | <filename>/etc/dbus-1/system-local.conf</filename> and make any
|
---|
[e8e3312d] | 179 | desired changes to these files.</para>
|
---|
| 180 |
|
---|
| 181 | </sect3>
|
---|
| 182 |
|
---|
| 183 | <sect3 id="dbus-init">
|
---|
| 184 | <title>Boot Script</title>
|
---|
| 185 |
|
---|
| 186 | <para>To automatically start <command>dbus-daemon</command> when the
|
---|
| 187 | system is rebooted, install the
|
---|
| 188 | <filename>/etc/rc.d/init.d/dbus</filename> bootscript from the
|
---|
| 189 | <xref linkend="intro-important-bootscripts"/> package.</para>
|
---|
| 190 |
|
---|
| 191 | <indexterm zone="dbus dbus-init">
|
---|
| 192 | <primary sortas="f-dbus">dbus</primary>
|
---|
| 193 | </indexterm>
|
---|
| 194 |
|
---|
| 195 | <screen role="root"><userinput>make install-dbus</userinput></screen>
|
---|
| 196 |
|
---|
[3565e02] | 197 | <para>Note that this boot script only starts the system-wide
|
---|
| 198 | <application>D-BUS</application> daemon. Each user requiring access to
|
---|
| 199 | <application>D-BUS</application> services will also need to run a
|
---|
| 200 | session daemon as well. There are many methods you can use to start a
|
---|
| 201 | session daemon using the <command>dbus-launch</command> command. Review
|
---|
| 202 | the <command>dbus-launch</command> man page for details about the
|
---|
| 203 | available parameters and options. Here are some suggestions and
|
---|
| 204 | examples:</para>
|
---|
| 205 |
|
---|
| 206 | <itemizedlist spacing="compact">
|
---|
| 207 | <listitem>
|
---|
| 208 | <para>Add <command>dbus-launch</command> to the line in the
|
---|
| 209 | <filename>~/.xinitrc</filename> file that starts your graphical
|
---|
| 210 | desktop environment as shown in <xref linkend="gnome-config"/>.</para>
|
---|
| 211 | </listitem>
|
---|
| 212 | <listitem>
|
---|
| 213 | <para>If you use <command>xdm</command> or some other display manager
|
---|
| 214 | that calls the <filename>~/.xsession</filename> file, you can add
|
---|
| 215 | <command>dbus-launch</command> to the line in your
|
---|
| 216 | <filename>~/.xsession</filename> file that starts your graphical
|
---|
| 217 | desktop environment. The syntax would be similar to the example in
|
---|
| 218 | the <filename>~/.xinitrc</filename> file.</para>
|
---|
| 219 | </listitem>
|
---|
| 220 | <listitem>
|
---|
| 221 | <para>If you use <command>gdm</command> or some other display manager
|
---|
| 222 | that utilizes custom files to initiate sessions, use the example in
|
---|
| 223 | <xref linkend="gdm-config-dbus"/> of the
|
---|
| 224 | <application>GDM</application> instructions to create a file
|
---|
| 225 | containing <command>dbus-launch</command>.</para>
|
---|
| 226 | </listitem>
|
---|
| 227 | <listitem>
|
---|
| 228 | <para>The examples shown previously use
|
---|
| 229 | <command>dbus-launch</command> to specify a program to be run. This
|
---|
| 230 | has the benefit (when also using the
|
---|
| 231 | <parameter>--exit-with-session</parameter> parameter) of stopping the
|
---|
| 232 | session daemon when the specified program is stopped. You can also
|
---|
| 233 | start the session daemon in your system or personal startup scripts
|
---|
| 234 | by adding the following lines:</para>
|
---|
| 235 |
|
---|
| 236 | <screen><userinput><literal># Start the D-BUS session daemon
|
---|
| 237 | eval `dbus-launch`
|
---|
| 238 | export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
|
---|
| 239 |
|
---|
| 240 | <para>This method will not stop the session daemon when you exit
|
---|
| 241 | your shell, therefore you should add the following line to your
|
---|
| 242 | <filename>~/.bash_logout</filename> file:</para>
|
---|
| 243 |
|
---|
| 244 | <screen><userinput><literal># Kill the D-BUS session daemon
|
---|
| 245 | kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
|
---|
[bccbdaea] | 246 | </listitem>
|
---|
[3565e02] | 247 | <listitem>
|
---|
| 248 | <para>If you use <application>Linux-PAM</application>, you can review
|
---|
| 249 | the <ulink
|
---|
| 250 | url="&hints-root;/downloads/files/execute-session-scripts-using-pam.txt">
|
---|
| 251 | Execute Session Scripts Using PAM</ulink> hint to see if it would work
|
---|
| 252 | for you.</para>
|
---|
| 253 | </listitem>
|
---|
| 254 | </itemizedlist>
|
---|
| 255 |
|
---|
[e8e3312d] | 256 | </sect3>
|
---|
| 257 |
|
---|
| 258 | </sect2>
|
---|
| 259 |
|
---|
| 260 | <sect2 role="content">
|
---|
| 261 | <title>Contents</title>
|
---|
| 262 |
|
---|
| 263 | <segmentedlist>
|
---|
| 264 | <segtitle>Installed Programs</segtitle>
|
---|
| 265 | <segtitle>Installed Libraries</segtitle>
|
---|
| 266 | <segtitle>Installed Directories</segtitle>
|
---|
| 267 |
|
---|
| 268 | <seglistitem>
|
---|
| 269 | <seg>dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch,
|
---|
| 270 | dbus-monitor, dbus-send and dbus-viewer</seg>
|
---|
| 271 | <seg>libdbus-1.[so,a] and optionally, dbus-1.jar, libdbus-gcj-1.[so,a],
|
---|
| 272 | libdbus-glib-1.[so,a], libdbus-qt-1.[so,a] and
|
---|
| 273 | <application>Python</application> modules</seg>
|
---|
| 274 | <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
|
---|
| 275 | /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1,
|
---|
| 276 | /usr/share/doc/dbus-&dbus-version; and /var/run/dbus</seg>
|
---|
| 277 | </seglistitem>
|
---|
| 278 | </segmentedlist>
|
---|
| 279 |
|
---|
| 280 | <variablelist>
|
---|
| 281 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 282 | <?dbfo list-presentation="list"?>
|
---|
| 283 | <?dbhtml list-presentation="table"?>
|
---|
| 284 |
|
---|
| 285 | <varlistentry id="dbus-binding-tool">
|
---|
| 286 | <term><command>dbus-binding-tool</command></term>
|
---|
| 287 | <listitem>
|
---|
| 288 | <para>is used to create header files from
|
---|
| 289 | <application>GLib</application> object files.</para>
|
---|
| 290 | <indexterm zone="dbus dbus-binding-tool">
|
---|
| 291 | <primary sortas="b-dbus-binding-tool">dbus-binding-tool</primary>
|
---|
| 292 | </indexterm>
|
---|
| 293 | </listitem>
|
---|
| 294 | </varlistentry>
|
---|
| 295 |
|
---|
| 296 | <varlistentry id="dbus-cleanup-sockets">
|
---|
| 297 | <term><command>dbus-cleanup-sockets</command></term>
|
---|
| 298 | <listitem>
|
---|
| 299 | <para>is used to clean up leftover sockets in a directory.</para>
|
---|
| 300 | <indexterm zone="dbus dbus-cleanup-sockets">
|
---|
| 301 | <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
|
---|
| 302 | </indexterm>
|
---|
| 303 | </listitem>
|
---|
| 304 | </varlistentry>
|
---|
| 305 |
|
---|
| 306 | <varlistentry id="dbus-daemon">
|
---|
| 307 | <term><command>dbus-daemon</command></term>
|
---|
| 308 | <listitem>
|
---|
| 309 | <para>is the <application>D-BUS</application> message bus
|
---|
| 310 | daemon.</para>
|
---|
| 311 | <indexterm zone="dbus dbus-daemon">
|
---|
| 312 | <primary sortas="b-dbus-daemon">dbus-daemon</primary>
|
---|
| 313 | </indexterm>
|
---|
| 314 | </listitem>
|
---|
| 315 | </varlistentry>
|
---|
| 316 |
|
---|
| 317 | <varlistentry id="dbus-launch">
|
---|
| 318 | <term><command>dbus-launch</command></term>
|
---|
| 319 | <listitem>
|
---|
| 320 | <para>is used to start <command>dbus-daemon</command> from a shell
|
---|
| 321 | script. It would normally be called from a user's login
|
---|
| 322 | scripts.</para>
|
---|
| 323 | <indexterm zone="dbus dbus-launch">
|
---|
| 324 | <primary sortas="b-dbus-launch">dbus-launch</primary>
|
---|
| 325 | </indexterm>
|
---|
| 326 | </listitem>
|
---|
| 327 | </varlistentry>
|
---|
| 328 |
|
---|
| 329 | <varlistentry id="dbus-monitor">
|
---|
| 330 | <term><command>dbus-monitor</command></term>
|
---|
| 331 | <listitem>
|
---|
| 332 | <para>is used to monitor messages going through a
|
---|
| 333 | <application>D-BUS</application> message bus.</para>
|
---|
| 334 | <indexterm zone="dbus dbus-monitor">
|
---|
| 335 | <primary sortas="b-dbus-monitor">dbus-monitor</primary>
|
---|
| 336 | </indexterm>
|
---|
| 337 | </listitem>
|
---|
| 338 | </varlistentry>
|
---|
| 339 |
|
---|
| 340 | <varlistentry id="dbus-send">
|
---|
| 341 | <term><command>dbus-send</command></term>
|
---|
| 342 | <listitem>
|
---|
| 343 | <para>is used to send a message to a <application>D-BUS</application>
|
---|
| 344 | message bus.</para>
|
---|
| 345 | <indexterm zone="dbus dbus-send">
|
---|
| 346 | <primary sortas="b-dbus-send">dbus-send</primary>
|
---|
| 347 | </indexterm>
|
---|
| 348 | </listitem>
|
---|
| 349 | </varlistentry>
|
---|
| 350 |
|
---|
| 351 | <varlistentry id="dbus-viewer">
|
---|
| 352 | <term><command>dbus-viewer</command></term>
|
---|
| 353 | <listitem>
|
---|
| 354 | <para>is a graphical <application>D-BUS</application> frontend
|
---|
| 355 | utility.</para>
|
---|
| 356 | <indexterm zone="dbus dbus-viewer">
|
---|
| 357 | <primary sortas="b-dbus-viewer">dbus-viewer</primary>
|
---|
| 358 | </indexterm>
|
---|
| 359 | </listitem>
|
---|
| 360 | </varlistentry>
|
---|
| 361 |
|
---|
| 362 | <varlistentry id="libdbus-1">
|
---|
| 363 | <term><filename class='libraryfile'>libdbus-1.[so,a]</filename></term>
|
---|
| 364 | <listitem>
|
---|
| 365 | <para>contains the API functions used by the
|
---|
| 366 | <application>D-BUS</application> message daemon.
|
---|
| 367 | <application>D-BUS</application> is first a library that provides
|
---|
| 368 | one-to-one communication between any two applications;
|
---|
| 369 | <command>dbus-daemon</command> is an application that uses this
|
---|
| 370 | library to implement a message bus daemon.</para>
|
---|
| 371 | <indexterm zone="dbus libdbus-1">
|
---|
| 372 | <primary sortas="c-libdbus-1">libdbus-1.[so,a]</primary>
|
---|
| 373 | </indexterm>
|
---|
| 374 | </listitem>
|
---|
| 375 | </varlistentry>
|
---|
| 376 |
|
---|
| 377 | </variablelist>
|
---|
| 378 |
|
---|
| 379 | </sect2>
|
---|
| 380 |
|
---|
| 381 | </sect1>
|
---|