DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T s

⟦e2cb7d59d⟧ TextFile

    Length: 14608 (0x3910)
    Types: TextFile
    Names: »screen.1«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/euug-87hel/sec1/screen/screen.1« 

TextFile

.if n .ds Q \&"
.if n .ds U \&"
.if t .ds Q ``
.if t .ds U ''
.TH SCREEN 1 "2 March 1987"
.UC 4
.SH NAME
screen \- screen manager with VT100/ANSI terminal emulation
.SH SYNOPSIS
.B screen
[
.B \-a
] [
.B \-e\fIxy\fP
] [
.B \-c \fIcmd args\fP ]
.ta .5i 1.8i
.SH DESCRIPTION
.I screen
is a full-screen window manager that
multiplexes a physical terminal between several processes (typically
interactive shells).  Each virtual terminal provides the functions
of the DEC VT100 terminal and, in addition, several control functions
from the ANSI X3.64 (ISO 6429) standard (e.g. insert/delete line).
.PP
When
.I screen
is called, it creates a single window with a shell; the pathname of the
shell is taken from the environment symbol $SHELL; if this is not
defined, \*Q/bin/sh\*U is used.
New windows can be created at any time by calling
.I screen
with the 
.B -c
option from within a previously created window;
.B -c
is followed by the full pathname of the program to start in the newly
created window and, optionally, arguments to the program.
For instance,
.IP
screen -c /bin/csh
.PP
will create a window with a C-Shell and switch to that window.
When the process associated with the currently displayed window
terminates (e.g. ^D has been typed to a shell),
.I screen
switches to the previously displayed window;
when no more windows are left,
.I screen
exits.
.SH "COMMAND KEYS"
An easier way to create a new window is to type \*QC-a c\*U (the notation
\*QC-x\*U will be used as a shorthand for Control-x in this manual; x is
an arbitrary letter).
\*QC-a c\*U creates a new window running a shell and switches to that
window immediately, regardless of the state of the process running
in the current window.
.I Screen
recognizes several such commands; each command consists of
\*QC-a\*U followed by a one-letter function.
For convenience, the letter after a \*QC-a\*U can be entered both with or
without the control key pressed (with the exception of
\*QC-a C-a\*U and \*QC-a a\*U; see below), thus, \*QC-a c\*U as well as
\*QC-a C-c\*U can be used to create a window.
.PP
The following commands are recognized by
.IR screen :
.IP "\fBC-a c\fP or \fBC-a C-c\fP"
Create a new window with a shell and switch to that window.
.IP "\fBC-a k\fP or \fBC-a C-k\fP"
Kill the current window and switch to the previously displayed window.
.IP "\fBC-a C-a\fP\0\0\0\0\0"
Switch to the previously displayed window.
.IP "\fBC-a 0\fP to \fBC-a 9\fP"
Switch to the window with the number 0 (1, 2, .., 9, respectively).
When a new window is established, the first available number from the
range 0..9 is assigned to this window.
Thus, the first window can be activated by \*QC-a 0\*U; at most
10 windows can be present at any time.
.IP "\fBC-a space\fP or \fBC-a C-space\fP or \fBC-a n\fP or \fBC-a C-n\fP"
Switch to the next window.  This function can be used repeatedly to
cycle through the list of windows.
(Control-space is not supported by all terminals.)
.IP "\fBC-a p\fP or \fBC-a C-p\fP or \fBC-a -\fP"
Switch to the previous window (the opposite of \fBC-a space\fP).
.IP "\fBC-a l\fP or \fBC-a C-l\fP"
Redisplay the current window.
.IP "\fBC-a z\fP or \fBC-a C-z\fP"
Suspend
.IR screen .
.IP "\fBC-a h\fP or \fBC-a C-h\fP"
Write a hardcopy of the current window to the file \*Qhardcopy.\fIn\fP\*U
in the directory in which
.I screen
was called, where \fIn\fP is the number of the current window.
.IP "\fBC-a w\fP or \fBC-a C-w\fP"
Display a list of all windows.
For each window, the number of the window and the process that has been
started in the window is displayed; the current window is marked with a
`*'.
.IP "\fBC-a v\fP or \fBC-a C-v\fP"
Display the version.
.IP "\fBC-a a\fP\0\0\0\0\0"
Send the character \*QC-a\*U to the processes running in the window.
.IP
.PP
The
.B -e
option can be used to specify a different command character and
a character which, when typed immediately after the command character,
generates a literal command character.
The defaults for these two characters are \*QC-a\*U and `a'.
(Note that the function to switch to the previous window is actually the
command character typed twice; for instance, when
.I screen
is called with the option \*Q\fB-e]x\fP\*U (or \*Q\fB-e ]x\fP\*U),
this function becomes \*Q]]\*U).
.SH CUSTOMIZATION
When
.I screen
is invoked, it executes initialization commands from the file `.screenrc'
in the user's home directory.
Commands in `.screenrc' are mainly used to automatically
establish a number of windows each time
.I screen
is called, and to bind functions to specific keys.
Each line in `.screenrc' contains one initialization command; lines
starting with `#' are ignored.
Commands can have arguments; arguments are separated by tabs and spaces
and can be surrounded by single quotes or double quotes.
.PP
The following initialization commands are recognized by
.IR screen :
.PP
.ne 3
.B "escape \fIxy\fP"
.PP
Set the command character to \fIx\fP and the character generating a literal
command character to \fIy\fP (see the -e option above).
.PP
.ne 3
.B "screen [\fIn\fP] [\fIcmds args\fP]"
.PP
Establish a window.
If an optional number \fIn\fP in the range 0..9 is given, the window
number \fIn\fP is assigned to the newly created window (or, if this
number is already in use, the next higher number).
Note that \fIn\fP has a value of zero for the standard shell window
created after `.screenrc' has been read.
If a command is specified after `screen', this command (with the given
arguments) is started in the window; if no command is given, a shell
is created in the window.
Thus, if your `.screenrc' contains the lines
.PP
.nf
	# example for .screenrc:
	screen 1
	screen 2 /usr/ucb/telnet foobar
.fi
.PP
.I screen
creates a shell window (window #1), a window with a TELNET connection
to the machine foobar (window #2), and, finally, a second shell window
(the default window) which gets a window number of zero.
When the initialization is completed,
.I screen
always switches to the default window, so window #0 is displayed
when the above `.screenrc' is used.
.PP
.ne 3
.B "bind \fIkey\fP [\fIfunction\fP | \fIcmd args\fP]"
.PP
Bind a function to a key.
By default, each function provided by
.I screen
is bound to one or more keys as indicated by the above table, e.g. the
function to create a new window is bound to \*QC-c\*U and \*Qc\*U.
The `bind' command can be used to redefine the key bindings and to
define new bindings.
The \fIkey\fP
argument is either a single character, a sequence of the form
\*Q^x\*U meaning \*QC-x\*U, or an octal number specifying the
ASCII code of the character.
If no further argument is given, any previously established binding
for this key is removed.
The \fIfunction\fP argument can be one of the following keywords:
.PP
.nf
	shell	Create new window with a shell
	kill	Kill the current window
	other	Switch to previously displayed window
	next	Switch to the next window
	prev	Switch to the previous window
	redisplay	Redisplay current window
	hardcopy	Make hardcopy of current window
	suspend	Suspend \fIscreen\fP
	windows	Display list of window
	version	Display the version
	select0	Switch to window #0
	\0\0...
	select9	Switch to window #9
.fi
.PP
In addition, a key can be bound such that a window is created running
a different command than the shell when that key is pressed.
In this case, the pathname of the command optionally followed by
arguments must be given instead of one of the above-listed keywords;
the pathname must start with a `/'.
For example, the commands
.PP
.nf
	bind ' ' windows
	bind ^f /usr/ucb/telnet foobar
	bind 033 /bin/su
.fi
.PP
would bind the space key to the function that displays a list
of windows (that is, the function usually invoked by \*QC-a C-w\*U
or \*QC-a w\*U would also be available as \*QC-a space\*U),
bind \*QC-f\*U to the function \*Qcreate a window with a TELNET
connection to foobar\*U, and bind \*Qescape\*U to the function
that creates a window with a super-user shell.
.SH "VIRTUAL TERMINAL"
.I Screen
prints error messages and other diagnostics in a \fImessage line\fP above
the bottom of the screen.
The message line is removed when a key is pressed or, automatically,
after a couple of seconds.
The message line facility can be used by an application running in
the current window by means of the ANSI \fIPrivacy message\fP
control sequence (for instance, from within the shell, something like
.IP
echo '^[^Hello world^[\e'   (where ^[ is an \fIescape\fP)
.PP
can be used to display a message line.
.PP
.I
Screen
never writes in the last position of the screen, unless the boolean
capability `LP' is found in the termcap entry of the terminal.
Usually,
.I screen
cannot predict whether or not a particular terminal scrolls when
a character is written in the last column of the last line;
`LP' indicates that it is safe to write in this position.
Note that the `LP' capability is independent of `am' (automatic
margins); for certain terminals, such as the VT100, it is reasonable
to set `am' as well as `LP' in the corresponding termcap entry
(the VT100 does not move the cursor when a character is written in
the last column of each line).
.PP
.I Screen
puts into the environment of each process started in a newly created
window the symbols \*QWINDOW=\fIn\fP\*U (where \fIn\fP is the number
of the respective window), \*QTERM=screen\*U, and a TERMCAP variable
reflecting the capabilities of the virtual terminal emulated by
.IR screen .
The actual set of capabilities supported by the virtual terminal
depends on the capabilities supported by the physical terminal.
If, for instance, the physical terminal does not support standout mode,
.I screen
does not put the `so' and `se' capabilities into the window's TERMCAP
variable, accordingly. 
However, a minimum number of capabilities must be supported by a
terminal in order to run
.IR screen ,
namely scrolling, clear screen, and direct cursor addressing
(in addition,
.I screen
does not run on hardcopy terminals or on terminals that overstrike).
.PP
Some capabilities are only put into the TERMCAP
variable of the virtual terminal if they can be efficiently
implemented by the physical terminal.
For instance, `dl' (delete line) is only put into the TERMCAP
variable if the terminal supports either delete line itself or
scrolling regions.
If
.I screen
is called with the
.B -a
option, \fIall\fP capabilities are put into the environment,
even if
.I screen
must redraw parts of the display in order to implement a function.
.PP
The following is a list of control sequences recognized by
.IR screen .
\*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI-specific
functions, respectively.
.PP
.nf
.TP 20
.B "ESC E"
	Next Line
.TP 20
.B "ESC D"
	Index
.TP 20
.B "ESC M"
	Reverse Index
.TP 20
.B "ESC H"
	Horizontal Tab Set
.TP 20
.B "ESC 7"
(V)	Save Cursor and attributes
.TP 20
.B "ESC 8"
(V)	Restore Cursor and Attributes
.TP 20
.B "ESC c"
	Reset to Initial State
.TP 20
.B "ESC ="
(V)	Application Keypad Mode
.TP 20
.B "ESC >"
(V)	Numeric Keypad Mode
.TP 20
.B "ESC # 8"
(V)	Fill Screen with E's
.TP 20
.B "ESC \e"
(A)	String Terminator
.TP 20
.B "ESC ^"
(A)	Privacy Message (Message Line)
.TP 20
.B "ESC P"
(A)	Device Control String (not used)
.TP 20
.B "ESC _"
(A)	Application Program Command (not used)
.TP 20
.B "ESC ]"
(A)	Operating System Command (not used)
.TP 20
.B "ESC [ Pn ; Pn H"
	Direct Cursor Addressing
.TP 20
.B "ESC [ Pn ; Pn f"
	Direct Cursor Addressing
.TP 20
.B "ESC [ Pn J"
	Erase in Display
.TP 20
\h'\w'ESC 'u'Pn = None or \fB0\fP
	From Cursor to End of Screen
.TP 20
\h'\w'ESC 'u'\fB1\fP
	From Beginning of Screen to Cursor
.TP 20
\h'\w'ESC 'u'\fB2\fP
	Entire Screen
.TP 20
.B "ESC [ Pn K"
	Erase in Line
.TP 20
\h'\w'ESC 'u'Pn = None or \fB0\fP
	From Cursor to End of Line
.TP 20
\h'\w'ESC 'u'\fB1\fP
	From Beginning of Line to Cursor
.TP 20
\h'\w'ESC 'u'\fB2\fP
	Entire Line
.TP 20
.B "ESC [ Pn A"
	Cursor Up
.TP 20
.B "ESC [ Pn B"
	Cursor Down
.TP 20
.B "ESC [ Pn C"
	Cursor Right
.TP 20
.B "ESC [ Pn D"
	Cursor Left
.TP 20
.B "ESC [ Ps ;...; Ps m"
	Select Graphic Rendition
.TP 20
\h'\w'ESC 'u'Ps = None or \fB0\fP
	Default Rendition
.TP 20
\h'\w'ESC 'u'\fB1\fP
	Bold
.TP 20
\h'\w'ESC 'u'\fB2\fP
(A)	Faint
.TP 20
\h'\w'ESC 'u'\fB3\fP
(A)	\fIStandout\fP Mode (ANSI: Italicised)
.TP 20
\h'\w'ESC 'u'\fB4\fP
	Underlined
.TP 20
\h'\w'ESC 'u'\fB5\fP
	Blinking
.TP 20
\h'\w'ESC 'u'\fB7\fP
	Negative Image
.TP 20
\h'\w'ESC 'u'\fB22\fP
(A)	Normal Intensity
.TP 20
\h'\w'ESC 'u'\fB23\fP
(A)	\fIStandout\fP Mode off (ANSI: Italicised off)
.TP 20
\h'\w'ESC 'u'\fB24\fP
(A)	Not Underlined
.TP 20
\h'\w'ESC 'u'\fB25\fP
(A)	Not Blinking
.TP 20
\h'\w'ESC 'u'\fB27\fP
(A)	Positive Image
.TP 20
.B "ESC [ Pn g"
	Tab Clear
.TP 20
\h'\w'ESC 'u'Pn = None or \fB0\fP
	Clear Tab at Current Position
.TP 20
\h'\w'ESC 'u'\fB3\fP
	Clear All Tabs
.TP 20
.B "ESC [ Pn ; Pn r"
(V)	Set Scrolling Region
.TP 20
.B "ESC [ Pn I"
(A)	Horizontal Tab
.TP 20
.B "ESC [ Pn Z"
(A)	Backward Tab
.TP 20
.B "ESC [ Pn L"
(A)	Insert Line
.TP 20
.B "ESC [ Pn M"
(A)	Delete Line
.TP 20
.B "ESC [ Pn @"
(A)	Insert Character
.TP 20
.B "ESC [ Pn P"
(A)	Delete Character
.TP 20
.B "ESC [ Ps  ;...; Ps h"
	Set Mode
.TP 20
.B "ESC [ Ps  ;...; Ps l"
	Reset Mode
.TP 20
\h'\w'ESC 'u'Ps = \fB4\fP
(A)	Insert Mode
.TP 20
\h'\w'ESC 'u'\fB?5\fP
(V)	Visible Bell (\fIOn\fP followed by \fIOff\fP)
.TP 20
\h'\w'ESC 'u'\fB?6\fP
(V)	\fIOrigin\fP Mode
.TP 20
\h'\w'ESC 'u'\fB?7\fP
(V)	\fIWrap\fP Mode
.fi
.SH FILES
.nf
.ta 2i
$(HOME)/.screenrc	\fIscreen\fP initialization commands
.br
$(HOME)/.screen	Directory created by \fIscreen\fP
.br
$(HOME)/.screen/\fItty\fP	Socket created by \fIscreen\fP
.br
hardcopy.[0-9]	Screen images created by the hardcopy function
.br
/etc/termcap	Terminal capability data base
.fi
.SH "SEE ALSO"
termcap(5)
.SH AUTHOR
Oliver Laumann
.SH BUGS
Standout mode is not cleared before newline or cursor addressing.
.PP
If `LP' is not set but `am' is set, the last character in the last line is never
written, and it is not correctly re-displayed when the screen is
scrolled up or when a character is deleted in the last line.
.PP
The VT100 \*Qwrap around with cursor addressing\*U bug is not compensated
when
.I screen
is running on a VT100.
.PP
`AL,' `DL', and similar parameterized capabilities are not used if present.
.PP
`dm' (delete mode), `xn', and `xs' are not handled
correctly (they are ignored). 
.PP
Different character sets are not supported.
.PP
`ms' is not advertised in the termcap entry (in order to compensate
a bug in
.IR curses (3X)).
.PP
Scrolling regions are only emulated if the physical terminal supports
scrolling regions.
.PP
.I Screen
does not make use of hardware tabs.