Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 2139

mozart-1.4.0-1mdv2010.0.i586.rpm

<HTML><HEAD><TITLE>Tk Built-In Commands - send manual page</TITLE></HEAD><BODY>
<DL>
<DD><A HREF="send.htm#M2" NAME="L953">NAME</A>
<DL><DD>send - Execute a command in a different application</DL>
<DD><A HREF="send.htm#M3" NAME="L954">SYNOPSIS</A>
<DL>
<DD><B>send ?</B><I>options</I>? <I>app cmd </I>?<I>arg arg ...</I>?
</DL>
<DD><A HREF="send.htm#M4" NAME="L955">DESCRIPTION</A>
<DL>
<DD><A HREF="send.htm#M5" NAME="L956"><B>-async</B></A>
<DD><A HREF="send.htm#M6" NAME="L957"><B>-displayof</B> <I>pathName</I></A>
<DD><A HREF="send.htm#M7" NAME="L958"><B>--</B></A>
</DL>
<DD><A HREF="send.htm#M8" NAME="L959">APPLICATION NAMES</A>
<DD><A HREF="send.htm#M9" NAME="L960">DISABLING SENDS</A>
<DD><A HREF="send.htm#M10" NAME="L961">SECURITY</A>
<DD><A HREF="send.htm#M11" NAME="L962">KEYWORDS</A>
</DL><HR>
<H3><A NAME="M2">NAME</A></H3>
send - Execute a command in a different application
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>send ?</B><I>options</I>? <I>app cmd </I>?<I>arg arg ...</I>?<BR>
<H3><A NAME="M4">DESCRIPTION</A></H3>
This command arranges for <I>cmd</I> (and <I>arg</I>s) to be executed in the
application named by <I>app</I>.  It returns the result or
error from that command execution.
<I>App</I> may be the name of any application whose main window is
on the display containing the sender's main window;  it need not
be within the same process.
If no <I>arg</I> arguments are present, then the command to be executed is
contained entirely within the <I>cmd</I> argument.  If one or
more <I>arg</I>s are present, they are concatenated to form the
command to be executed, just as for the <B><A HREF="../TclCmd/eval.htm">eval</A></B> command.
<P>
If the initial arguments of the command begin with ``-''
they are treated as options.  The following options are
currently defined:
<P>
<DL>
<P><DT><A NAME="M5"><B>-async</B></A><DD>
Requests asynchronous invocation.  In this case the <B>send</B>
command will complete immediately without waiting for <I>cmd</I>
to complete in the target application;  no result will be available
and errors in the sent command will be ignored.
If the target application is in the same process as the sending
application then the <B>-async</B> option is ignored.
<P><DT><A NAME="M6"><B>-displayof</B> <I>pathName</I></A><DD>
Specifies that the target application's main window is on the display
of the window given by <I>pathName</I>, instead of the display containing
the application's main window.
<P><DT><A NAME="M7"><B>--</B></A><DD>
Serves no purpose except to terminate the list of options.  This
option is needed only if <I>app</I> could contain a leading ``-''
character.

<P></DL>
<H3><A NAME="M8">APPLICATION NAMES</A></H3>
The name of an application is set initially from the name of the
program or script that created the application.
You can query and change the name of an application with the
<B><A HREF="../TkCmd/tk.htm">tk appname</A></B> command.

<H3><A NAME="M9">DISABLING SENDS</A></H3>
If the <B>send</B> command is removed from an application (e.g.
with the command <B>rename send {}</B>) then the application
will not respond to incoming send requests anymore,  nor will it
be able to issue outgoing requests.
Communication can be reenabled by invoking the <B><A HREF="../TkCmd/tk.htm">tk appname</A></B>
command.

<H3><A NAME="M10">SECURITY</A></H3>
The <B>send</B> command is potentially a serious security loophole,
since any application that can connect to your X server can send
scripts to your applications.
These incoming scripts can use Tcl to read and
write your files and invoke subprocesses under your name.
Host-based access control such as that provided by <B>xhost</B>
is particularly insecure, since it allows anyone with an account
on particular hosts to connect to your server, and if disabled it
allows anyone anywhere to connect to your server.
In order to provide at least a small amount of
security, Tk checks the access control being used by the server
and rejects incoming sends unless (a) <B>xhost</B>-style access control
is enabled (i.e. only certain hosts can establish connections) and (b) the
list of enabled hosts is empty.
This means that applications cannot connect to your server unless
they use some other form of authorization
such as that provide by <B>xauth</B>.

<H3><A NAME="M11">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#application">application</A>, <A href="../Keywords/N.htm#name">name</A>, <A href="../Keywords/R.htm#remote execution">remote execution</A>, <A href="../Keywords/S.htm#security">security</A>, <A href="../Keywords/S.htm#send">send</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1994 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>