1MULTIXTERM(1)               General Commands Manual              MULTIXTERM(1)
2
3
4

NAME

6       multixterm - drive multiple xterms separately or together
7

SYNOPSIS

9       multixterm [ args ]
10

DESCRIPTION

12       Multixterm creates multiple xterms that can be driven together or sepa‐
13       rately.
14
15       In its simplest form, multixterm is run with no arguments and  commands
16       are  interactively  entered in the first entry field.  Press return (or
17       click the "new xterm" button) to create a new xterm running  that  com‐
18       mand.
19
20       Keystrokes  in  the "stdin window" are redirected to all xterms started
21       by multixterm.  xterms may be driven separately simply by  focusing  on
22       them.
23
24       The  stdin  window must have the focus for keystrokes to be sent to the
25       xterms.  When it has the focus, the color changes  to  aquamarine.   As
26       characters  are entered, the color changes to green for a second.  This
27       provides feedback since characters are not echoed in the stdin window.
28
29       Typing in the stdin window while holding down  the  alt  or  meta  keys
30       sends  an  escape character before the typed characters.  This provides
31       support for programs such as emacs.
32
33

ARGUMENTS

35              -xa The optional -xa argument indicates  arguments  to  pass  to
36                  xterm.
37
38
39              -xc The  optional  -xc argument indicates a command to be run in
40                  each named xterm (see -xn).  With no -xc argument, the  com‐
41                  mand is the current shell.
42
43
44              -xd The  optional  -xd  argument indicates a directory to search
45                  for files that will appear in the Files menu.   By  default,
46                  the directory is: ~/lib/multixterm
47
48
49              -xf The  optional  -xf  argument  indicates a file to be read at
50                  startup.  See FILES below for more info.
51
52
53              -xn The optional -xn argument indicates a name for  each  xterm.
54                  This name will also be substituted for any %n in the command
55                  argument (see -xc).
56
57
58              -xv The optional -xv flag puts multixterm into  a  verbose  mode
59                  where it will describe some of the things it is doing inter‐
60                  nally.  The verbose output is not intended to be understand‐
61                  able to anyone but the author.
62
63       Less  common  options  may  be  changed  by the startup file (see FILES
64       below).
65
66       All the usual X and wish flags are supported (i.e.,  -display,  -name).
67       There are so many of them that to avoid colliding and make them easy to
68       remember, all the multixterm flags begin with -x.
69
70       If any arguments do not match the flags above,  the  remainder  of  the
71       command  line  is  made available for user processing.  By default, the
72       remainder is used as a list of xterm names in the style  of  -xn.   The
73       default  behavior  may be changed using the .multixtermrc file (see DOT
74       FILE below).
75
76

EXAMPLE COMMAND LINE ARGUMENTS

78       The following command line starts up two xterms using ssh to the  hosts
79       bud and dexter.
80
81            multixterm -xc "ssh %n" bud dexter
82
83

FILES

85       Command  files may be used to drive or initialize multixterm.  The File
86       menu may be used to invoke other files.  If files exist in the  command
87       file  directory  (see  -xd  above),  they will appear in the File menu.
88       Files may also be loaded by using File->Open.  Any filename is  accept‐
89       able but the File->Open browser defaults to files with a .mxt suffix.
90
91       Files  are  written  in  Tcl and may change any variables or invoke any
92       procedures.  The primary variables of  interest  are  'xtermCmd'  which
93       identifies  the  command  (see -xc) and 'xtermNames' which is a list of
94       names (see -xn).  The procedure xtermStartAll, starts xterms  for  each
95       name  in the list.  Other variables and procedures may be discovered by
96       examining multixterm itself.
97
98

EXAMPLE FILE

100       The following file does the same thing as the earlier  example  command
101       line:
102
103            # start two xterms connected to bud and dexter
104            set xtermCmd "ssh %n"
105            set xtermNames {bud dexter}
106            xtermStartAll
107
108

DOT FILE

110       At startup, multixterm reads ~/.multixtermrc if present.  This is simi‐
111       lar to the command files (see FILES above)  except  that  .multixtermrc
112       may  not  call xtermStartAll.  Instead it is called implicitly, similar
113       to the way that it is implicit in the command line use of -xn.
114
115       The following example .multixtermrc file makes every xterm run  ssh  to
116       the hosts named on the command line.
117
118            set xtermCmd "ssh %n"
119
120       Then multixterm could be called simply:
121
122            multixterm bud dexter
123
124       If  any  command-line  argument  does  not match a multixterm flag, the
125       remainder of the command line is made available to .multixtermrc in the
126       argv  variable.  If argv is non-empty when .multixtermrc returns, it is
127       assigned to xtermNames unless xtermNames is non-empty  in  which  case,
128       the content of argv is ignored.
129
130       Commands  from  multixterm are evaluated early in the initialization of
131       multixterm.  Anything that must be  done  late  in  the  initialization
132       (such  as adding additional bindings to the user interface) may be done
133       by putting the commands inside a procedure called "initLate".
134
135
137       Except as otherwise noted, the menus are self-explanatory.  Some of the
138       menus  have  dashed  lines  as the first entry.  Clicking on the dashed
139       lines will "tear off" the menus.
140
141

USAGE SUGGESTION - ALIASES AND COMMAND FILES

143       Aliases may be used to store lengthy command-line invocations.  Command
144       files  can be also be used to store such invocations as well as provid‐
145       ing a convenient way to share configurations.
146
147       Tcl is a general-purpose language.  Thus multixterm command  files  can
148       be extremely flexible, such as loading hostnames from other programs or
149       files that may change from day-to-day.  In addition, command files  can
150       be  used for other purposes.  For example, command files may be used to
151       prepared common canned interaction sequences.  For example, the command
152       to send the same string to all xterms is:
153
154           xtermSend "a particularly long string"
155
156       The  File  menu  (torn-off)  makes canned sequences particularly conve‐
157       nient.  Interactions could also be bound to a mouse button,  keystroke,
158       or added to a menu via the .multixtermrc file.
159
160       The  following .multixtermrc causes tiny xterms to tile across and down
161       the screen.  (You may have to adjust the parameters for  your  screen.)
162       This can be very helpful when dealing with large numbers of xterms.
163
164           set yPos 0
165           set xPos 0
166
167           trace variable xtermArgs r traceArgs
168
169           proc traceArgs {args} {
170               global xPos yPos
171               set ::xtermArgs "-geometry 80x12+$xPos+$yPos -font 6x10"
172               if {$xPos} {
173                   set xPos 0
174                   incr yPos 145
175                   if {$yPos > 800} {set yPos 0}
176               } else {
177                   set xPos 500
178               }
179           }
180
181       The  xtermArgs variable in the code above is the variable corresponding
182       to the -xa argument.
183
184       xterms can be also be created directly.   The  following  command  file
185       creates three xterms overlapped horizontally:
186
187           set xPos 0
188           foreach name {bud dexter hotdog} {
189               set ::xtermArgs "-geometry 80x12+$xPos+0 -font 6x10"
190               set ::xtermNames $name
191               xtermStartAll
192               incr xPos 300
193           }
194
195

USAGE SUGGESTION - SELECTING HOSTS BY NICKNAME

197       The  following  .multixtermrc  shows an example of changing the default
198       handling of the arguments from hostnames to a filename containing host‐
199       names:
200
201            set xtermNames [exec cat $argv]
202
203       The  following  is  a  variation, retrieving the host names from the yp
204       database:
205
206            set xtermNames [exec ypcat $argv]
207
208       The following hardcodes two sets of hosts, so that you can call multix‐
209       term with either "cluster1" or "cluster2":
210
211            switch $argv {
212                   cluster1 {
213                       set xtermNames "bud dexter"
214                   }
215                   cluster2 {
216                       set xtermNames "frank hotdog weiner"
217                   }
218               }
219
220
221
222

COMPARE/CONTRAST

224       It  is  worth  comparing  multixterm to xkibitz.  Multixterm connects a
225       separate process to each xterm.  xkibitz connects the same  process  to
226       each xterm.
227
228

LIMITATIONS

230       Multixterm  provides no way to remotely control scrollbars, resize, and
231       most other window system related functions.
232
233       Because xterm has no mechanism  for  propagating  size  information  to
234       external  processes,  particularly  for  character graphic applications
235       (e.g., vi, emacs), you may have to manually  ensure  that  the  spawned
236       process  behind  each  xterm has the correct size.  For example, if you
237       create or set the xterm to a size, you may have  to  send  an  explicit
238       stty  command with the correct size to the spawned process(es).  Alter‐
239       natively, you can add the correct size argument when an xterm  is  cre‐
240       ated (i.e., "-geometry 80x20").
241
242       Multixterm  can  only  control  new  xterms  that multixterm itself has
243       started.
244
245       As a convenience, the File menu shows a limited number  of  files.   To
246       show all the files, use File->Open.
247
248

FILES

250       $DOTDIR/.multixtermrc   initial command file
251       ~/.multixtermrc         fallback command file
252       ~/lib/multixterm/       default command file directory
253
254

BUGS

256       If  multixterm  is killed using an uncatchable kill, the xterms are not
257       killed.  This appears to be a bug in xterm itself.
258
259       Send/expect sequences can be done in multixterm  command  files.   How‐
260       ever, due to the richness of the possibilities, to document it properly
261       would take more time than the author has at present.
262
263

REQUIREMENTS

265       Requires Expect 5.36.0 or later.
266       Requires Tk 8.3.3 or later.
267
268

VERSION

270       This man page describes version 1.8 of multixterm.
271
272       The    latest    version    of    multixterm    is    available    from
273       http://expect.nist.gov/example/multixterm  .  If your version of Expect
274       and Tk are too old (see REQUIREMENTS above), download a new version  of
275       Expect from http://expect.nist.gov
276
277

DATE

279       April 30, 2002
280
281

AUTHOR

283       Don Libes <don@libes.com>
284
285

LICENSE

287       Multixterm is in the public domain; however the author would appreciate
288       acknowledgement if multixterm or parts of it or ideas from it are used.
289
290
291
292                                16 August 2002                   MULTIXTERM(1)
Impressum