head	1.11;
access;
symbols
	core-8-5-9:1.9
	core-8-5-8:1.9
	macosx-cocoa-merge:1.11
	macosx-cocoa-premerge:1.11
	macosx-carbon-freeze:1.11
	core-8-5-7:1.9
	core-8-5-6:1.9
	core-8-6-b1:1.11
	core-8-6-a3:1.11
	core-8-5-5:1.9
	core-8-6-a2:1.10
	core-8-5-4:1.9
	core-8-5-3:1.9
	core-8-6-a1:1.9
	core-8-4-19:1.3.20.1
	core-8-5-branch:1.9.0.2
	core-8-5-2:1.9
	core-8-4-18:1.3.20.1
	core-8-5-1:1.9
	core-8-4-17:1.3.20.1
	core-8-5-0:1.9
	core-8-5-b3:1.8
	core-8-5-b2:1.7
	core-8-4-16:1.3.20.1
	core-8-5-b1:1.5
	core-stablilizer-merge:1.5
	core-stabilizer-branch:1.5.0.2
	core-stabilizer-merge:1.9
	core-8-4-15:1.3.20.1
	core-8-5-a6:1.5
	core-8-5-a5:1.5
	core-8-4-14:1.3.20.1
	core-8-5-a4:1.5
	core-8-4-13:1.3.20.1
	core-8-4-12:1.3.20.1
	core-8-4-11:1.3.20.1
	core-8-5-a3:1.5
	core-8-4-10:1.3.20.1
	core-8-4-9-branch:1.3.20.1.0.2
	core-8-5-a2:1.4
	core-8-4-9:1.3.20.1
	core-8-4-8:1.3.20.1
	core-8-4-7:1.3
	core-8-5-a1:1.3
	core-8-4-6:1.3
	core-8-4-5:1.3
	mistachkin-dev-branch:1.3.0.22
	core-8-4-4:1.3
	core-8-4-3:1.3
	core-8-4-branch:1.3.0.20
	core-8-4-2:1.3
	core-8-4-1:1.3
	core-8-3-5:1.3
	core-8-4-0:1.3
	macosx-8-4-merge-2002-08-31-trunk:1.3
	macosx-8-4-premerge-2002-08-31-branch:1.3
	macosx-8-4-premerge-2002-08-31-trunk:1.3
	macosx-8-4-merge-2002-08-30-branch:1.3
	macosx-8-4-merge-2002-08-30-trunk:1.3
	macosx-8-4-merge-2002-08-20-branch:1.3
	macosx-8-4-merge-2002-08-20-trunk:1.3
	core-8-4-b2:1.3
	core-8-4-b1:1.3
	macosx-premerge-6-9-02:1.3
	core-8-4-a4:1.3
	core-8-3-4:1.3
	macosx-8-4-branch:1.3.0.18
	macosx-8-4-branchpoint:1.3
	core-8-4-a3:1.3
	core-8-3-3:1.3
	dgp-privates-into-namespace:1.3.0.16
	tclpro-1-5-0:1.3
	core-8-4-win-speedup:1.3.0.14
	core-8-4-a2:1.3
	tclpro-1-4-1:1.3
	tclpro-1-4-0:1.3
	core-8-3-2:1.3
	ajuba-ajuba2-2-1-base:1.3
	ajuba-ajuba2-2-0:1.3
	core-8-4-a1:1.3
	core-8-3-1-branch:1.3.0.12
	core-8-3-1:1.3
	scriptics-sc-2-0-b5:1.3
	scriptics-sc-2-0-fixed:1.3
	scriptics-sc-2-0-b2:1.3
	scriptics-sc-2-0-b1:1.3
	core-8-3-0:1.3
	core-8-3-b2:1.3
	core-8-3-b1:1.3
	scriptics-sc-1-1:1.3
	scriptics-sc-1-1-b1:1.3
	core-8-2-3:1.3
	scriptics-sc-1-1-branch:1.3.0.10
	scriptics-sc-1-1-base:1.3
	scriptics-sc-1-0:1.3
	scriptics-sc-1-0-branch:1.3.0.8
	scriptics-sc-1-0-base:1.3
	core-8-2-2:1.3
	core-8-2-1:1.3
	scriptics-bc-1-0-b1:1.3
	core-8-2-1-branch:1.3.0.6
	scriptics-tclpro-1-3-0:1.3
	core-8-2-0:1.3
	core-8-2-b3-branch:1.3.0.4
	core-8-2-b3-base:1.3
	scriptics-tclpro-1-3-b4:1.3
	core-8-2-b2:1.3
	scriptics-tclpro-1-3-b3:1.3
	core-8-2-b1:1.3
	scriptics-tclpro-1-3-b2:1.3
	merge-to-mainline-5/21/99:1.3
	scriptics-tclpro-1-3-b2-branch:1.3.0.2
	core-8-1-1:1.3
	scriptics-tclpro-1-3-b1:1.3
	core-8-1-1-base:1.3
	core-8-1-0:1.3
	merge-to-mainline-4-29-99:1.3
	merge-to-mainline-4-23-99:1.3
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.3
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.2
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.11
date	2008.09.23.13.36.55;	author dkf;	state Exp;
branches;
next	1.10;

1.10
date	2008.06.30.22.57.03;	author dkf;	state Exp;
branches;
next	1.9;

1.9
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.8;

1.8
date	2007.10.29.16.04.14;	author dkf;	state Exp;
branches;
next	1.7;

1.7
date	2007.10.26.20.13.23;	author dgp;	state Exp;
branches;
next	1.6;

1.6
date	2007.10.24.14.32.59;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	2005.04.06.21.11.54;	author dkf;	state Exp;
branches
	1.5.2.1;
next	1.4;

1.4
date	2004.06.21.14.06.37;	author dkf;	state Exp;
branches;
next	1.3;

1.3
date	99.04.16.01.51.09;	author stanton;	state Exp;
branches
	1.3.20.1;
next	1.2;

1.2
date	98.09.14.18.23.00;	author stanton;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.39.57;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.10;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.16.29;	author stanton;	state Exp;
branches;
next	1.1.4.3;

1.1.4.3
date	99.04.02.23.50.11;	author redman;	state Exp;
branches;
next	;

1.3.20.1
date	2004.10.28.12.25.22;	author dkf;	state Exp;
branches;
next	;

1.5.2.1
date	2007.11.01.16.37.16;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.11
log
@Fix [Bug 2118116]
@
text
@'\"
'\" Copyright (c) 1990-1994 The Regents of the University of California.
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: send.n,v 1.10 2008/06/30 22:57:03 dkf Exp $
'\" 
.so man.macros
.TH send n 4.0 Tk "Tk Built-In Commands"
.BS
'\" Note:  do not modify the .SH NAME line immediately below!
.SH NAME
send \- Execute a command in a different application
.SH SYNOPSIS
\fBsend ?\fIoptions\fR? \fIapp cmd \fR?\fIarg arg ...\fR?
.BE
.SH DESCRIPTION
.PP
This command arranges for \fIcmd\fR (and \fIarg\fRs) to be executed in the
application named by \fIapp\fR.  It returns the result or
error from that command execution.
\fIApp\fR 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 \fIarg\fR arguments are present, then the command to be executed is
contained entirely within the \fIcmd\fR argument.  If one or
more \fIarg\fRs are present, they are concatenated to form the
command to be executed, just as for the \fBeval\fR command.
.PP
If the initial arguments of the command begin with
.QW \-
they are treated as options.  The following options are currently defined:
.TP
\fB\-async\fR
Requests asynchronous invocation.  In this case the \fBsend\fR
command will complete immediately without waiting for \fIcmd\fR
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 \fB\-async\fR option is ignored.
.TP
\fB\-displayof\fR \fIpathName\fR
Specifies that the target application's main window is on the display
of the window given by \fIpathName\fR, instead of the display containing
the application's main window.
.TP
\fB\-\|\-\fR
Serves no purpose except to terminate the list of options.  This
option is needed only if \fIapp\fR could contain a leading
.QW \-
character.
.SH "APPLICATION NAMES"
.PP
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
\fBtk appname\fR command.
.SH "DISABLING SENDS"
.PP
If the \fBsend\fR command is removed from an application (e.g.
with the command \fBrename send {}\fR) 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 \fBtk appname\fR
command.
.SH SECURITY
.PP
The \fBsend\fR 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 \fBxhost\fR
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) \fBxhost\fR-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 \fBxauth\fR.
Under Windows, \fBsend\fR is currently disabled.  Most of the
functionality is provided by the \fBdde\fR command instead.
.SH EXAMPLE
.PP
This script fragment can be used to make an application that only runs
once on a particular display.
.CS
if {[tk appname FoobarApp] ne "FoobarApp"} {
    \fBsend\fR \-async FoobarApp RemoteStart $argv
    exit
}
# The command that will be called remotely, which raises
# the application main window and opens the requested files
proc RemoteStart args {
    raise .
    foreach filename $args {
        OpenFile $filename
    }
}
.CE
.SH KEYWORDS
application, dde, name, remote execution, security, send
'\" Local Variables:
'\" mode: nroff
'\" End:
@


1.10
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@a0 1
'\" -*- nroff -*-
d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.9 2007/12/13 15:23:43 dgp Exp $
d109 3
@


1.9
log
@merge stable branch onto HEAD
@
text
@d1 1
d9 1
a9 1
'\" RCS: @@(#) $Id: send.n,v 1.5.2.1 2007/11/01 16:37:16 dgp Exp $
a19 1

a54 1

a60 1

a68 1

d91 1
@


1.8
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.7 2007/10/26 20:13:23 dgp Exp $
@


1.7
log
@        * doc/*.1:              Revert doc changes that broke
        * doc/*.3:              `make html` so we can get the release
        * doc/*.n:              out the door.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.5 2005/04/06 21:11:54 dkf Exp $
d33 3
a35 3
If the initial arguments of the command begin with ``\-''
they are treated as options.  The following options are
currently defined:
d52 2
a53 1
option is needed only if \fIapp\fR could contain a leading ``\-''
d98 1
a98 1
    \fBsend\fR -async FoobarApp RemoteStart $argv
@


1.6
log
@Lots of improvements to look and feel of manual pages
@
text
@d33 1
a33 2
If the initial arguments of the command begin with
.QW \-
d52 1
a52 2
option is needed only if \fIapp\fR could contain a leading
.QW \-
@


1.5
log
@Purge old and inaccurate .VS/.VE macros.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.4 2004/06/21 14:06:37 dkf Exp $
d33 2
a34 1
If the initial arguments of the command begin with ``\-''
d53 2
a54 1
option is needed only if \fIapp\fR could contain a leading ``\-''
@


1.5.2.1
log
@merge updates from HEAD
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.5 2005/04/06 21:11:54 dkf Exp $
d33 3
a35 3
If the initial arguments of the command begin with
.QW \-
they are treated as options.  The following options are currently defined:
d52 1
a52 2
option is needed only if \fIapp\fR could contain a leading
.QW \-
d97 1
a97 1
    \fBsend\fR \-async FoobarApp RemoteStart $argv
@


1.4
log
@Added example
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.3 1999/04/16 01:51:09 stanton Exp $
a89 1
.VS
a91 1
.VE
a109 1
.VS
a110 1
.VE
@


1.3
log
@* Merged 8.1 branch into the main trunk
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id$
d94 17
@


1.3.20.1
log
@More backporting of doc fixes
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.3 1999/04/16 01:51:09 stanton Exp $
a93 17
.SH EXAMPLE
This script fragment can be used to make an application that only runs
once on a particular display.
.CS
if {[tk appname FoobarApp] ne "FoobarApp"} {
    \fBsend\fR -async FoobarApp RemoteStart $argv
    exit
}
# The command that will be called remotely, which raises
# the application main window and opens the requested files
proc RemoteStart args {
    raise .
    foreach filename $args {
        OpenFile $filename
    }
}
.CE
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d73 2
a74 2
The \fBsend\fR command is potentially a serious security loophole,
since any application that can connect to your X server can send
d90 4
a93 1

d95 3
a97 1
application, name, remote execution, security, send
@


1.1
log
@Initial revision
@
text
@d8 1
a8 1
'\" SCCS: @@(#) send.n 1.18 96/08/27 13:21:47
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d8 1
a8 1
'\" SCCS: @@(#) send.n 1.19 97/07/07 16:53:29
d73 2
a74 2
The \fBsend\fR command is potentially a serious security loophole. On Unix,
any application that can connect to your X server can send
d90 1
a90 8
.VS
Under Windows, any application running on the current machine can send
Dynamic Data Exchange (DDE) commands which could read and write files and start
processes. Only the local machine can connect, however, so there are
no restrictions on which processes can connect. The \fBsend\fR command
uses DDE as its transport, and a \fBdde\fR command has been added to
Tk 8.0.
.VE
d92 1
a92 3
.VS
application, dde, name, remote execution, security, send
.VE
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.2 1998/09/14 18:23:00 stanton Exp $
@


1.1.4.3
log
@Removed send command on Windows, moved dde to Tcl as a
separate package.
@
text
@d8 1
a8 1
'\" RCS: @@(#) $Id: send.n,v 1.1.4.2 1998/09/30 02:16:29 stanton Exp $
d91 6
a96 2
Under Windows, \fBsend\fR is currently disabled.  Most of the
functionality is provided by the \fBdde\fR command instead.
@


