1DBUS-SEND(1)                     User Commands                    DBUS-SEND(1)
2
3
4

NAME

6       dbus-send - Send a message to a message bus
7

SYNOPSIS

9       dbus-send [--system | --session | --bus=ADDRESS | --peer=ADDRESS]
10                 [--sender=NAME] [--dest=NAME] [--print-reply [=literal]]
11                 [--reply-timeout=MSEC] [--type=TYPE] OBJECT_PATH
12                 INTERFACE.MEMBER [CONTENTS...]
13
14

DESCRIPTION

16       The dbus-send command is used to send a message to a D-Bus message bus.
17       See http://www.freedesktop.org/software/dbus/ for more information
18       about the big picture.
19
20       There are two well-known message buses: the systemwide message bus
21       (installed on many systems as the "messagebus" service) and the
22       per-user-login-session message bus (started each time a user logs in).
23       The --system and --session options direct dbus-send to send messages to
24       the system or session buses respectively. If neither is specified,
25       dbus-send sends to the session bus.
26
27       Nearly all uses of dbus-send must provide the --dest argument which is
28       the name of a connection on the bus to send the message to. If --dest
29       is omitted, no destination is set.
30
31       The object path and the name of the message to send must always be
32       specified. Following arguments, if any, are the message contents
33       (message arguments). These are given as type-specified values and may
34       include containers (arrays, dicts, and variants) as described below.
35
36           <contents>   ::= <item> | <container> [ <item> | <container>...]
37           <item>       ::= <type>:<value>
38           <container>  ::= <array> | <dict> | <variant>
39           <array>      ::= array:<type>:<value>[,<value>...]
40           <dict>       ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
41           <variant>    ::= variant:<type>:<value>
42           <type>       ::= string | int16 | uint16 | int32 | uint32 | int64 | uint64 | double | byte | boolean | objpath
43
44       D-Bus supports more types than these, but dbus-send currently does not.
45       Also, dbus-send does not permit empty containers or nested containers
46       (e.g. arrays of variants).
47
48       Here is an example invocation:
49
50
51             dbus-send --dest=org.freedesktop.ExampleName               \
52                       /org/freedesktop/sample/object/name              \
53                       org.freedesktop.ExampleInterface.ExampleMethod   \
54                       int32:47 string:'hello world' double:65.32       \
55                       array:string:"1st item","next item","last item"  \
56                       dict:string:int32:"one",1,"two",2,"three",3      \
57                       variant:int32:-8                                 \
58                       objpath:/org/freedesktop/sample/object/name
59
60
61       Note that the interface is separated from a method or signal name by a
62       dot, though in the actual protocol the interface and the interface
63       member are separate fields.
64

OPTIONS

66       The following options are supported:
67
68       --dest=NAME
69           Specify the name of the connection to receive the message.
70
71       --print-reply
72           Block for a reply to the message sent, and print any reply received
73           in a human-readable form. It also means the message type (--type=)
74           is method_call.
75
76       --print-reply=literal
77           Block for a reply to the message sent, and print the body of the
78           reply. If the reply is an object path or a string, it is printed
79           literally, with no punctuation, escape characters etc.
80
81       --reply-timeout=MSEC
82           Wait for a reply for up to MSEC milliseconds. The default is
83           implementation‐defined, typically 25 seconds.
84
85       --system
86           Send to the system message bus.
87
88       --session
89           Send to the session message bus. (This is the default.)
90
91       --bus=ADDRESS
92           Register on a message bus at ADDRESS, typically a dbus-daemon.
93
94       --peer=ADDRESS
95           Send to a non-message-bus D-Bus server at ADDRESS. In this case
96           dbus-send will not call the Hello method.
97
98       --sender=NAME
99           Request ownership of name NAME before sending the message. The name
100           will be released when dbus-send exits.
101
102       --type=TYPE
103           Specify method_call or signal (defaults to "signal").
104

AUTHOR

106       dbus-send was written by Philip Blundell.
107

BUGS

109       Please send bug reports to the D-Bus mailing list or bug tracker, see
110       http://www.freedesktop.org/software/dbus/
111
112
113
114D-Bus 1.14.10                     09/01/2023                      DBUS-SEND(1)
Impressum