kibitz user2
kibitz starts a new shell (or another program, if given on the command line), while prompting user2 to run kibitz. If user2 runs kibitz as directed, the keystrokes of both users become the input of the shell. Similarly, both users receive the output from the shell.
To terminate kibitz it suffices to terminate the shell itself. For example, if either user types ^D (and the shell accepts this to be EOF), the shell terminates followed by kibitz.
Normally, all characters are passed uninterpreted. However, if the escape character (described when kibitz starts) is issued, the user may talk directly to the kibitz interpreter. Any expect(1) or Tcl(3) commands may be given. Also, job control may be used while in the interpreter, to, for example, suspend or restart kibitz.
The -noproc flag runs kibitz with no process underneath. Characters are passed to the other kibitz. This is particularly useful for connecting multiple interactive processes together. In this mode, characters are not echoed back to the typist. Various processes can provide echoing. For example, you can emulate a two-way write(1) session with the command:
kibitz user2 sleep 1000000
-noescape disables the escape character.
-escape sets the escape character. The default escape character is ^].
-silent turns off informational messages describing what kibitz is doing to initiate a connection.
% kibitz user2 kibitz user3
Additional users may be added by simply appending more "kibitz user" commands.
kibitz handles character graphics, but cannot handle bitmapped graphics. Thus,
% xterm -e kibitz will work % kibitz xterm will not workkibitz uses the same permissions as used by rlogin, rsh, etc. Thus, you can only kibitz to users at hosts for which you can rlogin. Similarly, kibitz will prompt for a password on the remote host if rlogin would.
If you kibitz to users at remote hosts, kibitz needs to distinguish your prompt from other things that may preceed it during login. (Ideally, the end of it is preferred but any part should suffice.) If you have an unusual prompt, set the environment variable EXPECT_PROMPT to an egrep(1)-style regular expression. Brackets should be preceeded with one backslash in ranges, and three backslashes for literal brackets. The default prompt r.e. is "($|%|#) ".
kibitz requires the kibitz program on both hosts. kibitz requires expect(1).
While kibitz currently explicitly understands only two users, there is nothing inherent to the technique kibitz uses internally about this limit. The mind boggles at various features that could be added (dynamically adding and deleting arbitrary numbers of users and programs, simulating multiple cursors, etc). Feel free to hack around with the program to add whatever features you like.
HPUX 8.0 is reported to require cat(1) to be unbuffered. Without it, characters are not passed at all. If you are on such a system, edit the kibitz script. Search for catflags and follow the instructions at that point. Alternatively, you may add the "-catu" flag to the invocation of kibitz.