Seth Woolley's Man Viewer

Manual for send - man n send

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

send(2,n)(n)                      Tk Built-In Commands                      send(2,n)(n)



NAME
       send(2,n) - Execute a command in(1,8) a different application

SYNOPSIS
       send(2,n) ?options? app cmd ?arg arg ...?


DESCRIPTION
       This command arranges for cmd (and args) to be executed in(1,8) the applica-
       tion named(5,8) by app.  It returns the result or error(8,n)  from  that  command
       execution.  App 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 arg arguments are present, then the
       command to be executed is contained entirely within the  cmd  argument.
       If one or more args are present, they are concatenated to form the com-
       mand to be executed, just as for the eval command.

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

       -async Requests asynchronous invocation.  In this case the send(2,n) command
              will complete immediately without waiting for cmd to complete in(1,8)
              the  target application;  no result will be available and errors
              in(1,8) the sent command will be ignored.  If the target  application
              is  in(1,8)  the  same  process  as  the sending application then the
              -async option is ignored.

       -displayof pathName
              Specifies that the target application's main window  is  on  the
              display  of the window given by pathName, instead of the display
              containing the application's main window.

       --     Serves no purpose except to terminate the list of options.  This
              option is needed only if(3,n) app could contain a leading ``-'' char-
              acter.


APPLICATION NAMES
       The name of an application is set(7,n,1 builtins) 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 tk appname command.


DISABLING SENDS
       If the send(2,n) command is removed from an application (e.g.  with the com-
       mand  rename(1,2,n) send(2,n) {}) then the application will not respond to incoming
       send(2,n) requests anymore,  nor will it be able to issue outgoing requests.
       Communication can be reenabled by invoking the tk appname command.


SECURITY
       The  send(2,n)  command is potentially a serious security loophole. On Unix,
       any application that can connect to your X server can send(2,n)  scripts  to
       your  applications.   These  incoming  scripts  can use Tcl to read(2,n,1 builtins) and
       write(1,2) your files and invoke subprocesses under your  name.   Host-based
       access(2,5) control such as that provided by xhost is particularly insecure,
       since it allows anyone with an account on particular hosts  to  connect
       to your server, and if(3,n) 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(2,5)  control  being  used by the server and rejects
       incoming sends unless (a) xhost-style access(2,5) 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 xauth.  Under  Windows,  send(2,n)  is  currently  disabled.
       Most of the functionality is provided by the dde command instead.

KEYWORDS
       application, dde, name, remote execution, security, send(2,n)



Tk                                    4.0                              send(2,n)(n)

References for this manual (incoming links)