233 lines
5.6 KiB
HTML
233 lines
5.6 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of DBUS-SEND</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>DBUS-SEND</H1>
|
|
Section: User Commands (1)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
dbus-send - Send a message to a message bus
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">
|
|
<B>dbus-send</B> [--system | --session | --address=<I>ADDRESS</I>] [--dest=<I>NAME</I>] [--print-reply [<I>=literal</I>]] [--reply-timeout=<I>MSEC</I>] [--type=<I>TYPE</I>] <I>OBJECT_PATH</I> <I>INTERFACE.MEMBER</I> [<I>CONTENTS</I>...]
|
|
<DD>
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
|
|
<DD>The
|
|
<B>dbus-send</B>
|
|
command is used to send a message to a D-Bus message bus. See
|
|
m[blue]<B><A HREF="http://www.freedesktop.org/software/dbus/">http://www.freedesktop.org/software/dbus/</A></B>m[]
|
|
for more information about the big picture.
|
|
<P>
|
|
|
|
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
|
|
<B>--system</B>
|
|
and
|
|
<B>--session</B>
|
|
options direct
|
|
<B>dbus-send</B>
|
|
to send messages to the system or session buses respectively. If neither is specified,
|
|
<B>dbus-send</B>
|
|
sends to the session bus.
|
|
<P>
|
|
|
|
Nearly all uses of
|
|
<B>dbus-send</B>
|
|
must provide the
|
|
<B>--dest</B>
|
|
argument which is the name of a connection on the bus to send the message to. If
|
|
<B>--dest</B>
|
|
is omitted, no destination is set.
|
|
<P>
|
|
|
|
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.
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
<contents> ::= <item> | <container> [ <item> | <container>...]
|
|
<item> ::= <type>:<value>
|
|
<container> ::= <array> | <dict> | <variant>
|
|
<array> ::= array:<type>:<value>[,<value>...]
|
|
<dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
|
|
<variant> ::= variant:<type>:<value>
|
|
<type> ::= string | int16 | uint16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
D-Bus supports more types than these, but
|
|
<B>dbus-send</B>
|
|
currently does not. Also,
|
|
<B>dbus-send</B>
|
|
does not permit empty containers or nested containers (e.g. arrays of variants).
|
|
<P>
|
|
|
|
Here is an example invocation:
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
|
|
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 \
|
|
objpath:/org/freedesktop/sample/object/name
|
|
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
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.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<P>
|
|
|
|
The following options are supported:
|
|
<P>
|
|
|
|
<B>--dest=</B><I>NAME</I>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
Specify the name of the connection to receive the message.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--print-reply</B>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
Block for a reply to the message sent, and print any reply received in a human-readable form. It also means the message type (<B>--type=</B>) is
|
|
<B>method_call</B>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--print-reply=literal</B>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
Block for a reply to the message sent, and print the body of the reply. If the reply is an object path or a string, it is printed literally, with no punctuation, escape characters etc.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--reply-timeout=</B><I>MSEC</I>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
Wait for a reply for up to
|
|
<I>MSEC</I>
|
|
milliseconds. The default is implementation-defined, typically 25 seconds.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--system</B>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
Send to the system message bus.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--session</B>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
Send to the session message bus. (This is the default.)
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--address=</B><I>ADDRESS</I>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
Send to
|
|
<I>ADDRESS</I>.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
<B>--type=</B><I>TYPE</I>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
Specify
|
|
<B>method_call</B>
|
|
or
|
|
<B>signal</B>
|
|
(defaults to "<B>signal</B>").
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<P>
|
|
|
|
dbus-send was written by Philip Blundell.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>BUGS</H2>
|
|
|
|
<P>
|
|
|
|
Please send bug reports to the D-Bus mailing list or bug tracker, see
|
|
m[blue]<B><A HREF="http://www.freedesktop.org/software/dbus/">http://www.freedesktop.org/software/dbus/</A></B>m[]
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="16"><A HREF="#lbAF">AUTHOR</A><DD>
|
|
<DT id="17"><A HREF="#lbAG">BUGS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:09 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|