1DBUS-SEND(1) User Commands DBUS-SEND(1)
2
3
4
6 dbus-send - Send a message to a message bus
7
9 dbus-send [--system | --session | --address=ADDRESS] [--dest=NAME]
10 [--print-reply [=literal]] [--reply-timeout=MSEC]
11 [--type=TYPE] OBJECT_PATH INTERFACE.MEMBER [CONTENTS...]
12
13
15 The dbus-send command is used to send a message to a D-Bus message bus.
16 See http://www.freedesktop.org/software/dbus/ for more information
17 about the big picture.
18
19 There are two well-known message buses: the systemwide message bus
20 (installed on many systems as the "messagebus" service) and the
21 per-user-login-session message bus (started each time a user logs in).
22 The --system and --session options direct dbus-send to send messages to
23 the system or session buses respectively. If neither is specified,
24 dbus-send sends to the session bus.
25
26 Nearly all uses of dbus-send must provide the --dest argument which is
27 the name of a connection on the bus to send the message to. If --dest
28 is omitted, no destination is set.
29
30 The object path and the name of the message to send must always be
31 specified. Following arguments, if any, are the message contents
32 (message arguments). These are given as type-specified values and may
33 include containers (arrays, dicts, and variants) as described below.
34
35 <contents> ::= <item> | <container> [ <item> | <container>...]
36 <item> ::= <type>:<value>
37 <container> ::= <array> | <dict> | <variant>
38 <array> ::= array:<type>:<value>[,<value>...]
39 <dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
40 <variant> ::= variant:<type>:<value>
41 <type> ::= string | int16 | uint16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
42
43 D-Bus supports more types than these, but dbus-send currently does not.
44 Also, dbus-send does not permit empty containers or nested containers
45 (e.g. arrays of variants).
46
47 Here is an example invocation:
48
49
50 dbus-send --dest=org.freedesktop.ExampleName \
51 /org/freedesktop/sample/object/name \
52 org.freedesktop.ExampleInterface.ExampleMethod \
53 int32:47 string:'hello world' double:65.32 \
54 array:string:"1st item","next item","last item" \
55 dict:string:int32:"one",1,"two",2,"three",3 \
56 variant:int32:-8 \
57 objpath:/org/freedesktop/sample/object/name
58
59
60 Note that the interface is separated from a method or signal name by a
61 dot, though in the actual protocol the interface and the interface
62 member are separate fields.
63
65 The following options are supported:
66
67 --dest=NAME
68 Specify the name of the connection to receive the message.
69
70 --print-reply
71 Block for a reply to the message sent, and print any reply received
72 in a human-readable form. It also means the message type (--type=)
73 is method_call.
74
75 --print-reply=literal
76 Block for a reply to the message sent, and print the body of the
77 reply. If the reply is an object path or a string, it is printed
78 literally, with no punctuation, escape characters etc.
79
80 --reply-timeout=MSEC
81 Wait for a reply for up to MSEC milliseconds. The default is
82 implementation‐defined, typically 25 seconds.
83
84 --system
85 Send to the system message bus.
86
87 --session
88 Send to the session message bus. (This is the default.)
89
90 --address=ADDRESS
91 Send to ADDRESS.
92
93 --type=TYPE
94 Specify method_call or signal (defaults to "signal").
95
97 dbus-send was written by Philip Blundell.
98
100 Please send bug reports to the D-Bus mailing list or bug tracker, see
101 http://www.freedesktop.org/software/dbus/
102
103
104
105D-Bus 1.10.24 03/14/2019 DBUS-SEND(1)