Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / man / man1 / kibitz.1
CommitLineData
920dae64
AT
1.TH KIBITZ 1 "19 October 1994"
2.SH NAME
3kibitz \- allow two people to interact with one shell
4.SH SYNOPSIS
5.B kibitz
6[
7.I kibitz-args
8]
9.I user
10[
11.I program program-args...
12]
13.br
14.B kibitz
15[
16.I kibitz-args
17]
18.I user@host
19[
20.I program program-args...
21]
22.SH INTRODUCTION
23.B kibitz
24allows two (or more) people to interact with one shell (or any arbitrary
25program). Uses include:
26.RS
27.TP 4
28\(bu
29A novice user can ask an expert user for help. Using
30.BR kibitz ,
31the expert can see what the user is doing, and offer advice or
32show how to do it right.
33.TP
34\(bu
35By running
36.B kibitz
37and then starting a full-screen editor, people may carry out a
38conversation, retaining the ability to scroll backwards,
39save the entire conversation, or even edit it while in progress.
40.TP
41\(bu
42People can team up on games, document editing, or other cooperative
43tasks where each person has strengths and weaknesses that complement one
44another.
45.SH USAGE
46To start
47.BR kibitz ,
48user1
49runs kibitz with the argument of the
50user to kibitz. For example:
51
52 kibitz user2
53
54.B kibitz
55starts a new shell (or another program, if given on the command
56line), while prompting user2 to run
57.BR kibitz .
58If user2 runs
59.B kibitz
60as directed, the keystrokes of both users become the input of
61the shell. Similarly, both users receive the output from the
62shell.
63
64To terminate
65.B kibitz
66it suffices to terminate the shell itself. For example, if either user
67types ^D (and the shell accepts this to be EOF), the shell terminates
68followed by
69.BR kibitz .
70
71Normally, all characters are passed uninterpreted. However, if the
72escape character (described when
73.B kibitz
74starts) is issued, the user
75may talk directly to the
76.B kibitz
77interpreter. Any
78.BR Expect (1)
79or
80.BR Tcl (3)
81commands may be given.
82Also, job control may be used while in the interpreter, to, for example,
83suspend or restart
84.BR kibitz .
85
86Various processes
87can provide various effects. For example, you can emulate a two-way write(1)
88session with the command:
89
90 kibitz user2 sleep 1000000
91.SH ARGUMENTS
92.B kibitz
93takes arguments, these should also be separated by whitespace.
94
95The
96.B \-noproc
97flag runs
98.B kibitz
99with no process underneath. Characters are passed to the other
100.BR kibitz .
101This is particularly useful for connecting multiple
102interactive processes together.
103In this mode, characters are not echoed back to the typist.
104
105.B \-noescape
106disables the escape character.
107
108.BI \-escape " char"
109sets the escape character. The default escape character is ^].
110
111.B \-silent
112turns off informational messages describing what kibitz is doing to
113initiate a connection.
114
115.BI \-tty " ttyname"
116defines the tty to which the invitation should be sent.
117
118If you start
119.B kibitz
120to user2 on a remote computer,
121.B kibitz
122performs a
123.B rlogin
124to the remote computer with your current username. The flag
125.BI \-proxy " username"
126causes
127.B rlogin
128to use
129.I username
130for the remote login (e.g. if your account on the remote computer has a
131different username). If the
132.B -proxy
133flag is not given,
134.B kibitz
135tries to determine your current username by (in that order) inspecting the
136environment variables USER and LOGNAME, then by using the commands
137.B whoami
138and
139.BR logname .
140
141The arguments
142.B -noescape
143and
144.B -escape
145can also be given by user2 when prompted to run
146.BR kibitz .
147
148.SH MORE THAN TWO USERS
149The current implementation of kibitz explicitly understands only two users,
150however, it is nonetheless possible to have a three (or more) -way kibitz,
151by kibitzing another
152.BR kibitz .
153For example, the following command runs
154.B kibitz
155with the current user, user2, and user3:
156
157 % kibitz user2 kibitz user3
158
159Additional users may be added by simply appending more "kibitz user"
160commands.
161
162The
163.B xkibitz
164script is similar to
165.B kibitz
166but supports the ability to add additional users (and drop them)
167dynamically.
168.SH CAVEATS
169.B kibitz
170assumes the 2nd user has the same terminal type and size as the 1st user.
171If this assumption is incorrect, graphical programs may display oddly.
172
173.B kibitz
174handles character graphics, but cannot handle bitmapped graphics. Thus,
175.nf
176
177 % xterm -e kibitz will work
178 % kibitz xterm will not work
179
180.fi
181However, you can get the effect of the latter command by using
182.B xkibitz
183(see SEE ALSO below).
184.B kibitz
185uses the same permissions as used by rlogin, rsh, etc. Thus, you
186can only
187.B kibitz
188to users at hosts for which you can rlogin.
189Similarly,
190.B kibitz
191will prompt for a password on the remote host if
192rlogin would.
193
194If you
195.B kibitz
196to users at remote hosts,
197.B kibitz
198needs to distinguish your prompt from other things that may precede it
199during login.
200(Ideally, the end of it is preferred but any part should suffice.)
201If you have an unusual prompt,
202set the environment variable EXPECT_PROMPT to an egrep(1)-style
203regular expression.
204Brackets should be preceded with one backslash in ranges,
205and three backslashes for literal brackets.
206The default prompt r.e. is "($|%|#)\ ".
207
208.B kibitz
209requires the
210.B kibitz
211program on both hosts.
212.B kibitz
213requires
214.BR expect (1).
215
216By comparison, the
217.B xkibitz
218script uses the X authorization mechanism for inter-host communication
219so it does not need to login, recognize your prompt, or require kibitz
220on the remote host. It does however need permission to access
221the other X servers.
222.SH BUGS
223An early version of Sun's tmpfs had a bug in it that causes
224.B kibitz
225to blow up. If
226.B kibitz
227reports "error flushing ...: Is a directory"
228ask Sun for patch #100174.
229
230If your Expect is not compiled with multiple-process support (i.e., you do not
231have a working select or poll), you will not be able to run kibitz.
232.SH ENVIRONMENT
233The environment variable SHELL is used to determine the shell to start, if no
234other program is given on the command line.
235
236If the environment variable EXPECT_PROMPT exists, it is taken as a regular
237expression which matches the end of your login prompt (but does not otherwise
238occur while logging in). See also CAVEATS above.
239
240If the environment variables USER or LOGNAME are defined, they are used to
241determine the current user name for a
242.B kibitz
243to a remote computer. See description of the
244.B -proxy
245option in ARGUMENTS above.
246.SH SEE ALSO
247.BR Tcl (3),
248.BR libexpect (3),
249.BR xkibitz (1)
250.br
251.I
252"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs"
253\fRby Don Libes,
254O'Reilly and Associates, January 1995.
255.br
256.I
257"Kibitz \- Connecting Multiple Interactive Programs Together", \fRby Don Libes,
258Software \- Practice & Experience, John Wiley & Sons, West Sussex, England,
259Vol. 23, No. 5, May, 1993.
260.SH AUTHOR
261Don Libes, National Institute of Standards and Technology
262
263.B kibitz
264is in the public domain.
265NIST and I would
266appreciate credit if this program or parts of it are used.