2 .\" dbus\-send manual page.
3 .\" Copyright (C) 2003 Red Hat, Inc.
7 dbus\-send \- Send a message to a message bus
11 [\fB\-\-system\fP | \fB\-\-session\fP]
12 [\fB\-\-dest=\fINAME\fP]
13 [\fB\-\-print\-reply\fP[\fB=literal\fP]]
14 [\fB\-\-reply\-timeout=\fIMSEC\fP]
15 [\fB\-\-type=\fITYPE\fP]
16 \fIOBJECT_PATH\fP \fIINTERFACE\fB.\fIMEMBER\fP [\fICONTENTS\fP ...]
20 The \fIdbus\-send\fP command is used to send a message to a D\-Bus message
21 bus. See http://www.freedesktop.org/software/dbus/ for more
22 information about the big picture.
25 There are two well\-known message buses: the systemwide message bus
26 (installed on many systems as the "messagebus" service) and the
27 per\-user\-login\-session message bus (started each time a user logs in).
28 The \fB\-\-system\fP and \fB\-\-session\fP options direct
29 \fBdbus\-send\fP to send messages to the system or session buses respectively.
30 If neither is specified, \fBdbus\-send\fP sends to the session bus.
33 Nearly all uses of \fBdbus\-send\fP must provide the \fB\-\-dest\fP argument
34 which is the name of a connection on the bus to send the message to. If
35 \fB\-\-dest\fP is omitted, no destination is set.
38 The object path and the name of the message to send must always be
39 specified. Following arguments, if any, are the message contents
40 (message arguments). These are given as type\-specified values and
41 may include containers (arrays, dicts, and variants) as described below.
44 <contents> ::= <item> | <container> [ <item> | <container>...]
45 <item> ::= <type>:<value>
46 <container> ::= <array> | <dict> | <variant>
47 <array> ::= array:<type>:<value>[,<value>...]
48 <dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
49 <variant> ::= variant:<type>:<value>
50 <type> ::= string | int16 | uint 16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
53 D\-Bus supports more types than these, but \fBdbus\-send\fP currently
54 does not. Also, \fBdbus\-send\fP does not permit empty containers
55 or nested containers (e.g. arrays of variants).
58 Here is an example invocation:
61 dbus\-send \-\-dest=org.freedesktop.ExampleName \\
62 /org/freedesktop/sample/object/name \\
63 org.freedesktop.ExampleInterface.ExampleMethod \\
64 int32:47 string:'hello world' double:65.32 \\
65 array:string:"1st item","next item","last item" \\
66 dict:string:int32:"one",1,"two",2,"three",3 \\
68 objpath:/org/freedesktop/sample/object/name
72 Note that the interface is separated from a method or signal
73 name by a dot, though in the actual protocol the interface
74 and the interface member are separate fields.
77 The following options are supported:
80 Specify the name of the connection to receive the message.
83 Block for a reply to the message sent, and print any reply received
84 in a human-readable form.
86 .B "\-\-print\-reply=literal"
87 Block for a reply to the message sent, and print the body of the
88 reply. If the reply is an object path or a string, it is printed
89 literally, with no punctuation, escape characters etc.
91 .BI \-\-reply\-timeout= MSEC
92 Wait for a reply for up to \fIMSEC\fP milliseconds.
93 The default is implementation\(hydefined, typically 25 seconds.
96 Send to the system message bus.
99 Send to the session message bus. (This is the default.)
102 Specify \fBmethod_call\fP or \fBsignal\fP (defaults to "\fBsignal\fP").
105 dbus\-send was written by Philip Blundell.
108 Please send bug reports to the D\-Bus mailing list or bug tracker,
109 see http://www.freedesktop.org/software/dbus/