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