11965N/A<!
DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
11965N/A<!--ArborText, Inc., 1988-1999, v.4002-->
15985N/A<!
ENTITY suncopy "Copyright (c) 2007,2009 Sun Microsystems, Inc. All Rights Reserved.">
15985N/A<
refmeta><
refentrytitle>&cmd;</
refentrytitle><
manvolnum>1</
manvolnum>
15985N/A<
refmiscinfo class="date">25 Feb 2009</
refmiscinfo>
11965N/A<
refmiscinfo class="sectdesc">&man1;</
refmiscinfo>
11965N/A<
refmiscinfo class="software">&release;</
refmiscinfo>
11965N/A<
refmiscinfo class="arch">generic</
refmiscinfo>
11965N/A<
refmiscinfo class="copyright">&suncopy;</
refmiscinfo>
17616N/A<
indexterm><
primary>&cmd;</
primary></
indexterm>
17616N/A<
indexterm><
primary>Send a message to a message bus</
primary></
indexterm>
17616N/A<
refnamediv id="dbus-send-1-name">
15985N/A<
refname>&cmd;</
refname><
refpurpose>
11965N/A<
refsynopsisdiv id="dbus-send-1-synp"><
title>&synp-tt;</
title>
11965N/A<
cmdsynopsis><
command>&cmd;</
command>
11965N/A<
arg choice="opt"><
option>-system</
option> | <
option>-session</
option></
arg>
11965N/A<
arg choice="opt"><
option>-dest=<
replaceable>name</
replaceable></
option></
arg>
11965N/A<
arg choice="opt"><
option>-help</
option></
arg>
11965N/A<
arg choice="opt"><
option>-print-reply</
option></
arg>
11965N/A<
arg choice="opt"><
option>-type=<
replaceable>type</
replaceable></
option></
arg>
11965N/A<
arg choice="plain"><
option role="nodash">destination_object_path</
option></
arg>
11965N/A<
arg choice="plain"><
option role="nodash">message_name</
option></
arg>
11965N/A<
arg rep="repeat"><
option role="nodash">contents</
option></
arg>
11965N/A<
refsect1 id="dbus-send-1-desc"><
title>&desc-tt;</
title>
15985N/AThe <
command>&cmd;</
command> command is used to send a message to a D\-Bus
11965N/AThere are two standard message buses:
17601N/Asystemwide message bus - Launched when the system is started and is always
17602N/Aavailable. Additional systemwide services can be launched via D\-Bus
17603N/Aservice activation. However, D\-Bus service activation is disabled on Solaris.
17601N/Aper-user-login-session message bus - Launched each time a user logs in.
15985N/AThe <
option>-system</
option> and <
option>-session</
option> options direct
15985N/A<
command>&cmd;</
command> to send messages to the system or session buses
15985N/Arespectively. If neither is specified, &cmd; sends to the session bus.
15985N/ANearly all uses of <
command>&cmd;</
command> must provide the
15985N/A<
option>-dest</
option> argument which is the name of a connection on the bus to
15985N/Asend the message to. If <
option>-dest</
option> is omitted, no destination is
15985N/AThe object path and the name of the message to send must always be specified.
15985N/AFollowing arguments, if any, are the message contents (message arguments).
15985N/AThese are given as type-specified values and may include containers (arrays,
15985N/Adicts, and variants) as described below.
15985N/A <contents> ::= <item> | <container> [ <item> | <container>...]
15985N/A <item> ::= <type>:<value>
15985N/A <container> ::= <array> | <dict> | <variant>
15985N/A <array> ::= array:<type>:<value>[,<value>...]
15985N/A <dict> ::= dict:<type>:<type>:<key>,<value>[,<key>,<value>...]
15985N/A <variant> ::= variant:<type>:<value>
15985N/A <type> ::= string | int16 | uint 16 | int32 | uint32 |
15985N/A int64 | uint64 | double | byte | boolean | objpath
17647N/AD\-Bus supports more types than these, but <
command>&cmd;</
command> currently
15985N/Adoes not. Also, <
command>&cmd;</
command> does not permit empty containers or
17601N/A<
refsect1 id="dbus-send-1-opts"><
title>&opts-tt;</
title>
17601N/AThe following options are supported:
11965N/A<
variablelist termlength="wholeline">
11965N/A<
term><
option>-dest=<
replaceable>name</
replaceable></
option></
term>
11965N/ASpecify the <
replaceable>name</
replaceable> of the connection to receive the
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option>-help</
option></
term>
11965N/AShow help information on standard output and exit.
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option>-print-reply</
option></
term>
11965N/ABlock for a reply to the message sent, and print any reply received.
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option>-session</
option></
term>
11965N/ASend to the session message bus (this is the default).
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option>-system</
option></
term>
11965N/ASend to the system message bus. The system bus is disabled and unsupported
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option>-type=<
replaceable>type</
replaceable></
option></
term>
15985N/ASpecify "method_call" or "signal" (defaults to
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
refsect1 id="dbus-send-1-oper"><
title>&oper-tt;</
title>
17601N/AThe following operands are supported:
11965N/A<
variablelist termlength="medium">
11965N/A<
term><
option role="nodash"><
replaceable>destination_object_path</
replaceable></
option></
term>
11965N/AThe object path of the message to send must always be specified.
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option role="nodash"><
replaceable>message_name</
replaceable></
option></
term>
11965N/AThe name of the message to send must always be specified.
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
term><
option role="nodash"><
replaceable>contents</
replaceable></
option></
term>
11965N/AFollowing arguments, if any, are the message contents (message arguments).
11965N/AThese are given as a type name, a colon, and then the value of the argument.
17616N/A</
para></
listitem></
varlistentry>
11965N/A<
refsect1 id="dbus-send-1-exam"><
title>&exam-tt;</
title>
15985N/A<
title>How to use <
command>&cmd;</
command> with a sh-compatible shell to start
15985N/Athe per-session bus daemon</
title>
15985N/A int32:47 string:'hello world' double:65.32 \\
15985N/A array:string:"1st item","next item","last item" \\
15985N/A dict:string:int32:"one",1,"two",2,"three",3 \\
11965N/ANote that the interface is separated from a method or signal name by a dot,
11965N/Athough in the actual protocol the interface and the interface member are
11965N/A<
refsect1 id="dbus-send-1-exit"><
title>&exit-tt;</
title>
17601N/AThe following exit values are returned:
11965N/A<
variablelist termlength="xtranarrow">
11965N/A<
term><
returnvalue>0</
returnvalue></
term>
11965N/A<
term><
returnvalue>>0</
returnvalue></
term>
11965N/A<
refsect1 id="dbus-send-1-file"><
title>&file-tt;</
title>
17601N/AThe following files are used by this application:
11965N/A<
variablelist termlength="wide">
15985N/AExecutable for <
command>&cmd;</
command>
11965N/A<
refsect1 id="dbus-send-1-attr"><
title>&attr-tt;</
title>
17601N/A<
olink targetdocent="REFMAN5" localinfo="attributes-5">
17601N/A<
citerefentry><
refentrytitle>attributes</
refentrytitle>
17601N/A<
manvolnum>5</
manvolnum></
citerefentry></
olink>
17601N/Afor descriptions of the following attributes:
17601N/A<
tgroup cols="2" colsep="1" rowsep="1">
17601N/A<
colspec colname="COLSPEC0" colwidth="1*">
11965N/A<
colspec colname="COLSPEC1" colwidth="1*">
17601N/A<
entry align="center" valign="middle">ATTRIBUTE TYPE</
entry>
11965N/Avalign="middle">ATTRIBUTE VALUE</
entry></
row>
17601N/A<
entry><
para>Availability</
para></
entry>
17601N/A<
entry colname="COLSPEC0"><
para>Interface stability</
para></
entry>
17601N/A<
entry colname="COLSPEC1"><
para>Volatile</
para></
entry>
11965N/A<
refsect1 id="dbus-send-1-also"><
title>&also-tt;</
title>
11965N/A<!--Reference to another man page--> 11965N/A<!--Reference to a Help manual--> 17601N/AMore information can be found at:
15995N/A<
citerefentry><
refentrytitle>dbus-binding-tool</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
11965N/A<
citerefentry><
refentrytitle>dbus-cleanup-sockets</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
13931N/A<
citerefentry><
refentrytitle>dbus-daemon</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
11965N/A<
citerefentry><
refentrytitle>dbus-launch</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
11965N/A<
citerefentry><
refentrytitle>dbus-monitor</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
11965N/A<
citerefentry><
refentrytitle>dbus-uuidgen</
refentrytitle><
manvolnum>1</
manvolnum></
citerefentry>,
11965N/A<
citerefentry><
refentrytitle>libdbus-glib-1</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>,
11965N/A<
citerefentry><
refentrytitle>attributes</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>
11965N/A<
refsect1 id="dbus-send-1-note"><
title>¬e-tt;</
title>
11965N/AFor authorship information refer to
11965N/AUpdated by Brian Cameron, Sun Microsystems Inc., 2007.
15985N/A<
command>&cmd;</
command> was written by Philip Blundell.
11965N/APlease send bug reports to the D\-Bus mailing list or bug