Document that dbus-launch is not dbus-run-session
[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\-\-reply\-timeout=\fIMSEC\fP]
15 [\fB\-\-type=\fITYPE\fP]
16 \fIOBJECT_PATH\fP \fIINTERFACE\fB.\fIMEMBER\fP [\fICONTENTS\fP ...]
17
18 .SH DESCRIPTION
19
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.
23
24 .PP
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.
31
32 .PP 
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.
36
37 .PP
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.
42
43 .nf
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
51 .fi
52
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).
56
57 .PP
58 Here is an example invocation:
59 .nf
60
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      \\
67             variant:int32:\-8                                 \\
68             objpath:/org/freedesktop/sample/object/name 
69
70 .fi
71
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.
75
76 .SH OPTIONS
77 The following options are supported:
78 .TP
79 .BI \-\-dest= NAME
80 Specify the name of the connection to receive the message.
81 .TP
82 .B "\-\-print\-reply"
83 Block for a reply to the message sent, and print any reply received
84 in a human-readable form.
85 .TP
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.
90 .TP
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.
94 .TP
95 .B "\-\-system"
96 Send to the system message bus.
97 .TP
98 .B "\-\-session"
99 Send to the session message bus.  (This is the default.)
100 .TP
101 .BI \-\-type= TYPE
102 Specify \fBmethod_call\fP or \fBsignal\fP (defaults to "\fBsignal\fP").
103
104 .SH AUTHOR
105 dbus\-send was written by Philip Blundell.
106
107 .SH BUGS
108 Please send bug reports to the D\-Bus mailing list or bug tracker,
109 see http://www.freedesktop.org/software/dbus/