1mNAME0m
       send - Execute a command in a different application

1mSYNOPSIS0m
       1msend ?4m22moptions24m? 4mapp24m 4mcmd24m ?4marg24m 4marg24m 4m...24m?


1mDESCRIPTION0m
       This command arranges for 4mcmd24m (and 4marg24ms) to be executed in the applica-
       tion named by 4mapp24m.  It returns the result or error  from  that  command
       execution.  4mApp24m 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 4marg24m arguments are present, then the
       command to be executed is contained entirely within the  4mcmd24m  argument.
       If one or more 4marg24ms are present, they are concatenated to form the com-
       mand to be executed, just as for the 1meval 22mcommand.

       If the initial arguments of the  command  begin  with  ``-''  they  are
       treated as options.  The following options are currently defined:

       1m-async 22mRequests asynchronous invocation.  In this case the 1msend 22mcommand
              will complete immediately without waiting for 4mcmd24m 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
              1m-async 22moption is ignored.

       1m-displayof 4m22mpathName0m
              Specifies that the target application's main window  is  on  the
              display  of the window given by 4mpathName24m, instead of the display
              containing the application's main window.

       1m--     22mServes no purpose except to terminate the list of options.  This
              option is needed only if 4mapp24m could contain a leading ``-'' char-
              acter.


1mAPPLICATION NAMES0m
       The name of an application is set initially from the name of  the  pro-
       gram  or script that created the application.  You can query and change
       the name of an application with the 1mtk appname 22mcommand.


1mDISABLING SENDS0m
       If the 1msend 22mcommand is removed from an application (e.g.  with the com-
       mand  1mrename send {}22m) 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 1mtk appname 22mcommand.


1mSECURITY0m
       The  1msend  22mcommand 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 1mxhost 22mis 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) 1mxhost22m-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 1mxauth22m.  Under  Windows,  1msend  22mis  currently  disabled.
       Most of the functionality is provided by the 1mdde 22mcommand instead.

1mKEYWORDS0m
