BridgeDoc.tioga
Bill Jackson (bj) October 28, 1987 11:46:13 pm PST
Peter B. Kessler May 25, 1989 5:48:09 pm PDT
Eduardo Pelegri-Llopart March 9, 1989 1:02:32 pm PST
Russ Atkinson (RRA) May 27, 1988 7:30:34 pm PDT
Tim Diebert: September 13, 1989 8:01:24 am PDT
Willie-s, November 9, 1992 1:16 pm PST
Bridge
CEDAR 10.1 —
Bridge
The Cornell Unix Bridge package
Alan Demers, Bill Jackson
© Copyright 1987, 1988, 1989, 1990, 1992 Xerox Corporation. All rights reserved.
Abstract: Bridge is a reliable-stream-based package for opening shell windows.
Created by: Alan Demers & Bill Jackson
Maintained by: Bill Jackson <BJackson>
Keywords: Unix, XNS, Cedar, Interoperability, editing, Tioga
XEROX  Xerox Corporation
  Palo Alto Research Center
  3333 Coyote Hill Road
  Palo Alto, California 94304

Appendix I - User Interface
Bridge
The syntax of the (Commander) ``bridge'' command is ``bridge hostName [-i] [-term termName]''. If ``-term termName'' is given, bridge tries to use the TerminalEmulator for the terminal type termName; otherwise it uses a typescript viewer. The herald of the viewers is of the form ``RTTY: sessionName'' where sessionName indicates the name of the session (read, hostName) if a typescript is used, or ``RTTY.terminalType: sessionName'' if the TerminalEmulator for terminalType was used. This is useful for choosing among various Bridge viewers. Currently, the terminal types supported are:
VT100 [only partially supported by TerminalEmulator],
VT52,
DM2500,
DMDD [a variation of DM2500 with 38 lines], and
SUNCONSOLE [the sun console with 34 lines] with aliases SUN and SUN34.
The RTTY tip table for the typescript allows you to type all the regular and control characters directly from the keyboard. The only differences are that the ← key sends the ASCII underscore character, and the — key (em-dash, shift-dash) sends the ASCII back-quote character. Since the single- and back-quote characters look the same in the default Tioga font, I suggest using some other font (see the LOOK key, below).
Either the CTRL or SWAT (lower blank key on Dorados) keys may be use as control keys. The LF key sends an ASCII newline character, the BS key sends an ASCII backspace character, and the TAB key sends an ASCII horizontal tab character. The DEL key sends an ASCII delete character, unless a shift or control key or one of the mouse buttons is down, in which case it tries to abort the shift-select you are presumably in the middle of. The LOOK key (upper blank key on Dorados) can be used to change the looks of the selection, or even the input focus. When Bridging to machines that only understand fixed-width character terminals, I suggest typing LOOK-f, to get output in a fixed width font.
See TerminalEmulator documentation for the description of its tip table.
The ``-i'' option asks interactively for the user name and password. [Warning: -i currently is ignored if there exists an ongoing session to hostName]
BridgeKill & BridgeList
The BridgeKill command is used to terminate bridge sessions. It takes an optional second argument, the user name of the session to kill. If none is provided, all sessions to the named host are killed. The BridgeList command shows the user names of each session.
BridgeCredentials
The BridgeCredentials command can be used to change the default credentials for a particular machine, or for all machines using Bridge. To change the credentials for a particular machine, use:
BridgeCredentials name password machine
To supply default credentials for all machines accessed via Bridge, use:
BridgeCredentials name password
Since your password is echoed, you should delete it from the typescript once it has been given.
To supply a default name for all machines accessed via Bridge and default your password to your GV password, use:
BridgeCredentials name
Since that doesn't have your password in it, you can even execute it in your NewUser commands.
The BridgeCredentials command does not affect the user name or password when the -i switch is given to other Bridge commands. If a new user logs onto the system, all translations are lost (this is a simple safety feature to keep people from pretending to be other people).
RTTY, RVT100, RVT52, RDM2500, RDMDD, RSUNCONSOLE
These (UNIX) programs can be used to start their corresponding bridge sessions from the UNIX side. The program must be invoked with LoginSh as an argument. See the previous paragraph for documentation on the effects of the command.
RFTP
The (UNIX) command ``RFTP'' creates a viewer with the herald ``RFTP: sessionName'', where sessionName is the name of the session . This is useful for choosing among various RFTP viewers.
The Text / Binary button in the RFTP control viewer controls whether Ascii.LF's are translated to Ascii.CR's during retrieves and whether Ascii.CR's are translated to Ascii.LF's on during stores. Text means translate, Binary means don't translate.
REdit
ý The (UNIX) command ``REdit filename'' creates a viewer with the contents of filename. The viewer may be edited using the ordinary Tioga operations.
ý The (UNIX) command ``REdit'' creates an empty viewer. You're welcome, Eduardo.
If you mistakenly edit the contents of the REdit viewer, you can re-read the contents of the file into the viewer with the Reset button. The contents of the REdit viewer can be written back to filename by clicking the RemoteSave button. The contents can be written to a named remote file by selecting the name of the file and (double-)clicking the RemoteStore button.
If you use programs that refer you to line n of a file, REdit the file, select the line number, and click the Line button. See LineNumberDoc for a better description of what counts as a line.
REdit can be used on Tioga and plain files. The leading whitespace of the viewer can be used to create a node-structured viewer by left-clicking the Plain®Tioga button (normally used on a viewer containing a plain file). Leading whitespace less than some threshold is retained at the beginnings of nodes, whitespace over that threshold signals a new nesting level to Tioga. A node-structured viewer can be used to create a plain viewer using leading whitespace with the Tioga®Plain button. REdit uses Dupri to perform the Plain®Tioga and Tioga®Plain conversions. See DupriDoc for a better explanation of what ``write plain'' means. Also see DupriDoc for some user profile options you might want to set.
REdit writes Tioga files using LF characters (012) as node separator. The line delimiter character is preserved by Tioga editing.
If you right- or middle-click the Plain®Tioga (or Tioga®Plain) button, REdit will check whether the document being displayed has or not tioga information and will display the correct button. If the incorrect button in being displayed and the RemoteStore button is clicked, the store will be aborted and the correct button will be selected.
With the default settings, the RemoteStore button will write the contents of a plain file as a Unix-readable ASCII file (with newlines), and will write the contents of a tioga file as such (with CRs and all format and comment information); see the section on the WriterPair list for additional details and features.
Some caveats:
Changing leading whitespace to node structure can lose information about how much leading whitespace there was, so the viewer is always marked [Edited] when you change state, even if you don't make any other changes.
A file without a trailing NEWLINE will have a NEWLINE added to it when you Save or Store it, since Tioga won't tell me whether there should be a trailing NEWLINE or not. [[The other choice was to always strip the trailing NEWLINE, and that's probably more of a loss than this, since most files have (and want) them.]] If you want a file without a trailing NEWLINE you'll have to take it off on the UNIX side.
Wow, is this gonna be confusing...
REdit and IconHacks
REdit can create a quite substantial viewer label which, when closed may be truncanted in an undesirable way. Thus, it may be useful to use IconHacks (see IconHacksDoc.tioga). The ability of using regular expressions in IconHacks allows quite useful label transformations. For example, the following UserProfile entry transforms "palain ($TCP) WD = /palain/pelegri/tmp : foo" into "palain [~/tmp]: foo".
IconHacks.HackLabels: TRUE
IconHacks.LabelSubstitutions: "
/palain/pelegri ~
\"WD = <mn:~$~$> \"p \"[<mn>]\"
\"('$&)\"p \"\"
defaults
"
Working Directories and Bridge
The (UNIX) working directory associated with a bridge session is the home directory of the UNIX user. This directory is the starting directory associated with REdit, but the tool allows directory changes. If the UNIX side of Bridge supports it, the WD button will appear in the banner of the tools' viewer. Left clicking will use the current selection to modify the tool's working directory, middle clicking will display the working directory value in the message window. In addition, an attempt is made to have any newly created viewers not initiated from the remote machine to obtain the working directory from the initiating viewer. An example of this is a middle click on the get button.
Changing Transport Protocols
Bridge is willing to speak either XNS or TCP protocols. To change the protocol for the next bridge session you start, use the BridgeChangeTransport command. The command takes a single argument which must be either XNS or TCP. Once a session is started, all communication takes place using the protocol used to start the session, so you can switch protocols and start another session (to a different, or the same, machine) while sessions are in progress. To list the current default protocol, use the BridgePrintTransport command.
Appendix II - User Profile Options
If your name on remote machines is not the same as your name on the local machine, there's the Bridge.sessionName.userName user profile option, where sessionName is the name of the session (read, remote machine), and the value of the option is the user name you like to use by default on that machine. You can override the option by using the -i argument to Bridge. For example, I use:
Bridge.arisia.userName: peter
The assumption is that your password on the remote machine is the same as your password on the local machine. If it isn't you have to use the -i argument to Bridge. I'm not about to recommend storing your remote passwords unencrypted in your user profile.
REdit viewers come up with a style determined by the filename extension, according to the rules specified in Tioga's user profile option; for example, use:
Tioga.ExtensionStyles: c ASCII h ASCII pcr ASCII s ASCII ascii ASCII null ASCII
to get REdit viewers on the usual Unix files to come up with Ascii style. Complain to Pavel if you don't like the way Ascii.Style displays your document.
For historical reasons, RTTY viewers grab the input focus when they start up. If you agree that this is a totally brain-damaged thing to do to someone in a multi-processing world, you'll want to have:
Bridge.RTTY.GrabInputFocus: FALSE
RTTY creates a backing file for its viewers in the /tmp directory; If you don't care about having these file, you should have:
Bridge.RTTY.BackingFile: FALSE
so you can stay in the click-to-type model of the world you are used to.
The default starting transport used by bridge is ARPA. If you want to change this, you can say:
Bridge.DefaultTransport: XNS
Appendix III - The .bridgerc file
When a bridge session is started with some UNIX host, the .bridgerc file in your home directory is consulted to initialize several environment variables which are then consulted by different components of bridge. The .bridgerc file is composed of a series of lines, each of the form: Variable=fieldvalue; bridge simply sets each Variable to its corresponding fieldvalue. A [possibly partial] list of the variables follows:
BRIDGE←INITIALCOMMAND contains the command to execute if none is sent. For instance, if bridge is called from the Commander without any arguments, an empty command will be sent, which normally will invoke the default command RTTY.
RTTY←TERM, and RTTY←TERMCAP, indicate the desired values for TERM and TERMCAP when executing RTTY.
Several other BRIDGE←xxx environment variables are defined automatically when a bridge session is created:
BRIDGE←PROTOCOL is the transport protocol being used.
BRIDGE←WORKSTATION is the workstation address (including port number) in that transport protocol.
BRIDGE←SESSION is the Unix sessionid of the bridge communication processes associated with the current session.
These (and only these) variables are used by the Unix-end components of Bridge to establish communications with the workstation, so don't change them in your .bridgerc, .login or .cshrc file.
UNIX is a trademark of AT&T Bell Laboratories. (Hey, now that we have footnotes, we should use them.)