Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / man / man1 / multixterm.1
CommitLineData
920dae64
AT
1.TH MULTIXTERM 1 "16 August 2002"
2.SH NAME
3multixterm \- drive multiple xterms separately or together
4.SH SYNOPSIS
5.B multixterm
6[
7.I args
8]
9.SH DESCRIPTION
10Multixterm creates multiple xterms that can be driven together
11or separately.
12
13In its simplest form, multixterm is run with no arguments and
14commands are interactively entered in the first entry field.
15Press return (or click the "new xterm" button) to create a new
16xterm running that command.
17
18Keystrokes in the "stdin window" are redirected to all xterms
19started by multixterm. xterms may be driven separately simply
20by focusing on them.
21
22The stdin window must have the focus for keystrokes to be sent
23to the xterms. When it has the focus, the color changes to
24aquamarine. As characters are entered, the color changes to
25green for a second. This provides feedback since characters
26are not echoed in the stdin window.
27
28Typing in the stdin window while holding down the alt or meta
29keys sends an escape character before the typed characters.
30This provides support for programs such as emacs.
31
32.SH ARGUMENTS
33.RS
34.TP 4
35-xa
36The optional \-xa argument indicates arguments to pass to
37xterm.
38
39.TP
40-xc
41The optional \-xc argument indicates a command to be run in
42each named xterm (see \-xn). With no \-xc argument, the command
43is the current shell.
44
45.TP 4
46-xd
47The optional \-xd argument indicates a directory to search for
48files that will appear in the Files menu. By default, the
49directory is: ~/lib/multixterm
50
51.TP 4
52-xf
53The optional \-xf argument indicates a file to be read at
54startup. See FILES below for more info.
55
56.TP 4
57-xn
58The optional \-xn argument indicates a name for each xterm.
59This name will also be substituted for any %n in the command
60argument (see \-xc).
61
62.TP 4
63-xv
64The optional \-xv flag puts multixterm into a verbose mode
65where it will describe some of the things it is doing
66internally. The verbose output is not intended to be
67understandable to anyone but the author.
68
69.RE
70Less common options may be changed by the startup file (see
71FILES below).
72
73All the usual X and wish flags are supported (i.e., \-display,
74\-name). There are so many of them that to avoid colliding and
75make them easy to remember, all the multixterm flags begin
76with \-x.
77
78If any arguments do not match the flags above, the remainder of the
79command line is made available for user processing. By default, the
80remainder is used as a list of xterm names in the style of \-xn. The
81default behavior may be changed using the .multixtermrc file (see DOT
82FILE below).
83
84.SH "EXAMPLE COMMAND LINE ARGUMENTS"
85The following command line starts up two xterms using ssh to
86the hosts bud and dexter.
87
88 multixterm \-xc "ssh %n" bud dexter
89
90.SH FILES
91Command files may be used to drive or initialize multixterm.
92The File menu may be used to invoke other files. If files
93exist in the command file directory (see \-xd above), they will
94appear in the File menu. Files may also be loaded by using
95File->Open. Any filename is acceptable but the File->Open
96browser defaults to files with a .mxt suffix.
97
98Files are written in Tcl and may change any variables or
99invoke any procedures. The primary variables of interest are 'xtermCmd'
100which identifies the command (see \-xc) and 'xtermNames'
101which is a list of names (see \-xn). The procedure
102xtermStartAll, starts xterms for each name in the list. Other
103variables and procedures may be discovered by examining
104multixterm itself.
105
106.SH "EXAMPLE FILE"
107The following file does the same thing as the earlier example
108command line:
109.nf
110
111 # start two xterms connected to bud and dexter
112 set xtermCmd "ssh %n"
113 set xtermNames {bud dexter}
114 xtermStartAll
115
116.fi
117.SH "DOT FILE"
118At startup, multixterm reads ~/.multixtermrc if present. This
119is similar to the command files (see FILES above) except
120that .multixtermrc may not call xtermStartAll. Instead it is
121called implicitly, similar to the way that it is implicit in
122the command line use of \-xn.
123
124The following example .multixtermrc file makes every xterm run
125ssh to the hosts named on the command line.
126
127 set xtermCmd "ssh %n"
128
129Then multixterm could be called simply:
130
131 multixterm bud dexter
132
133If any command-line argument does not match a multixterm flag,
134the remainder of the command line is made available to .multixtermrc
135in the argv variable. If argv is non-empty when .multixtermrc returns, it is assigned to xtermNames unless xtermNames is non-empty in which case, the
136content of argv is ignored.
137
138Commands from multixterm are evaluated early in the
139initialization of multixterm. Anything that must be done late
140in the initialization (such as adding additional bindings to
141the user interface) may be done by putting the commands inside
142a procedure called "initLate".
143
144.SH MENUS
145Except as otherwise noted, the menus are self-explanatory.
146Some of the menus have dashed lines as the first entry.
147Clicking on the dashed lines will "tear off" the menus.
148
149.SH "USAGE SUGGESTION \- ALIASES AND COMMAND FILES"
150Aliases may be used to store lengthy command-line invocations.
151Command files can be also be used to store such invocations
152as well as providing a convenient way to share configurations.
153
154Tcl is a general-purpose language. Thus multixterm command
155files can be extremely flexible, such as loading hostnames
156from other programs or files that may change from day-to-day.
157In addition, command files can be used for other purposes.
158For example, command files may be used to prepared common
159canned interaction sequences. For example, the command to
160send the same string to all xterms is:
161
162 xtermSend "a particularly long string"
163
164The File menu (torn-off) makes canned sequences particularly
165convenient. Interactions could also be bound to a mouse button,
166keystroke, or added to a menu via the .multixtermrc file.
167
168The following .multixtermrc causes tiny xterms to tile across
169and down the screen. (You may have to adjust the parameters
170for your screen.) This can be very helpful when dealing with
171large numbers of xterms.
172.nf
173
174 set yPos 0
175 set xPos 0
176
177 trace variable xtermArgs r traceArgs
178
179 proc traceArgs {args} {
180 global xPos yPos
181 set ::xtermArgs "-geometry 80x12+$xPos+$yPos \-font 6x10"
182 if {$xPos} {
183 set xPos 0
184 incr yPos 145
185 if {$yPos > 800} {set yPos 0}
186 } else {
187 set xPos 500
188 }
189 }
190.fi
191
192The xtermArgs variable in the code above is the variable corresponding
193to the \-xa argument.
194
195xterms can be also be created directly. The following command file
196creates three xterms overlapped
197horizontally:
198.nf
199
200 set xPos 0
201 foreach name {bud dexter hotdog} {
202 set ::xtermArgs "-geometry 80x12+$xPos+0 \-font 6x10"
203 set ::xtermNames $name
204 xtermStartAll
205 incr xPos 300
206 }
207
208.fi
209.SH "USAGE SUGGESTION \- SELECTING HOSTS BY NICKNAME"
210The following .multixtermrc shows an example of changing the
211default handling of the arguments from hostnames to a filename
212containing hostnames:
213
214 set xtermNames [exec cat $argv]
215
216The following is a variation, retrieving the host names from
217the yp database:
218
219 set xtermNames [exec ypcat $argv]
220
221The following hardcodes two sets of hosts, so that you can
222call multixterm with either "cluster1" or "cluster2":
223.nf
224
225 switch $argv {
226 cluster1 {
227 set xtermNames "bud dexter"
228 }
229 cluster2 {
230 set xtermNames "frank hotdog weiner"
231 }
232 }
233
234.fi
235
236
237.SH COMPARE/CONTRAST
238It is worth comparing multixterm to xkibitz. Multixterm
239connects a separate process to each xterm. xkibitz connects
240the same process to each xterm.
241
242.SH LIMITATIONS
243
244Multixterm provides no way to remotely control scrollbars, resize, and
245most other window system related functions.
246
247Because xterm has no mechanism for propagating size information to
248external processes, particularly for character graphic applications
249(e.g., vi, emacs), you may have to manually ensure that the spawned
250process behind each xterm has the correct size. For example, if you
251create or set the xterm to a size, you may have to send an explicit
252stty command with the correct size to the spawned process(es).
253Alternatively, you can add the correct size argument when an xterm is
254created (i.e., "-geometry 80x20").
255
256Multixterm can only control new xterms that multixterm itself has
257started.
258
259As a convenience, the File menu shows a limited number of
260files. To show all the files, use File->Open.
261
262.SH FILES
263$DOTDIR/.multixtermrc initial command file
264.br
265~/.multixtermrc fallback command file
266.br
267~/lib/multixterm/ default command file directory
268
269.SH BUGS
270If multixterm is killed using an uncatchable kill, the xterms
271are not killed. This appears to be a bug in xterm itself.
272
273Send/expect sequences can be done in multixterm command files.
274However, due to the richness of the possibilities, to document
275it properly would take more time than the author has at present.
276
277.SH REQUIREMENTS
278Requires Expect 5.36.0 or later.
279.br
280Requires Tk 8.3.3 or later.
281
282.SH VERSION
283This man page describes version 1.8 of multixterm.
284
285The latest version of multixterm is available from
286http://expect.nist.gov/example/multixterm . If your version of Expect
287and Tk are too old (see REQUIREMENTS above), download a new version of
288Expect from http://expect.nist.gov
289
290.SH DATE
291April 30, 2002
292
293.SH AUTHOR
294Don Libes <don@libes.com>
295
296.SH LICENSE
297Multixterm is in the public domain; however the author would
298appreciate acknowledgement if multixterm or parts of it or ideas from
299it are used.