Connect is a program which allows connection to spec from another terminal providing a mirror of the local terminal running spec. It allows full control and monitoring of spec from any terminal - including a home pc. (Connect is not written to allow exclusive connection to spec and could be easily modified for any other program).
Connect is a front end to another program kibitz2 which provides the "guts" of the connection. kibitz2 is a version of kibitz (Don Libes, NIST) which I modified to make it more flexible and to better suit our needs. Both connect and kibitz2 are written in expect and to operate, both expect and tcl must be present on your system. (I have listed an ftp site at the end of this document)
For the rest of this document, I will refer to two users and two terminals:
The local user simply begins the program by running
connect fourcinstead of simply fourc to start spec. If spec is accessed by another command other than fourc, simply substitute for fourc in the above command. (This program is not limited to spec and can be used for any application on your system). This begins spec and allows it to run as usual while constantly (approximately every second) checking for an external connection.
The remote user types:
connectto allow connection to spec remotely. If the remote user and the local user are the same (or the remote user is root), the connection is made with no prompts for further information. If the remote user is not the local user (or root), the remote user will be prompted for the password of the local user and will only connect if this password is entered correctly.
The connection is made when the prompt
Escape sequence is ^Ais shown on the remote terminal. It may be necessary to hit
ENTER once
to get the
FOURC prompt on the remote terminal.
If nothing is seen on
the terminal, the control program could be in the process of taking a
data point and nothing will be seen until this point completes.
This should give a complete mirror of the local terminal allowing the remote user to see data appear on the screen and enter commands as if sitting in the lab.
The remote user exits connect by simply hitting the escape
sequence ^A.
This gives the user the connect prompt and the user exits
by typing
exit.
This breaks the connection and things in the local
terminal continue as if no connection had ever been made.
The local user ends the connect session by exiting from fourc as usual (by typing quit for example). If any other program is being run, simply terminate this program and connect automatically terminates.
For either user, if the escape sequence is hit by mistake, the
user can return to the
connect
session by typing return.
exp_version line in both
scripts.)
I'd like to thank Don Libes at NIST for providing the original kibitz script.
expect, tcl, and tk can be obtained via anonymous ftp at ftp.cme.nist.gov.
For an excellent resource on expect, see the book Exploring Expect by Don Libes.