DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

layers(C)


layers -- layer multiplexer for windowing terminals

Syntax

layers [ -s ] [ -t ] [ -d ] [ -p ] [ -f file ] [ layersys-prgm ]

Description

The layers command manages asynchronous windows (see layers(M)) on a windowing terminal. On invocation, layers finds an unused xt(HW) channel group and associates it with the terminal line on its standard output. It then waits for commands from the terminal.

To use layers, you must have configured the xt driver. This is done using the mkdev layers script. For more information, see mkdev(ADM).

The options are as follows:


-s
Reports 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(ADM).

-t
Turns on xt 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(ADM).

-d
If a firmware patch has been downloaded, prints 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, prints the downloading protocol statistics and a trace on standard error.

-f file
Starts 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

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 /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 will get that shell, otherwise, /bin/sh will be used. In order to enable communications with other users via write(C), layers invokes the command relogin(ADM) when the first layer is created. relogin will reassign that layer as the user's logged-in terminal. An alternative layer can be designated by using relogin directly. layers will restore the original assignment on termination.

Layers are created, deleted, reshaped, and otherwise manipulated in a terminal-dependent manner. For instance, the AT&T TELETYPE 5620 DMD terminal provides a mouse-activated pop-up menu of layer operations. The method of ending a layers session is also defined by the terminal.

Examples

layers -f startup

where startup contains:

   8 8 700 200 date ; pwd ; exec $SHELL
   8 300 780 850 exec $SHELL

Limitations

The xt 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 configuration option on your windowing terminal or by setting the environment variable DMDLOAD to the value hex before running layers:

export DMDLOAD; DMDLOAD=hex

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.

When invoking layers with the -s, -t, -d, or -p options, it is best to redirect standard error to another file to save the statistics and tracing output (for example, layers -s 2>stats); otherwise all or some of the output may be lost.

Files


/dev/xt??[0-7]

/usr/lib/layersys/lsys.8;7;3

/usr/lib/layersys/lsys.8;?;?

See also

layers(M), libwindows(S), mkdev(ADM), relogin(ADM), sh(C), write(C), wtinit(ADM), xt(HW), xts(ADM), xtt(ADM)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003