Debian Codegraph @

upstream/debian-unstable/man1/expect_multixterm.1

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