send - Online Linux Manual PageSection : 3pm
Updated : 2020-11-09
Source : perl v5.32.0
Note : User Contributed Perl Documentation

NAMETk::send − Execute a command in a different application

SYNOPSIS    $result = $widget>send(?options,?app=>cmd?arg arg ...?)

DESCRIPTIONThis method arranges for cmd (and args) to be 'sent' to the application named by app. It returns the result or an error (hence above should probably be 'wrapped' in eval{} and $@ tested). ​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 string to be sent is contained entirely within the cmd argument. If one or more args are present, they are concatenated separated by white space to form the string to be sent. If the initial arguments of the call begin with ``−'' they are treated as options. The following options are currently defined: −async Requests asynchronous invocation. In this case the send command will complete immediately without waiting for cmd 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 −async option is ignored. −− Serves no purpose except to terminate the list of options. This option is needed only if app could contain a leading ``−'' character.

APPLICATION NAMESThe 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 ​appname method.

WHAT IS A SENDThe send mechanism was designed to allow Tcl/Tk applications to send Tcl Scripts to each other. This does not map very well onto perl/Tk. Perl/Tk sends a string to app, what happens as a result of this depends on the receiving application. If the other application is a Tcl/Tk4.* application it will be treated as a Tcl Script. If the other application is perl/Tk application (including sends to self) then the string is passed as an argument to a method call of the following form: $mainwindow>Receive(string); There is a default (AutoLoaded) Tk::Receive which returns an error to the sending application. A particular application may define its own ​Receive method in any class in MainWindow's inheritance tree to do whatever it sees fit. For example it could eval the string, possibly in a Safe compartment. If a Tcl/Tk application sends anything to a perl/Tk application then the perl/Tk application would have to attempt to interpret the incoming string as a Tcl Script. Simple cases are should not be too hard to emulate (split on white space and treat first element as command and other elements as arguments).

SECURITYThe send command is potentially a serious security loophole, since any application that can connect to your X server can send scripts to your applications. Hence the default behaviour outlined above. (With the availability of Safe it may make sense to relax default behaviour a little.) Unmonitored eval'ing of these incoming scripts can cause perl to read and write files and invoke subprocesses under your name. Host-based access 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 disabled it allows anyone anywhere to connect to your server. In order to provide at least a small amount of security, core Tk checks the access control being used by the server and rejects incoming sends unless (a) xhost−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 xauth.

SEE ALSOeval in perlfunc, Safe, system's administrator/corporate security guidelines etc.

KEYWORDSapplication, name, remote execution, security, send
0
Johanes Gumabo
Data Size   :   12,016 byte
man-Tk::send.3pmBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   3 / 193,060
Visitor ID   :     :  
Visitor IP   :   3.144.123.61   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.

ERROR : Need New Coding :         (parse_manual_page_|249|Tk::send.3pm|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\| )         (htmlprn|149|Tk::send.3pm|36/37|.el══─{─══. ds --  —  |.el══─{─══. ds -- \|\(em\| )         (parse_manual_page_|249|Tk::send.3pm|43|br══─}─══|'br══─}─══ )         (htmlprn|149|Tk::send.3pm|43|'br══─}─══ |'br══─}─══ )