blob: 7fefc03ef98c413adc734217d1ed40ae1a2a6fac [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
<!-- lifted from troff+man by doclifter -->
<refentry id='dbussend1'>
<!-- -->
<!-- dbus\-send manual page. -->
<!-- Copyright (C) 2003 Red Hat, Inc. -->
<refnamediv id='name'>
<refpurpose>Send a message to a message bus</refpurpose>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<group choice='opt'><arg choice='plain'>--system </arg><arg choice='plain'>--session </arg></group>
<arg choice='opt'>--dest=<replaceable>NAME</replaceable></arg>
<arg choice='opt'>--print-reply </arg>
<arg choice='opt'>--type=<replaceable>TYPE</replaceable></arg>
<arg choice='plain'><replaceable>&lt;destination</replaceable></arg>
<arg choice='plain'><replaceable>object</replaceable></arg>
<arg choice='plain'><replaceable>path&gt;</replaceable></arg>
<arg choice='plain'><replaceable>&lt;message</replaceable></arg>
<arg choice='plain'><replaceable>name&gt;</replaceable></arg>
<arg choice='opt' rep='repeat'><replaceable>contents</replaceable></arg>
<refsect1 id='description'><title>DESCRIPTION</title>
<para>The <command>dbus-send</command> command is used to send a message to a D-Bus message
bus. See <ulink url=''></ulink> for more
information about the big picture.</para>
<para>There are two well-known message buses: the systemwide message bus
(installed on many systems as the "messagebus" service) and the
per-user-login-session message bus (started each time a user logs in).
The --system and --session options direct <command>dbus-send</command> to send
messages to the system or session buses respectively. If neither is
specified, <command>dbus-send</command> sends to the session bus.</para>
<para>Nearly all uses of <command>dbus-send</command> must provide the --dest argument
which is the name of a connection on the bus to send the message to. If
--dest is omitted, no destination is set.</para>
<para>The object path and the name of the message to send must always be
specified. Following arguments, if any, are the message contents
(message arguments). These are given as type-specified values and
may include containers (arrays, dicts, and variants) as described below.</para>
<literallayout remap='.nf'>
&lt;contents&gt; ::= &lt;item&gt; | &lt;container&gt; [ &lt;item&gt; | &lt;container&gt;...]
&lt;item&gt; ::= &lt;type&gt;:&lt;value&gt;
&lt;container&gt; ::= &lt;array&gt; | &lt;dict&gt; | &lt;variant&gt;
&lt;array&gt; ::= array:&lt;type&gt;:&lt;value&gt;[,&lt;value&gt;...]
&lt;dict&gt; ::= dict:&lt;type&gt;:&lt;type&gt;:&lt;key&gt;,&lt;value&gt;[,&lt;key&gt;,&lt;value&gt;...]
&lt;variant&gt; ::= variant:&lt;type&gt;:&lt;value&gt;
&lt;type&gt; ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
</literallayout> <!-- .fi -->
<para>D-Bus supports more types than these, but <command>dbus-send</command> currently
does not. Also, <command>dbus-send</command> does not permit empty containers
or nested containers (e.g. arrays of variants).</para>
<para>Here is an example invocation:</para>
<literallayout remap='.nf'>
dbus-send --dest=org.freedesktop.ExampleName \
/org/freedesktop/sample/object/name \
org.freedesktop.ExampleInterface.ExampleMethod \
int32:47 string:'hello world' double:65.32 \
array:string:"1st item","next item","last item" \
dict:string:int32:"one",1,"two",2,"three",3 \
variant:int32:-8 \
</literallayout> <!-- .fi -->
<para>Note that the interface is separated from a method or signal
name by a dot, though in the actual protocol the interface
and the interface member are separate fields.</para>
<refsect1 id='options'><title>OPTIONS</title>
<para>The following options are supported:</para>
<variablelist remap='TP'>
<para>Specify the name of the connection to receive the message.</para>
<para>Block for a reply to the message sent, and print any reply received.</para>
<para>Send to the system message bus.</para>
<para>Send to the session message bus. (This is the default.)</para>
<para>Specify "method_call" or "signal" (defaults to "signal").</para>
<refsect1 id='author'><title>AUTHOR</title>
<para>dbus-send was written by Philip Blundell.</para>
<refsect1 id='bugs'><title>BUGS</title>
<para>Please send bug reports to the D-Bus mailing list or bug tracker,
see <ulink url=''></ulink></para>