1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>D-Bus FAQ</title><meta name="generator" content="DocBook XSL Stylesheets V1.74.3"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="index"></a>D-Bus FAQ</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Havoc</span> <span class="surname">Pennington</span></h3><div class="affiliation"><span class="orgname">Red Hat, Inc.<br></span><div class="address"><p><br>
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>D-Bus FAQ</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="article" title="D-Bus FAQ"><div class="titlepage"><div><div><h2 class="title"><a name="index"></a>D-Bus FAQ</h2></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Havoc</span> <span class="surname">Pennington</span></h3><div class="affiliation"><span class="orgname">Red Hat, Inc.<br></span><div class="address"><p><br>
2
2
����<code class="email"><<a class="email" href="mailto:hp@pobox.com">hp@pobox.com</a>></code><br>
3
��</p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="othername">A</span> <span class="surname">Wheeler</span></h3></div></div></div><div><p class="releaseinfo">Version 0.3</p></div></div><hr></div><div class="qandaset"><dl><dt>1. <a href="#id2948247">
3
��</p></div></div></div><div class="author"><h3 class="author"><span class="firstname">David</span> <span class="othername">A</span> <span class="surname">Wheeler</span></h3></div></div></div><div><p class="releaseinfo">Version 0.3</p></div></div><hr></div><div class="qandaset" title="Frequently Asked Questions"><a name="faq"></a><dl><dt>1. <a href="#id319467">
5
</a></dt><dt>2. <a href="#id2948284">
5
</a></dt><dt>2. <a href="#id322828">
6
6
Is D-Bus stable/finished?
7
</a></dt><dt>3. <a href="#id2982134">
7
</a></dt><dt>3. <a href="#id322854">
8
8
How is the reference implementation licensed? Can I use it in
9
9
proprietary applications?
10
</a></dt><dt>4. <a href="#id2942814">
10
</a></dt><dt>4. <a href="#id319923">
11
11
What is the difference between a bus name, and object path,
13
13
</a></dt><dt>5. <a href="#service">
39
39
How does D-Bus differ from [yet more IPC mechanisms]?
40
40
</a></dt><dt>18. <a href="#which-ipc">
41
41
Which IPC mechanism should I use?
42
</a></dt><dt>19. <a href="#id2991686">
42
</a></dt><dt>19. <a href="#id359012">
43
43
How can I submit a bug or patch?
44
</a></dt></dl><table border="0" summary="Q and A Set"><col align="left" width="1%"><tbody><tr class="question"><td align="left" valign="top"><a name="id2948247"></a><a name="id2948249"></a><p><b>1.</b></p></td><td align="left" valign="top"><p>
44
</a></dt></dl><table border="0" width="100%" summary="Q and A Set"><col align="left" width="1%"><col><tbody><tr class="question" title="1."><td align="left" valign="top"><a name="id319467"></a><a name="id322798"></a><p><b>1.</b></p></td><td align="left" valign="top"><p>
46
46
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
47
47
This is probably best answered by reading the D-Bus <a class="ulink" href="dbus-tutorial.html" target="_top">tutorial</a> or
52
52
Phrased differently, D-Bus is 1) an interprocess communication (IPC) system and 2) some higher-level
53
53
structure (lifecycle tracking, service activation, security policy) provided by two bus daemons,
54
54
one systemwide and one per-user-session.
55
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2948284"></a><a name="id2948287"></a><p><b>2.</b></p></td><td align="left" valign="top"><p>
55
</p></td></tr><tr class="question" title="2."><td align="left" valign="top"><a name="id322828"></a><a name="id322830"></a><p><b>2.</b></p></td><td align="left" valign="top"><p>
56
56
Is D-Bus stable/finished?
57
57
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
58
58
The low-level library "libdbus" and the protocol specification are considered
62
62
have their own release schedules and degree of maturity, not linked to
63
63
the low-level library and bus daemon release. Check the project page for
64
64
the binding you're considering to understand that project's policies.
65
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2982134"></a><a name="id2982137"></a><p><b>3.</b></p></td><td align="left" valign="top"><p>
65
</p></td></tr><tr class="question" title="3."><td align="left" valign="top"><a name="id322854"></a><a name="id322856"></a><p><b>3.</b></p></td><td align="left" valign="top"><p>
66
66
How is the reference implementation licensed? Can I use it in
67
67
proprietary applications?
68
68
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
77
77
use D-Bus</em></span>. If you're going to sue, you have to stop using
78
78
the software. Read the licenses to determine their meaning, this FAQ
79
79
entry is not intended to change the meaning or terms of the licenses.
80
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2942814"></a><a name="id2942816"></a><p><b>4.</b></p></td><td align="left" valign="top"><p>
80
</p></td></tr><tr class="question" title="4."><td align="left" valign="top"><a name="id319923"></a><a name="id319925"></a><p><b>4.</b></p></td><td align="left" valign="top"><p>
81
81
What is the difference between a bus name, and object path,
83
83
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
107
107
interfaces, such as <code class="literal">org.freedesktop.DBus.Introspectable</code>,
108
108
<code class="literal">org.freedesktop.BasicTextField</code>,
109
109
<code class="literal">org.kde.RichTextDocument</code>.
110
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="service"></a><a name="id2942922"></a><p><b>5.</b></p></td><td align="left" valign="top"><p>
110
</p></td></tr><tr class="question" title="5."><td align="left" valign="top"><a name="service"></a><a name="id320018"></a><p><b>5.</b></p></td><td align="left" valign="top"><p>
111
111
What is a "service"?
112
112
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
113
113
A service is a program that can be launched by the bus daemon
120
120
In the D-Bus docs we try to use "service" only when talking about
121
121
programs the bus knows how to launch, i.e. a service always has a
123
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="components"></a><a name="id2942954"></a><p><b>6.</b></p></td><td align="left" valign="top"><p>
123
</p></td></tr><tr class="question" title="6."><td align="left" valign="top"><a name="components"></a><a name="id320045"></a><p><b>6.</b></p></td><td align="left" valign="top"><p>
124
124
Is D-Bus a "component system"?
125
125
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
126
126
It helps to keep these concepts separate in your mind:
127
</p><div class="orderedlist"><ol type="1"><li><p>
127
</p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
128
128
Object/component system
129
</p></li><li class="listitem"><p>
130
130
GUI control/widget embedding interfaces
131
</p></li><li class="listitem"><p>
132
132
Interprocess communication system or wire protocol
133
133
</p></li></ol></div><p>
170
170
from component/object systems, though perhaps a "plugin" tends to be a
171
171
bundle of objects with a user-visible name and can be
172
172
downloaded/packaged as a unit.
173
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="speed"></a><a name="id2947480"></a><p><b>7.</b></p></td><td align="left" valign="top"><p>
173
</p></td></tr><tr class="question" title="7."><td align="left" valign="top"><a name="speed"></a><a name="id319564"></a><p><b>7.</b></p></td><td align="left" valign="top"><p>
174
174
How fast is the D-Bus reference implementation?
175
175
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
176
176
Of course it depends a bit on what you're doing.
198
198
enable asynchronous communication and avoid round trips.
199
199
This is frequently a more important performance issue
201
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="size"></a><a name="id2947540"></a><p><b>8.</b></p></td><td align="left" valign="top"><p>
201
</p></td></tr><tr class="question" title="8."><td align="left" valign="top"><a name="size"></a><a name="id319610"></a><p><b>8.</b></p></td><td align="left" valign="top"><p>
202
202
How large is the D-Bus reference implementation?
203
203
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
204
204
A production build (with assertions, unit tests, and verbose logging
207
207
A much, much smaller implementation would be possible by omitting out
208
208
of memory handling, hardcoding a main loop (or always using blocking
209
209
I/O), skipping validation, and otherwise simplifying things.
210
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="other-ipc"></a><a name="id2947571"></a><p><b>9.</b></p></td><td align="left" valign="top"><p>
210
</p></td></tr><tr class="question" title="9."><td align="left" valign="top"><a name="other-ipc"></a><a name="id358326"></a><p><b>9.</b></p></td><td align="left" valign="top"><p>
211
211
How does D-Bus differ from other interprocess communication
212
212
or networking protocols?
213
213
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
240
240
Note: the D-Bus mailing list subscribers are <span class="emphasis"><em>very much not
241
241
interested</em></span> in debating which IPC system is the One True
242
242
System. So if you want to discuss that, please use another forum.
243
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="corba"></a><a name="id2947661"></a><p><b>10.</b></p></td><td align="left" valign="top"><p>
243
</p></td></tr><tr class="question" title="10."><td align="left" valign="top"><a name="corba"></a><a name="id358398"></a><p><b>10.</b></p></td><td align="left" valign="top"><p>
244
244
How does D-Bus differ from CORBA?
245
245
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
246
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
246
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
248
248
<a class="ulink" href="http://www.omg.org" target="_top">CORBA</a> is designed to support
249
249
object-oriented IPC between objects, automatically marshalling
293
293
On a more trivial note, D-Bus involves substantially fewer acronyms
295
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="xmlrpcsoap"></a><a name="id2942203"></a><p><b>11.</b></p></td><td align="left" valign="top"><p>
295
</p></td></tr><tr class="question" title="11."><td align="left" valign="top"><a name="xmlrpcsoap"></a><a name="id319108"></a><p><b>11.</b></p></td><td align="left" valign="top"><p>
296
296
How does D-Bus differ from XML-RPC and SOAP?
297
297
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
298
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
298
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
300
300
In <a class="ulink" href="http://www.w3.org/TR/SOAP/" target="_top">SOAP</a> and <a class="ulink" href="http://www.xmlrpc.com" target="_top">XML-RPC</a>, RPC calls are transformed
301
301
into an XML-based format, then sent over the wire (typically using the
311
311
supports lifecycle tracking of other applications connected
312
312
to the bus. With XML-RPC and SOAP, typically each method call
313
313
exists in isolation and has its own HTTP connection.
314
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="dce"></a><a name="id2942264"></a><p><b>12.</b></p></td><td align="left" valign="top"><p>
314
</p></td></tr><tr class="question" title="12."><td align="left" valign="top"><a name="dce"></a><a name="id358723"></a><p><b>12.</b></p></td><td align="left" valign="top"><p>
315
315
How does D-Bus differ from DCE?
316
316
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
317
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
317
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
319
319
<a class="ulink" href="http://www.opengroup.org/dce/" target="_top">Distributed Computing
320
320
Environment (DCE)</a> is an industry-standard vendor-neutral
324
324
a distributed time service. As the name implies, DCE is intended for
325
325
use in a large, multi-computer distributed application. D-Bus would
326
326
not be well-suited for this.
327
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="dcom"></a><a name="id2943326"></a><p><b>13.</b></p></td><td align="left" valign="top"><p>
327
</p></td></tr><tr class="question" title="13."><td align="left" valign="top"><a name="dcom"></a><a name="id358763"></a><p><b>13.</b></p></td><td align="left" valign="top"><p>
328
328
How does D-Bus differ from DCOM and COM?
329
329
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
330
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
330
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
332
332
Comparing D-Bus to COM is apples and oranges;
333
see <a class="xref" href="#components" title="Question">Q:�6</a>.
333
see <a class="xref" href="#components" title="6.">Q:�6</a>.
335
335
DCOM (distributed COM) is a Windows IPC system designed for use with
336
336
the COM object system. It's similar in some ways to DCE and CORBA.
337
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="internet-communications-engine"></a><a name="id2943371"></a><p><b>14.</b></p></td><td align="left" valign="top"><p>
337
</p></td></tr><tr class="question" title="14."><td align="left" valign="top"><a name="internet-communications-engine"></a><a name="id358799"></a><p><b>14.</b></p></td><td align="left" valign="top"><p>
338
338
How does D-Bus differ from ZeroC's Internet Communications Engine (Ice)
339
339
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
340
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
340
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
342
342
The <a class="ulink" href="http://www.zeroc.com/ice.html" target="_top"> Internet
343
343
Communications Engine (Ice)</a> is a powerful IPC mechanism more
344
344
on the level of SOAP or CORBA than D-Bus. Ice has a "dual-license"
345
345
business around it; i.e. you can use it under the GPL, or pay for a
346
346
proprietary license.
347
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="inter-client-exchange"></a><a name="id2943411"></a><p><b>15.</b></p></td><td align="left" valign="top"><p>
347
</p></td></tr><tr class="question" title="15."><td align="left" valign="top"><a name="inter-client-exchange"></a><a name="id358832"></a><p><b>15.</b></p></td><td align="left" valign="top"><p>
348
348
How does D-Bus differ from Inter-Client Exchange (ICE)?
349
349
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
350
350
<a class="ulink" href="http://www.x.org/X11R6.8.1/docs/ICE/ice.pdf" target="_top">ICE</a>
362
362
DCOP and XSMP are the only two widely-used applications of ICE,
363
363
and both could in principle be replaced by D-Bus. (Though whether
364
364
GNOME and KDE will bother is an open question.)
365
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="dcop"></a><a name="id2943460"></a><p><b>16.</b></p></td><td align="left" valign="top"><p>
365
</p></td></tr><tr class="question" title="16."><td align="left" valign="top"><a name="dcop"></a><a name="id358871"></a><p><b>16.</b></p></td><td align="left" valign="top"><p>
366
366
How does D-Bus differ from DCOP?
367
367
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
368
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
368
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
370
370
D-Bus is intentionally pretty similar to <a class="ulink" href="http://developer.kde.org/documentation/library/kdeqt/dcop.html" target="_top">DCOP</a>,
371
371
and can be thought of as a "DCOP the next generation" suitable for
389
389
DCOP's implementation to use D-Bus internally (so that GNOME and KDE
390
390
would end up using exactly the same bus). See the KDE mailing list
391
391
archives for some of these discussions.
392
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="yet-more-ipc"></a><a name="id2991587"></a><p><b>17.</b></p></td><td align="left" valign="top"><p>
392
</p></td></tr><tr class="question" title="17."><td align="left" valign="top"><a name="yet-more-ipc"></a><a name="id358929"></a><p><b>17.</b></p></td><td align="left" valign="top"><p>
393
393
How does D-Bus differ from [yet more IPC mechanisms]?
394
394
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
395
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
395
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
397
397
There are countless uses of network sockets in the world. <a class="ulink" href="http://www.mbus.org/" target="_top">MBUS</a>, Sun ONC/RPC, Jabber/XMPP,
398
398
SIP, are some we can think of quickly.
399
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="which-ipc"></a><a name="id2991622"></a><p><b>18.</b></p></td><td align="left" valign="top"><p>
399
</p></td></tr><tr class="question" title="18."><td align="left" valign="top"><a name="which-ipc"></a><a name="id358962"></a><p><b>18.</b></p></td><td align="left" valign="top"><p>
400
400
Which IPC mechanism should I use?
401
401
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
402
Start by reading <a class="xref" href="#other-ipc" title="Question">Q:�9</a>.
402
Start by reading <a class="xref" href="#other-ipc" title="9.">Q:�9</a>.
404
404
If you're writing an Internet or Intranet application, XML-RPC or SOAP
405
405
work for many people. These are standard, available for most
427
427
to search the list archives is probably to use
428
428
an Internet engine such as Google. On Google,
429
429
include "site:freedesktop.org" in your search.
430
</p></td></tr><tr class="question"><td align="left" valign="top"><a name="id2991686"></a><a name="id2991688"></a><p><b>19.</b></p></td><td align="left" valign="top"><p>
430
</p></td></tr><tr class="question" title="19."><td align="left" valign="top"><a name="id359012"></a><a name="id359014"></a><p><b>19.</b></p></td><td align="left" valign="top"><p>
431
431
How can I submit a bug or patch?
432
432
</p></td></tr><tr class="answer"><td align="left" valign="top"></td><td align="left" valign="top"><p>
433
433
The D-Bus <a class="ulink" href="http://dbus.freedesktop.org" target="_top">web site</a>