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-->
15941N/A<!--ARC : LSARC 2006/368 D-BUS Message Bus System -->
11965N/A<!ENTITY cmd "dbus-send">
11965N/A<!ENTITY % commonents SYSTEM "smancommon.ent">
11965N/A%commonents;
11965N/A<!ENTITY % booktitles SYSTEM "booktitles.ent">
11965N/A%booktitles;
15985N/A<!ENTITY suncopy "Copyright (c) 2007,2009 Sun Microsystems, Inc. All Rights Reserved.">
11965N/A]>
11965N/A<?Pub UDT _bookmark _target>
11965N/A<?Pub Inc>
11965N/A<refentry id="dbus-send-1">
11965N/A<!-- %Z%%M% %I% %E% SMI; -->
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>
11965N/A</refmeta>
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/ASend a message to a message bus
17616N/A</refpurpose>
17616N/A</refnamediv>
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</cmdsynopsis></refsynopsisdiv>
17601N/A
11965N/A<refsect1 id="dbus-send-1-desc"><title>&desc-tt;</title>
11965N/A<para>
15985N/AThe <command>&cmd;</command> command is used to send a message to a D\-Bus
15985N/Amessage bus.
11965N/A</para>
17601N/A
11965N/A<para>
11965N/AThere are two standard message buses:
11965N/A</para>
17601N/A
11965N/A<itemizedlist>
11965N/A<listitem><para>
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.
11965N/A</para></listitem>
11965N/A<listitem><para>
17601N/Aper-user-login-session message bus - Launched each time a user logs in.
11965N/A</para></listitem>
11965N/A</itemizedlist>
17601N/A
11965N/A<para>
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/A</para>
17601N/A
15985N/A<para>
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/Aset.
15985N/A</para>
17601N/A
15985N/A<para>
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.
11965N/A</para>
17601N/A
15985N/A<para>
15985N/A<screen>
15985N/A &lt;contents&gt; ::= &lt;item&gt; | &lt;container&gt; [ &lt;item&gt; | &lt;container&gt;...]
15985N/A &lt;item&gt; ::= &lt;type&gt;:&lt;value&gt;
15985N/A &lt;container&gt; ::= &lt;array&gt; | &lt;dict&gt; | &lt;variant&gt;
15985N/A &lt;array&gt; ::= array:&lt;type&gt;:&lt;value&gt;[,&lt;value&gt;...]
15985N/A &lt;dict&gt; ::= dict:&lt;type&gt;:&lt;type&gt;:&lt;key&gt;,&lt;value&gt;[,&lt;key&gt;,&lt;value&gt;...]
15985N/A &lt;variant&gt; ::= variant:&lt;type&gt;:&lt;value&gt;
15985N/A &lt;type&gt; ::= string | int16 | uint 16 | int32 | uint32 |
15985N/A int64 | uint64 | double | byte | boolean | objpath
15985N/A</screen>
15985N/A</para>
17601N/A
15985N/A<para>
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
15985N/Anested containers (e.g. arrays of variants).
11965N/A</para>
17601N/A</refsect1>
17601N/A
17601N/A<refsect1 id="dbus-send-1-opts"><title>&opts-tt;</title>
17601N/A
11965N/A<para>
17601N/AThe following options are supported:
11965N/A</para>
17601N/A
11965N/A<variablelist termlength="wholeline">
11965N/A<varlistentry>
11965N/A<term><option>-dest=<replaceable>name</replaceable></option></term>
11965N/A<listitem><para>
11965N/ASpecify the <replaceable>name</replaceable> of the connection to receive the
11965N/Amessage.
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option>-help</option></term>
11965N/A<listitem><para>
11965N/AShow help information on standard output and exit.
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option>-print-reply</option></term>
11965N/A<listitem><para>
11965N/ABlock for a reply to the message sent, and print any reply received.
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option>-session</option></term>
11965N/A<listitem><para>
11965N/ASend to the session message bus (this is the default).
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option>-system</option></term>
11965N/A<listitem><para>
11965N/ASend to the system message bus. The system bus is disabled and unsupported
11965N/Aon Solaris.
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option>-type=<replaceable>type</replaceable></option></term>
11965N/A<listitem><para>
15985N/ASpecify &quot;method_call&quot; or &quot;signal&quot; (defaults to
15985N/A&quot;signal&quot;).
17616N/A</para></listitem></varlistentry>
11965N/A</variablelist></refsect1>
17601N/A
11965N/A<refsect1 id="dbus-send-1-oper"><title>&oper-tt;</title>
17601N/A
17601N/A<para>
17601N/AThe following operands are supported:
17601N/A</para>
17601N/A
11965N/A<variablelist termlength="medium">
11965N/A<varlistentry>
11965N/A<term><option role="nodash"><replaceable>destination_object_path</replaceable></option></term>
11965N/A<listitem><para>
11965N/AThe object path of the message to send must always be specified.
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option role="nodash"><replaceable>message_name</replaceable></option></term>
11965N/A<listitem><para>
11965N/AThe name of the message to send must always be specified.
17616N/A</para></listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><option role="nodash"><replaceable>contents</replaceable></option></term>
11965N/A<listitem><para>
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</variablelist></refsect1>
17601N/A
11965N/A<refsect1 id="dbus-send-1-exam"><title>&exam-tt;</title>
11965N/A<example role="example">
15985N/A<title>How to use <command>&cmd;</command> with a sh-compatible shell to start
15985N/Athe per-session bus daemon</title>
17601N/A
17601N/A<para>
17601N/A<screen>example% <userinput>&cmd; --dest=org.freedesktop.ExampleName \\
11965N/A /org/freedesktop/sample/object/name \\
11965N/A org.freedesktop.ExampleInterface.ExampleMethod \\
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 \\
15985N/A variant:int32:-8 \\
15985N/A objpath:/org/freedesktop/sample/object/name
11965N/A</userinput>
11965N/A</screen></para>
17601N/A
11965N/A<para>
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/Aseparate fields.
11965N/A</para>
11965N/A</example>
11965N/A</refsect1>
17601N/A
11965N/A<refsect1 id="dbus-send-1-exit"><title>&exit-tt;</title>
17601N/A<para>
17601N/AThe following exit values are returned:
17601N/A</para>
17601N/A
11965N/A<variablelist termlength="xtranarrow">
11965N/A<varlistentry>
11965N/A<term><returnvalue>0</returnvalue></term>
11965N/A<listitem><para>
11965N/AApplication exited successfully
11965N/A</para>
11965N/A</listitem></varlistentry>
17601N/A
11965N/A<varlistentry>
11965N/A<term><returnvalue>>0</returnvalue></term>
11965N/A<listitem><para>
11965N/AApplication exited with failure
11965N/A</para>
11965N/A</listitem></varlistentry>
11965N/A</variablelist></refsect1>
17601N/A
11965N/A<refsect1 id="dbus-send-1-file"><title>&file-tt;</title>
17601N/A<para>
17601N/AThe following files are used by this application:
17601N/A</para>
17601N/A
11965N/A<variablelist termlength="wide">
11965N/A<varlistentry>
11965N/A<term><filename>/usr/bin/&cmd;</filename></term>
11965N/A<listitem><para>
15985N/AExecutable for <command>&cmd;</command>
11965N/A</para>
11965N/A</listitem></varlistentry>
17601N/A
17601N/A</variablelist>
17601N/A</refsect1>
17601N/A
11965N/A<refsect1 id="dbus-send-1-attr"><title>&attr-tt;</title>
17601N/A<para>
17601N/ASee
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</para>
17601N/A
11965N/A<informaltable frame="all">
17601N/A<tgroup cols="2" colsep="1" rowsep="1">
17601N/A<colspec colname="COLSPEC0" colwidth="1*">
11965N/A<colspec colname="COLSPEC1" colwidth="1*">
11965N/A<thead>
17601N/A<row>
17601N/A<entry align="center" valign="middle">ATTRIBUTE TYPE</entry>
17601N/A<entry align="center"
11965N/Avalign="middle">ATTRIBUTE VALUE</entry></row>
11965N/A</thead>
11965N/A<tbody>
17601N/A<row>
17601N/A<entry><para>Availability</para></entry>
18745N/A<entry><para>system/library/dbus</para></entry>
17601N/A</row>
17601N/A<row>
17601N/A<entry colname="COLSPEC0"><para>Interface stability</para></entry>
17601N/A<entry colname="COLSPEC1"><para>Volatile</para></entry>
17601N/A</row>
17601N/A</tbody></tgroup>
11965N/A</informaltable>
11965N/A</refsect1>
17601N/A
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-->
11965N/A<!--Reference to a book.-->
11965N/A<para>
17601N/AMore information can be found at:
17601N/A</para>
17601N/A
17601N/A<para>
17601N/A<literal>http://www.freedesktop.org/software/dbus/</literal>
17601N/A</para>
17601N/A
17601N/A<para>
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</para>
17601N/A
11965N/A</refsect1>
11965N/A<refsect1 id="dbus-send-1-note"><title>&note-tt;</title>
11965N/A<para>
11965N/AFor authorship information refer to
11965N/A<literal>http://www.freedesktop.org/software/dbus/doc/AUTHORS</literal>.
11965N/AUpdated by Brian Cameron, Sun Microsystems Inc., 2007.
11965N/A</para>
11965N/A<para>
15985N/A<command>&cmd;</command> was written by Philip Blundell.
11965N/A</para>
11965N/A<para>
11965N/APlease send bug reports to the D\-Bus mailing list or bug
11965N/Atracker, see
11965N/A<literal>http://www.freedesktop.org/software/dbus/</literal>
11965N/A</para>
11965N/A</refsect1>
11965N/A</refentry>