layers(1) (AT&T Windowing Utilities) layers(1)
NAME
layers - layer multiplexor for windowing terminals
SYNOPSIS
layers [-s] [-t] [-D [-m max-pkt] [-d] [-p] [-h modlist] [-f file]
[layersys-prgm]
DESCRIPTION
layers manages asynchronous windows [see layers(5)] on a windowing
terminal. Upon invocation, layers finds an unused xt(7) channel
group and associates it with the terminal line on its standard
output. It then waits for commands from the terminal.
Command-line options:
-s Report protocol statistics on standard error at the end of
the session after you exit from layers. The statistics may be
printed during a session by invoking the program xts(1M).
-t Turn on xt(7) driver packet tracing, and produces a trace
dump on standard error at the end of the session after you
exit from layers. The trace dump may be printed during a
session by invoking the program xtt(1M).
-D Send debugging messages to standard error.
-m max-pkt
Set maximum size for the data part of regular xt packets sent
from the host to the terminal. Legal values are 32 to 252.
This option also implies that regular rather than network xt
protocol should be used. See xtproto(5).
-d If a firmware patch has been downloaded, print out the sizes
of the text, data, and bss portions of the firmware patch on
standard error.
-p If a firmware patch has been downloaded, print the down-
loading protocol statistics and a trace on standard error.
-h modlist
Push a list of STREAMS modules separated by a comma on a
layer.
-f file Start layers with an initial configuration specified by file.
Each line of the file represents a layer to be created, and
has the following format:
origin_x origin_y corner_x corner_y command_list
7/91 Page 1
layers(1) (AT&T Windowing Utilities) layers(1)
The coordinates specify the size and position of the layer on
the screen in the terminal's coordinate system. If all four
are 0, the user must define the layer interactively.
command_list, a list of one or more commands, must be
provided. It is executed in the new layer using the user's
shell (by executing: $SHELL -i -c "command_list"). This
means that the last command should invoke a shell, such as
/usr/bin/sh. (If the last command is not a shell, then, when
the last command has completed, the layer will not be
functional.)
layersys-prgm
A file containing a firmware patch that the layers command
downloads to the terminal before layers are created and
command_list is executed.
Each layer is in most ways functionally identical to a separate
terminal. Characters typed on the keyboard are sent to the standard
input of the UNIX system process attached to the current layer
(called the host process), and characters written on the standard
output by the host process appear in that layer. When a layer is
created, a separate shell is established and bound to the layer. If
the environment variable SHELL is set, the user gets that shell:
otherwise, /usr/bin/sh is used. In order to enable communications
with other users via write(1), layers invokes the command relogin(1M)
when the first layer is created. relogin(1M) will reassign that
layer as the user's logged-in terminal. An alternative layer can be
designated by using relogin(1M) directly. layers will restore the
original assignment on termination.
Layers are created, deleted, reshaped, and otherwise manipulated in a
terminal-dependent manner. The method of ending a layers session is
also defined by the terminal.
If a user wishes to take advantage of a terminal-specific application
software package, the environment variable DMD should be set to the
path name of the directory where the package was installed.
Otherwise DMD should not be set.
EXAMPLES
A typical startup command is:
layers -f startup
where startup contains
8 8 700 200 date ; pwd ; exec $SHELL
8 300 780 850 exec $SHELL
Page 2 7/91
layers(1) (AT&T Windowing Utilities) layers(1)
The command
layers -h FILTER,LDTERM
pushes the STREAMS modules FILTER and LDTERM on each layer that is
opened.
FILES
/dev/xt/??[0-7]
/usr/lib/layersys/lsys.8;7;3
$DMD/lib/layersys/lsys.8;?;?
SEE ALSO
ismpx(1), jterm(1), jwin(1), sh(1), write(1).
relogin(1M), wtinit(1M), xts(1M), xtt(1M), jagent(5), layers(5),
xtproto(5), and xt(7).
libwindows(3X) in the Programmer's Reference Manual.
NOTES
The xt(7) driver supports an alternate data transmission scheme known
as ENCODING MODE. This mode makes layers operation possible even
over data links which intercept control characters or do not transmit
8-bit characters. ENCODING MODE is selected either by setting a
setup option on your windowing terminal or by setting the environment
variable DMDLOAD to the value hex before running layers:
DMDLOAD=hex; export DMDLOAD
If, after executing layers -f file, the terminal does not respond in
one or more of the layers, often the last command in the command_list
for that layer did not invoke a shell.
To access this version of layers, make sure /usr/bin appears before
any other directory, such as $DMD/bin, you have in your path that
contains a layers program. [For information about defining the shell
environmental variable PATH in your .profile, see profile(4).]
Otherwise, if there is a terminal-dependent version of layers, you
may get it instead of the correct one.
layers sends all debugging and error messages to standard error.
Therefore, when invoking layers with the -D, -d, or -p option, it is
necessary to redirect standard error to a file. For example,
layers -D 2>layers.msgs
If layers encounters an error condition and standard error is not
redirected, the last error encountered will be printed when the
layers commands exits.
7/91 Page 3
layers(1) (AT&T Windowing Utilities) layers(1)
When using layers the mimimum acceptable baud rate is 1200. Behavior
of layers is unpredictable when using baud rate below 1200.
When using V7/BSD/Xenix applications (e.g., the jim editor) layers
should be invoked as
layers -h ldterm,ttcompat
This pushes the ttcompat module on each window and converts the BSD
interface into the termio(7) interface.
Page 4 7/91