[daemon-fix] Fixed sending daemon match rules for kdbus broadcasts
[platform/upstream/dbus.git] / doc / dbus-send.1.xml.in
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3                    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4 <refentry id='dbussend1'>
5
6 <!--  dbus&bsol;-send manual page.
7  Copyright (C) 2003 Red Hat, Inc. -->
8
9 <refmeta>
10 <refentrytitle>dbus-send</refentrytitle>
11 <manvolnum>1</manvolnum>
12 <refmiscinfo class="manual">User Commands</refmiscinfo>
13 <refmiscinfo class="source">D-Bus</refmiscinfo>
14 <refmiscinfo class="version">@DBUS_VERSION@</refmiscinfo>
15 </refmeta>
16 <refnamediv>
17 <refname>dbus-send</refname>
18 <refpurpose>Send a message to a message bus</refpurpose>
19 </refnamediv>
20 <!-- body begins here -->
21 <refsynopsisdiv id='synopsis'>
22 <cmdsynopsis>
23   <command>dbus-send</command>
24     <group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg><arg choice='plain'>--address=<replaceable>ADDRESS</replaceable></arg></group>
25     <arg choice='opt'>--dest=<replaceable>NAME</replaceable></arg>
26     <arg choice='opt'><arg choice='plain'>--print-reply </arg><arg choice='opt'><replaceable>=literal</replaceable></arg></arg>
27     <arg choice='opt'>--reply-timeout=<replaceable>MSEC</replaceable></arg>
28     <arg choice='opt'>--type=<replaceable>TYPE</replaceable></arg>
29     <arg choice='plain'><replaceable>OBJECT_PATH</replaceable></arg>
30     <arg choice='plain'><replaceable>INTERFACE.MEMBER</replaceable></arg>
31     <arg choice='opt' rep='repeat'><replaceable>CONTENTS</replaceable></arg>
32     <sbr/>
33 </cmdsynopsis>
34 </refsynopsisdiv>
35
36
37 <refsect1 id='description'><title>DESCRIPTION</title>
38 <para>The <command>dbus-send</command> command is used to send a message to a D-Bus message
39 bus. See <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink> for more
40 information about the big picture.</para>
41
42
43 <para>There are two well-known message buses: the systemwide message bus
44 (installed on many systems as the "messagebus" service) and the
45 per-user-login-session message bus (started each time a user logs in).
46 The <option>--system</option> and <option>--session</option> options direct
47 <command>dbus-send</command> to send messages to the system or session buses respectively.
48 If neither is specified, <command>dbus-send</command> sends to the session bus.</para>
49
50
51 <para>Nearly all uses of <command>dbus-send</command> must provide the <option>--dest</option> argument
52 which is the name of a connection on the bus to send the message to. If
53 <option>--dest</option> is omitted, no destination is set.</para>
54
55
56 <para>The object path and the name of the message to send must always be
57 specified. Following arguments, if any, are the message contents
58 (message arguments).  These are given as type-specified values and
59 may include containers (arrays, dicts, and variants) as described below.</para>
60
61 <literallayout remap='.nf'>
62 &lt;contents&gt;   ::= &lt;item&gt; | &lt;container&gt; [ &lt;item&gt; | &lt;container&gt;...]
63 &lt;item&gt;       ::= &lt;type&gt;:&lt;value&gt;
64 &lt;container&gt;  ::= &lt;array&gt; | &lt;dict&gt; | &lt;variant&gt;
65 &lt;array&gt;      ::= array:&lt;type&gt;:&lt;value&gt;[,&lt;value&gt;...]
66 &lt;dict&gt;       ::= dict:&lt;type&gt;:&lt;type&gt;:&lt;key&gt;,&lt;value&gt;[,&lt;key&gt;,&lt;value&gt;...]
67 &lt;variant&gt;    ::= variant:&lt;type&gt;:&lt;value&gt;
68 &lt;type&gt;       ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
69 </literallayout> <!-- .fi -->
70
71 <para>D-Bus supports more types than these, but <command>dbus-send</command> currently
72 does not.  Also, <command>dbus-send</command> does not permit empty containers
73 or nested containers (e.g. arrays of variants).</para>
74
75
76 <para>Here is an example invocation:</para>
77 <literallayout remap='.nf'>
78
79   dbus-send --dest=org.freedesktop.ExampleName               &bsol;
80             /org/freedesktop/sample/object/name              &bsol;
81             org.freedesktop.ExampleInterface.ExampleMethod   &bsol;
82             int32:47 string:'hello world' double:65.32       &bsol;
83             array:string:"1st item","next item","last item"  &bsol;
84             dict:string:int32:"one",1,"two",2,"three",3      &bsol;
85             variant:int32:-8                                 &bsol;
86             objpath:/org/freedesktop/sample/object/name
87
88 </literallayout> <!-- .fi -->
89
90 <para>Note that the interface is separated from a method or signal
91 name by a dot, though in the actual protocol the interface
92 and the interface member are separate fields.</para>
93
94 </refsect1>
95
96 <refsect1 id='options'><title>OPTIONS</title>
97 <para>The following options are supported:</para>
98 <variablelist remap='TP'>
99   <varlistentry>
100   <term><option>--dest=</option><replaceable>NAME</replaceable></term>
101   <listitem>
102 <para>Specify the name of the connection to receive the message.</para>
103   </listitem>
104   </varlistentry>
105   <varlistentry>
106   <term><option>--print-reply</option></term>
107   <listitem>
108 <para>Block for a reply to the message sent, and print any reply received
109 in a human-readable form. It also means the message type (<option>--type=</option>) is <emphasis remap='B'>method_call</emphasis>.</para>
110   </listitem>
111   </varlistentry>
112   <varlistentry>
113   <term><option>--print-reply=literal</option></term>
114   <listitem>
115 <para>Block for a reply to the message sent, and print the body of the
116 reply. If the reply is an object path or a string, it is printed
117 literally, with no punctuation, escape characters etc.</para>
118   </listitem>
119   </varlistentry>
120   <varlistentry>
121   <term><option>--reply-timeout=</option><replaceable>MSEC</replaceable></term>
122   <listitem>
123 <para>Wait for a reply for up to <emphasis remap='I'>MSEC</emphasis> milliseconds.
124 The default is implementation&hyphen;defined, typically 25 seconds.</para>
125   </listitem>
126   </varlistentry>
127   <varlistentry>
128   <term><option>--system</option></term>
129   <listitem>
130 <para>Send to the system message bus.</para>
131   </listitem>
132   </varlistentry>
133   <varlistentry>
134   <term><option>--session</option></term>
135   <listitem>
136 <para>Send to the session message bus.  (This is the default.)</para>
137   </listitem>
138   </varlistentry>
139   <varlistentry>
140   <term><option>--address=</option><replaceable>ADDRESS</replaceable></term>
141   <listitem>
142 <para>Send to <replaceable>ADDRESS</replaceable>.</para>
143   </listitem>
144   </varlistentry>
145   <varlistentry>
146   <term><option>--type=</option><replaceable>TYPE</replaceable></term>
147   <listitem>
148 <para>Specify <emphasis remap='B'>method_call</emphasis> or <emphasis remap='B'>signal</emphasis> (defaults to "<emphasis remap='B'>signal</emphasis>").</para>
149
150   </listitem>
151   </varlistentry>
152 </variablelist>
153 </refsect1>
154
155 <refsect1 id='author'><title>AUTHOR</title>
156 <para>dbus-send was written by Philip Blundell.</para>
157
158 </refsect1>
159
160 <refsect1 id='bugs'><title>BUGS</title>
161 <para>Please send bug reports to the D-Bus mailing list or bug tracker,
162 see <ulink url='http://www.freedesktop.org/software/dbus/'>http://www.freedesktop.org/software/dbus/</ulink></para>
163 </refsect1>
164 </refentry>