99 lines
5.0 KiB
HTML
99 lines
5.0 KiB
HTML
|
<HTML><HEAD><TITLE>Tk Built-In Commands - send manual page</TITLE></HEAD><BODY>
|
||
|
<DL>
|
||
|
<DD><A HREF="send.htm#M2" NAME="L1035">NAME</A>
|
||
|
<DL><DD>send - Execute a command in a different application</DL>
|
||
|
<DD><A HREF="send.htm#M3" NAME="L1036">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="L1037">DESCRIPTION</A>
|
||
|
<DL>
|
||
|
<DD><A HREF="send.htm#M5" NAME="L1038"><B>-async</B></A>
|
||
|
<DD><A HREF="send.htm#M6" NAME="L1039"><B>-displayof</B> <I>pathName</I></A>
|
||
|
<DD><A HREF="send.htm#M7" NAME="L1040"><B>- -</B></A>
|
||
|
</DL>
|
||
|
<DD><A HREF="send.htm#M8" NAME="L1041">APPLICATION NAMES</A>
|
||
|
<DD><A HREF="send.htm#M9" NAME="L1042">DISABLING SENDS</A>
|
||
|
<DD><A HREF="send.htm#M10" NAME="L1043">SECURITY</A>
|
||
|
<DD><A HREF="send.htm#M11" NAME="L1044">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="../TkCmd/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="../TclCmd/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="../TclCmd/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. On Unix,
|
||
|
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>.
|
||
|
Under Windows, <B>send</B> is currently disabled. Most of the
|
||
|
functionality is provided by the <B><A HREF="../TkCmd/dde.htm">dde</A></B> command instead.
|
||
|
<H3><A NAME="M11">KEYWORDS</A></H3>
|
||
|
<A href="../Keywords/A.htm#application">application</A>, <A href="../Keywords/D.htm#dde">dde</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> © 1990-1994 The Regents of the University of California.
|
||
|
<A HREF="../copyright.htm">Copyright</A> © 1994-1996 Sun Microsystems, Inc.
|
||
|
<A HREF="../copyright.htm">Copyright</A> © 1995-1997 Roger E. Critchlow Jr.</PRE>
|
||
|
</BODY></HTML>
|