home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume26
/
screen-3.5
/
part09
< prev
next >
Wrap
Text File
|
1993-07-25
|
86KB
|
2,633 lines
Newsgroups: comp.sources.unix
From: mlschroe@immd4.informatik.uni-erlangen.de (Michael Schroeder)
Subject: v26i308: screen-3.5 - screen manager with VT100/ANSI terminal emulation, V3.5, Part09/10
Sender: unix-sources-moderator@gw.home.vix.com
Approved: vixie@gw.home.vix.com
Submitted-By: mlschroe@immd4.informatik.uni-erlangen.de (Michael Schroeder)
Posting-Number: Volume 26, Issue 308
Archive-Name: screen-3.5/part09
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 9 (of 10)."
# Contents: doc/screen.1
# Wrapped by vixie@gw.home.vix.com on Sun Jul 25 12:57:26 1993
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'doc/screen.1' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'doc/screen.1'\"
else
echo shar: Extracting \"'doc/screen.1'\" \(82010 characters\)
sed "s/^X//" >'doc/screen.1' <<'END_OF_FILE'
X.if n .ds Q \&"
X.if n .ds U \&"
X.if t .ds Q ``
X.if t .ds U ''
X.TH SCREEN 1 "13 May 1993"
X.UC 4
X.SH NAME
Xscreen \- screen manager with VT100/ANSI terminal emulation
X
X
X.SH SYNOPSIS
X.B screen
X[
X.B \-\fIoptions\fP
X] [
X.B \fIcmd\fP
X[
X.B \fIargs\fP
X] ]
X.br
X.B screen \-r
X[ [\fIpid.\fP]\fItty\fP[\fI.host\fP] ]
X.ta .5i 1.8i
X
X
X.SH DESCRIPTION
X.I Screen
Xis a full-screen window manager that
Xmultiplexes a physical terminal between several processes (typically
Xinteractive shells).
XEach virtual terminal provides the functions
Xof a DEC VT100 terminal and, in addition, several control functions
Xfrom the ANSI X3.64 (ISO 6429) and ISO 2022 standards
X(e.\|g. insert/delete line and support for multiple character sets).
XThere is a scrollback history buffer for each virtual terminal and a
Xcopy-and-paste mechanism that allows moving text regions between
Xwindows.
X.PP
XThe name of this program was changed to
X.I iScreen
Xto be able to distinguish it from Oliver Laumann's original
X.I screen
Xprogram. Despite that fact, this manual will continue to use the name
X.IR screen .
XThis is because the binary is often installed as 'screen'.
X.PP
XWhen
X.I screen
Xis called, it creates a single window with a shell in it (or the specified
Xcommand) and then gets out of your way so that you can use the program as you
Xnormally would.
XThen, at any time, you can create new (full-screen) windows with other programs
Xin them (including more shells), kill existing windows, view a list of
Xwindows, turn output logging on and off, copy-and-paste text between
Xwindows, view the scrollback history, switch between windows
Xin whatever manner you wish, etc.
XWhen a program terminates,
X.I screen
Xkills the window that contained it.
XIf this window was in the foreground, the display switches to the previous
Xwindow; if none are left,
X.I screen
Xexits.
X.PP
XEverything you type is sent to the program running in the current window.
XThe only exception to this is the one keystroke that is used to initiate
Xa command to the window manager.
XBy default, each command begins with a control-a (abbreviated C-a from
Xnow on), and is followed by one other keystroke.
XThe command character and all the key bindings can be fully customized
Xto be anything you like, though they are always two characters in length.
X.PP
XThe standard way to create a new window is to type \*QC-a c\*U.
XThis creates a new window running a shell and switches to that
Xwindow immediately, regardless of the state of the process running
Xin the current window.
XSimilarly, you can create a new window with a custom command in it by
Xfirst binding the command to a keystroke (in your .screenrc file) and
Xthen using it just like the \*QC-a c\*U command.
XIn addition, new windows can be created by running a command like:
X.IP
Xscreen emacs prog.c
X.PP
Xfrom a shell prompt within a previously created window.
XThis will not run another copy of
X.IR screen ,
Xbut will instead supply the
Xcommand name and its arguments to the window manager who will use it to
Xcreate the new window.
XThe above example would start the emacs editor (editing prog.c) and switch
Xto its window.
X.PP
XIf \*Q/etc/utmp\*U is writable by
X.IR screen ,
Xan appropriate record will be written to this file for each window, and
Xremoved when the window is terminated.
XThis is useful for working with \*Qtalk\*U, \*Qscript\*U, \*Qshutdown\*U,
X\*Qrsend\*U, \*Qsccs\*U and other similar programs that use the utmp
Xfile to determine who you are. As long as
X.I screen
Xis active on your terminal,
Xthe terminal's own record is removed from the utmp file. See also \*QC-a L\*U.
X
X
X.SH GETTING STARTED
XBefore you begin to use
X.I screen
Xyou'll need to make sure you have correctly selected your terminal type,
Xjust as you would for any other termcap/terminfo program.
X(You can do this by using
X.IR tset
Xfor example.)
X.PP
XIf you're impatient and want to get started without doing a lot more reading,
Xyou should remember this one command: \*QC-a ?\*U.
XTyping these two characters will display a list of the available
X.I screen
Xcommands and their bindings. Each keystroke is discussed in
Xthe section \*QDEFAULT KEY BINDINGS\*U. The manual section \*QCUSTOMIZATION\*U
Xdeals with the contents of your .screenrc.
X.PP
XIf possible, choose a version of your terminal's termcap that has automatic
Xmargins turned \fIoff\fP.
XThis will ensure an accurate and optimal update of the screen
Xin all circumstances.
XThe next best thing is an auto-margin terminal that allows the last position
Xon the screen to be updated without scrolling the screen (such as a vt100).
XThis also allows the entire screen to be updated.
XLastly, if all you've got is a \*Qtrue\*U auto-margin terminal
X.I screen
Xwill be content to use it, but updating a character put into the last position
Xon the screen may not be possible until the screen scrolls or the character
Xis moved into a safe position in some other way.
XThis delay can be shortened by using a terminal with insert-character
Xcapability.
X.PP
XIf your terminal is of the second type (firm-margined `am'), you will
Xwant to let
X.I screen
Xknow about this, since a normal termcap doesn't distinguish this type of
Xautomatic margins from a \*Qtrue\*U `am' terminal.
XYou do this by specifying the `LP' capability in your termcap
X(see the \*Qtermcap\*U .screenrc command), or by using the
X.B \-L
Xcommand-line option.
X.I Screen
Xneeds this information to correctly update the screen. Note that a `xv' together
Xwith an `am' flag effects like `LP'.
X.PP
XIf you are using a \*Qtrue\*U auto-margin terminal (no `LP') at low baud
Xrates, you may want to turn on a more optimal output mode by including the
Xflag `OP' in your termcap entry, or by specifying the
X.B \-O
Xcommand-line option.
XThe trade-off is that
X.I screen
Xwill no-longer accurately emulate the vt100's line-end quirks (e.\|g. the
Xscreen will scroll after putting \fIone\fP character in the last screen
Xposition).
X
X
X.SH "COMMAND-LINE OPTIONS"
XScreen has the following command-line options:
X.TP 5
X.B \-a
Xinclude \fIall\fP capabilities (with some minor exceptions) in each
Xwindow's termcap, even if
X.I screen
Xmust redraw parts of the display in order to implement a function.
X.TP 5
X.B \-A
XAdapt the sizes of all windows to the size of the current terminal.
XBy default,
X.I screen
Xtries to restore its old window sizes when attaching to resizeable terminals
X(those with \*QWS\*U in its description, e.g. suncmd or some xterm).
X.TP 5
X.BI "\-c " file
Xoverride the default configuration file from \*Q$HOME/.screenrc\*U
Xto \fIfile\fP.
X.TP 5
X.BR \-d | \-D " [" \fIpid.tty.host ]
Xdoes not start
X.IR screen ,
Xbut detaches the elsewhere running
X.I screen
Xsession. It has the same effect as typing \*QC-a d\*U from
X.I screen's
Xcontrolling terminal. \fB\-D\fP is the equivalent to the power detach key.
XIf no session can be detached, this option is ignored.
XThe combination \*Qscreen \-D \-r\*U can be used to `transport' the elsewhere
Xrunning session to this terminal and logout there.
XNote: It is a good idea to have the status of your sessions checked by means of
X\*Qscreen \-list\*U.
X.TP 5
X.BI "\-e " xy
Xspecifies the command character to be \fIx\fP and the character generating a
Xliteral command character to \fIy\fP (when typed after the command character).
XThe default is \*QC-a\*U and `a', which can be specified as \*Q-e^Aa\*U.
XSee the \*Qescape\*U .screenrc command for more details.
X.TP 5
X.BR \-f\fP ", " \-fn ", and " \-fa
Xturns flow-control on, off, or \*Qautomatic switching mode\*U.
XThis can also be defined through the \*Qdefflow\*U .screenrc command.
X.TP 5
X.BI "\-h " num
XSpecifies the history scrollback buffer to be \fInum\fP lines high.
X.TP 5
X.B \-i
Xwill cause the interrupt key (usually C-c) to interrupt the display
Ximmediately when flow-control is on.
XSee the \*Qdefflow\*U .screenrc command for details.
XThe use of this option is discouraged.
X.TP 5
X.BR \-l " and " \-ln
Xturns login mode on or off (for /etc/utmp updating).
XThis can also be defined through the \*Qdeflogin\*U .screenrc command.
X.TP 5
X.BR \-ls " and " \-list
Xdoes not start
X.IR screen ,
Xbut prints a list of
X.I pid.tty.host
Xstrings identifying your
X.I screen
Xsessions.
XSessions marked `detached' can be resumed with \*Qscreen -r\*U. Those marked
X`attached' are running and have a controlling terminal. Sessions marked as
X`dead' should be thoroughly checked and removed. Ask your system administrator
Xif you are not sure. Remove sessions with the \fB-wipe\fP option.
X.TP 5
X.B \-L
Xtells
X.I screen
Xyour auto-margin terminal has a writable last-position on
Xthe screen.
XThis can also be set in your .screenrc by specifying `LP' in a \*Qtermcap\*U
Xcommand.
X.TP 5
X.B \-m
Xcauses
X.I screen
Xto ignore the $STY environment variable. With \*Qscreen -m\*U creation of
Xa new session is enforced, regardless whether
X.I screen
Xis called from within another
X.I screen
Xsession or not.
X.TP 5
X.B \-O
Xselects a more optimal output mode for your terminal rather than true vt100
Xemulation (only affects auto-margin terminals without `LP').
XThis can also be set in your .screenrc by specifying `OP' in a \*Qtermcap\*U
Xcommand.
X.TP 5
X.BR \-r " [" \fIpid.tty.host ]
Xresumes a detached
X.I screen
Xsession.
XNo other options (except \*Q-d -r\*U or \*Q-D -r\*U) may be specified, though
Xan optional prefix of [\fIpid.\fP]\fItty.host\fP
Xmay be needed to distinguish between multiple detached
X.I screen
Xsessions.
X.TP 5
X.B \-R
Xattempts to resume the first detached
X.I screen
Xsession it finds.
XIf successful, all other command-line options are ignored.
XIf no detached session exists, starts a new session using the specified
Xoptions, just as if
X.B \-R
Xhad not been specified. The option is set by default if screen is run as
Xa login-shell.
X.TP 5
X.B \-s
Xsets the default shell to the program specified, instead of the value
Xin the environment variable $SHELL (or \*Q/bin/sh\*U if not defined).
XThis can also be defined through the \*Qshell\*U .screenrc command.
X.TP 5
X.BI "\-S " sessionname
XWhen creating a new session, this option can be used to specify a
Xmeaningful name for the session. This name identifies the session for
X\*Qscreen -list\*U and \*Qscreen -r\*U actions. It substitutes the
Xdefault [\fItty.host\fP] suffix.
X.TP 5
X.BI "\-t " name
Xsets the title (a.\|k.\|a.) for the default shell or specified program.
XSee also the \*Qshellaka\*U .screenrc command.
X.TP 5
X.B \-v
XPrint version number.
X.TP 5
X.B \-wipe
Xdoes the same as \*Qscreen -ls\*U, but removes destroyed sessions instead of
Xmarking them as `dead'.
X.TP 5
X.B \-x
XAttach to a not detached screen session. (Multi display mode).
X
X
X.SH "DEFAULT KEY BINDINGS"
X.ta 12n 26n
XAs mentioned, each
X.I screen
Xcommand consists of a
X\*QC-a\*U followed by one other character.
XFor your convenience, all commands that are bound to lower-case letters are
Xalso bound to their control character counterparts (with the exception
Xof \*QC-a a\*U; see below), thus, \*QC-a c\*U as well as \*QC-a C-c\*U can
Xbe used to create a window. See section \*QCUSTOMIZATION\*U for a description
Xof the command.
X.PP
X.TP 26n
XThe following table shows the default key bindings:
X.IP "\fBC-a '\fP"
X.PD 0
X.IP "\fBC-a ""\fP (select)"
X.PD
XPrompt for a window name or number to switch to.
X.IP "\fBC-a 0\fP (select 0)"
X.PD 0
X.IP "\fB ... \fP ..."
X.IP "\fBC-a 9\fP (select 9)"
X.PD
XSwitch to window number 0 \- 9.
X.IP "\fBC-a C-a\fP (other)"
XToggle to the window displayed previously.
X.IP "\fBC-a a\fP (meta)"
XSend the command character (C-a) to window. See \fIescape\fP command.
X.IP "\fBC-a A\fP (aka)"
XAllow the user to enter an a.\|k.\|a (also-known-as) for the current window.
X.IP "\fBC-a b\fP"
X.PD 0
X.IP "\fBC-a C-b\fP (break)"
X.PD
XSend a break to window.
X.IP "\fBC-a B\fP (pow_break)"
XReopen the terminal line and send a break.
X.IP "\fBC-a c\fP"
X.PD 0
X.IP "\fBC-a C-c\fP (screen)"
X.PD
XCreate a new window with a shell and switch to that window.
X.IP "\fBC-a C\fP (clear)"
XClear the screen.
X.IP "\fBC-a d\fP"
X.PD 0
X.IP "\fBC-a C-d\fP (detach)"
X.PD
XDetach
X.I screen
Xfrom this terminal.
X.IP "\fBC-a D D\fP (pow_detach)"
XDetach and logout.
X.IP "\fBC-a f\fP"
X.PD 0
X.IP "\fBC-a C-f\fP (flow)"
X.PD
XToggle flow \fIon\fP, \fIoff\fP or \fIauto\fP.
X.IP "\fBC-a C-g\fP (vbell)"
XToggles
X.I screen's
Xvisual bell mode.
X.IP "\fBC-a h\fP"
X.PD 0
X.IP "\fBC-a C-h\fP (hardcopy)"
X.PD
XWrite a hardcopy of the current window to the file \*Qhardcopy.\fIn\fP\*U.
X.IP "\fBC-a H\fP (log)"
XBegins/ends logging of the current window to the file \*Qscreenlog.\fIn\fP\*U.
X.IP "\fBC-a i\fP"
X.PD 0
X.IP "\fBC-a C-i\fP (info)"
X.PD
XShow info about this window.
X.IP "\fBC-a I\fP (login on)"
XCreate utmp entry for this window.
X.IP "\fBC-a k\fP"
X.PD 0
X.IP "\fBC-a C-k\fP (kill)"
X.PD
XDestroy current window.
X.IP "\fBC-a l\fP"
X.PD 0
X.IP "\fBC-a C-l\fP (redisplay)"
X.PD
XFully refresh current window.
X.IP "\fBC-a L\fP (login)"
XToggle this windows login slot.
X.IP "\fBC-a m\fP"
X.PD 0
X.IP "\fBC-a C-m\fP (lastmsg)"
X.PD
XRepeat the last message displayed in the message line.
X.IP "\fBC-a M\fP (monitor)"
XToggles monitoring of the current window.
X.IP "\fBC-a space\fP"
X.PD 0
X.IP "\fBC-a n\fP"
X.IP "\fBC-a C-n\fP (next)"
X.PD
XSwitch to the next window.
X.IP "\fBC-a O\fP (login off)"
XRemove utmp login slot for this window.
X.IP "\fBC-a backspace\fP"
X.PD 0
X.IP "\fBC-a p\fP"
X.IP "\fBC-a C-p\fP (prev)"
X.PD
XSwitch to the previous window (opposite of \fBC-a n\fP).
X.IP "\fBC-a q\fP"
X.PD 0
X.IP "\fBC-a C-q\fP (xon)"
X.PD
XSend a control-q to the current window.
X.IP "\fBC-a r\fP"
X.PD 0
X.IP "\fBC-a C-r\fP (wrap)"
X.PD
XToggle the current window's line-wrap setting (turn the current window's
Xautomatic margins on and off).
X.IP "\fBC-a s\fP"
X.PD 0
X.IP "\fBC-a C-s\fP (xoff)"
X.PD
XSend a control-s to the current window.
X.IP "\fBC-a t\fP"
X.PD 0
X.IP "\fBC-a C-t\fP (time)"
X.PD
XShow system information.
X.IP "\fBC-a v\fP"
X.PD 0
X.IP "\fBC-a C-v\fP (version)"
X.PD
XDisplay the version and compilation date.
X.IP "\fBC-a w\fP"
X.PD 0
X.IP "\fBC-a C-w\fP (windows)"
X.PD
XShow a list of window.
X.IP "\fBC-a W\fP (width)"
XToggle 80/132 columns.
X.IP "\fBC-a x\fP"
X.PD 0
X.IP "\fBC-a C-x\fP (lockscreen)"
X.PD
XLock this terminal.
X.IP "\fBC-a z\fP"
X.PD 0
X.IP "\fBC-a C-z\fP (suspend)"
X.PD
XSuspend
X.IR screen .
X.IP "\fBC-a Z\fP (reset)"
XReset the virtual terminal to its \*Qpower-on\*U values.
X.IP "\fBC-a .\fP (dumptermcap)"
XWrite out a \*Q.termcap\*U file.
X.IP "\fBC-a ?\fP (help)"
XShow key bindings.
X.IP "\fBC-a C-\e\fP (quit)"
XKill all windows and terminate
X.IR screen .
X.IP "\fBC-a :\fP (colon)"
XEnter command line mode.
X.IP "\fBC-a [\fP"
X.PD 0
X.IP "\fBC-a C-[\fP"
X.IP "\fBC-a esc\fP (copy)"
X.PD
XEnter copy/scrollback mode.
X.IP "\fBC-a ]\fP"
X.PD 0
X.IP "\fBC-a C-]\fP (paste)"
X.PD
XWrite the contents of the paste buffer to the stdin queue of the
Xcurrent window.
X.IP "\fBC-a {\fP
X.PD 0
X.IP "\fBC-a }\fP (history)"
X.PD
XCopy and paste a previous (command) line.
X.IP "\fBC-a >\fP (writebuf)"
XWrite pastebuffer to a file.
X.IP "\fBC-a <\fP (readbuf)"
XReads the screen-exchange file into the pastebuffer.
X.IP "\fBC-a =\fP (removebuf)"
XRemoves the file used by \fBC-a <\fP and \fPC-a >\fP.
X.IP "\fBC-a ,\fP (license)"
XShows where screen comes from, where it went to and why you can use it.
X
X
X.SH CUSTOMIZATION
XThe \*Qsocket directory\*U defaults either to $HOME/.screen or preferably
Xto /local/screens. If
X.I screen
Xis installed setuid-root, then the administrator
Xshould compile screen with an adequate (not NFS mounted) socket directory. If
X.I screen
Xis not running setuid-root, the user can specify any mode 777 directory
Xin the environment variable $SCREENDIR.
X.PP
XWhen
X.I screen
Xis invoked, it executes initialization commands from the files
X\*Q/local/etc/screenrc\*U and
X\*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's
Xdefaults\*U that can be overridden in the following ways: For the
Xglobal screenrc file
X.I screen
Xsearches for the environment variable $SYSSCREENRC. The user specific
Xscreenrc file is searched in $ISCREENRC, then $SCREENRC, then $HOME/.iscreenrc
Xand finally defaults to $HOME/.screenrc. The command line option \fB-c\fP takes
Xprecedence over the user specific screenrc file.
XCommands in these files are used to set options, bind functions to
Xkeys, and to automatically establish one or more extra windows at the
Xbeginning of your
X.I screen
Xsession.
XCommands are listed one per line, with empty lines being ignored.
XA command's arguments are separated by tabs or spaces, and may be
Xsurrounded by single or double quotes.
XA `#' turns the rest of the line into a comment, except in quotes.
XUnintelligible lines are warned about and ignored.
XCommands may contain references to environment variables. The
Xsyntax is the shell-like "$VAR " or "${VAR}". Note that this causes
Xincompatibilities with previous
X.I screen
Xversions, as now the '$'-sign has to be protected with '\e' if no
Xvariable substitution shall be performed.
X.PP
XCustomization can also be done 'on-line'. To enter the command mode type
X`C-a :'. Note that commands starting with \*Qdef\*U change default values,
Xwhile others change current settings.
X.PP
XThe following initialization commands are available:
X.sp
X.ne 3
X.BI acladd " username"
X.PP
XEnable a user to access this screen session. Multi user mode only.
X.sp
X.ne 3
X.BI acldel " username"
X.PP
XRemove a user from screens access control list. Multi user mode only.
X.sp
X.ne 3
X.BI activity " message"
X.PP
XWhen any activity occurs in a background window that is being monitored,
X.I screen
Xdisplays a notification in the message line.
XThe notification message can be re-defined by means of the \*Qactivity\*U
Xcommand.
XEach occurrence of `%' in \fImessage\fP is replaced by
Xthe number of the window in which activity has occurred,
Xand each occurrence of `~' is replaced by the definition for bell
Xin your termcap (usually an audible bell).
XThe default message is
X.sp
X 'Activity in window %'
X.sp
XNote that monitoring is off for all windows by default, but can be altered
Xby use of the \*Qmonitor\*U command (C-a M).
X.sp
X.ne 3
X.BR "aka " [ \fIwindowalias ]
X.PP
XSet the name of the current window to \fIwindowalias\fP. If no name is
Xspecified, screen prompts for one.
X.sp
X.ne 3
X.BR "allpartial on" | off
X.PP
XIf set to on, only the current cursor line is refreshed on window change.
XThis affects all windows and is useful for slow terminal lines. The
Xprevious setting of full/partial refresh for each window is restored
Xwith \*Qallpartial off\*U.
X.sp
X.ne 3
X.BR "autodetach on" | off
X.PP
XSets whether
X.I screen
Xwill automatically detach upon hangup, which
Xsaves all your running programs until they are resumed with a
X.B "screen -r"
Xcommand.
XWhen turned off, a hangup signal will terminate
X.I screen
Xand all the processes it contains. Autodetach is on by default.
X.sp
X.ne 3
X.BR "autonuke on" | off
X.PP
XSets whether a clear screen sequence should nuke all the output
Xthat has not been written to the terminal. See also
X\*Qobuflimit\*U.
X.sp
X.ne 3
X.BI "bell " message
X.PP
XWhen a bell character is sent to a background window,
X.I screen
Xdisplays a notification in the message line.
XThe notification message can be re-defined by means of the \*Qbell\*U
Xcommand.
XEach occurrence of `%' in \fImessage\fP is replaced by
Xthe number of the window to which a bell has been sent,
Xand each occurrence of `~' is replaced by the definition for bell
Xin your termcap (usually an audible bell).
XThe default message is
X.sp
X 'Bell in window %'
X.sp
XAn empty message can be supplied to the \*Qbell\*U command to suppress
Xoutput of a message line (bell "").
X.sp
X.ne 3
X.BI "bind " key
X.RI [ command " [" args ]]
X.PP
XBind a command to a key.
XBy default, most of the commands provided by
X.I screen
Xare bound to one or more keys as indicated in the \*QDEFAULT KEY BINDINGS\*U
Xsection, e.\|g. the
Xcommand to create a new window is bound to \*QC-c\*U and \*Qc\*U.
XThe \*Qbind\*U command can be used to redefine the key bindings and to
Xdefine new bindings.
XThe \fIkey\fP argument is either a single character, a two-character sequence
Xof the form \*Q^x\*U (meaning \*QC-x\*U), a backslash followed by an octal
Xnumber (specifying the ASCII code of the character), or a backslash followed
Xby a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
XThe argument can also be quoted, if you like.
XIf no further argument is given, any previously established binding
Xfor this key is removed.
XThe \fIcommand\fP argument can be any command listed in this section.
X.PP
XSome examples:
X.PP
X.nf
X bind ' ' windows
X bind ^f screen telnet foobar
X bind \e033 screen -ln -t root -h 1000 9 su
X.fi
X.PP
Xwould bind the space key to the command that displays a list
Xof windows (so that the command usually invoked by \*QC-a C-w\*U
Xwould also be available as \*QC-a space\*U),
Xbind \*QC-f\*U to the command \*Qcreate a window with a TELNET
Xconnection to foobar\*U, and bind \*Qescape\*U to the command
Xthat creates an non-login window with a.\|k.\|a. \*Qroot\*U in slot #9, with
Xa super-user shell and a scrollback buffer of 1000 lines.
X.sp
X.ne 3
X.B break
X.RI [ duration ]
X.PP
XSend a break signal for \fIduration\fP*0.25 seconds to this window.
XMost useful if a character device is
Xattached to the window rather than a shell process.
X.sp
X.ne 3
X.B bufferfile
X.RI [ exchange-file ]
X.PP
XChange the filename used for reading and writing with the copybuffer.
XIf the optional argument to the \*Qbufferfile\*U command is omitted,
Xthe default setting (\*Q/tmp/screen-exchange\*U) is reactivated.
XThe following example will paste the system's password file into
Xthe screen window:
X.PP
X.nf
X C-a : bufferfile /etc/passwd
X C-a < C-a ]
X C-a : bufferfile
X.fi
X.sp
X.ne 3
X.B chdir
X.RI [ directory ]
X.PP
XChange the \fIcurrent directory\fP of
X.I screen
Xto the specified directory or, if called without an argument,
Xto your home directory (the value of the environment variable $HOME).
XAll windows that are created by means of the \*Qscreen\*U command
Xfrom within \*Q.screenrc\*U or by means of \*QC-a : screen ...\*U
Xor \*QC-a c\*U use this as their default directory.
XWithout a chdir command, this would be the directory from which
X.I screen
Xwas invoked.
XHardcopy and log files are always written to the \fIwindow's\fP default
Xdirectory, \fInot\fP the current directory of the process running in the
Xwindow.
XYou can use this command multiple times in your .screenrc to start various
Xwindows in different default directories, but the last chdir value will
Xaffect all the windows you create interactively.
X.sp
X.ne 3
X.B clear
X.PP
XClears the current window and saves its image to the scrollback buffer.
X.sp
X.ne 3
X.B colon
X.PP
XAllows you to enter \*Q.screenrc\*U command lines. Useful
Xfor on-the-fly modification of key bindings,
Xspecific window creation and changing settings. Note that the \*Qset\*U
Xkeyword no longer exists! Usually commands affect the current window rather
Xthan default settings for future windows. Change defaults with commands
Xstarting with 'def...'.
X
XIf you consider this as the `Ex command mode' of
X.IR screen ,
Xyou may regard \*QC-a esc\*U (copy mode) as its `Vi command mode'.
X.sp
X.ne 3
X.BR console [ on | off ]
X.PP
XGrabs or ungrabs the machines console output to a window.
X.sp
X.ne 3
X.B copy
X.PP
XEnter copy/scrollback mode. This allows you to copy text from the current
Xwindow and its history into the paste buffer. In this mode a vi-like
X`full screen editor' is active:
X.br
X.IR "Movement keys" :
X.br
X.in +4n
X.ti -2n
X\fBh\fP, \fBj\fP, \fBk\fP, \fBl\fP move the cursor line by line or
Xcolumn by column.
X.br
X.ti -2n
X\fB0\fP, \fB^\fP and \fB$\fP move to the leftmost column, to the first or last
Xnon-whitespace character on the line.
X.br
X.ti -2n
X\fBH\fP, \fBM\fP and \fBL\fP move the cursor to the leftmost column
Xof the top, center or bottom line of the window.
X.br
X.ti -2n
X\fB+\fP and \fB\-\fP positions one line up and down.
X.br
X.ti -2n
X\fBG\fP moves to the specified absolute line (default: end of buffer).
X.br
X.ti -2n
X\fB|\fP moves to the specified absolute column.
X.br
X.ti -2n
X\fBw\fP, \fBb\fP, \fBe\fP move the cursor word by word.
X.br
X.ti -2n
X\fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of
Xlines while preserving the cursor position. (Default: half screen-full).
X.br
X.ti -2n
X\fBC-b\fP and \fBC-f\fP scroll the display up/down a full screen.
X.br
X.ti -2n
X\fBg\fP moves to the beginning of the buffer.
X.br
X.ti -2n
X\fB%\fP jumps to the specified percentage of the buffer.
X.br
X.ti -4n
X
X.IR Note :
X.br
XEmacs style movement keys can be customized by a .screenrc command.
X(E.\|g. markkeys "h=^B:l=^F:$=^E") There is no simple method for a full
Xemacs-style keymap, as this involves multi-character codes.
X
X.br
X.ti -4n
X.IR Marking :
X.br
XThe copy range is specified by setting two marks. The text between these marks
Xwill be highlighted. Press
X.br
X.ti -2n
X\fBspace\fP to set the first or second mark
Xrespectively.
X.br
X.ti -2n
X\fBY\fP and \fBy\fP used to mark one whole line or to mark from
Xstart of line.
X.br
X.ti -2n
X\fBW\fP marks exactly one word.
X.br
X.ti -4n
X.IR "Repeat count" :
X.br
XAny of these commands can be prefixed with a repeat count number by pressing
Xdigits
X.br
X.ti -2n
X\fB0\fP..\fB9\fP which
Xis taken as a repeat count.
X.br
XExample: \*QC-a C-[ H 10 j 5 Y\*U will copy lines
X11 to 15 into the pastebuffer.
X.br
X.ti -4n
X.IR Searching :
X.ti -2n
X\fB/\fP \fIVi\fP-like search forward.
X.ti -2n
X\fB?\fP \fIVi\fP-like search backward.
X.ti -2n
X\fBC-a s\fP \fIEmacs\fP style incremental search forward.
X.ti -2n
X\fBC-r\fP \fIEmacs\fP style reverse i-search.
X.ti -4n
X.IR Specials :
X.br
XThere are however some keys that act differently than in
X.IR vi .
X.I Vi
Xdoes not allow one to yank rectangular blocks of text, but
X.I screen
Xdoes. Press
X.br
X.ti -2n
X\fBc\fP or \fBC\fP to set the left or right margin respectively. If no repeat count is
Xgiven, both default to the current cursor position.
X.br
XExample: Try this on a rather full text screen:
X\*QC-a [ M 20 l SPACE c 10 l 5 j C SPACE\*U.
X
XThis moves one to the middle line of the screen, moves in 20 columns left,
Xmarks the beginning of the copybuffer, sets the left column, moves 5 columns
Xdown, sets the right column, and then marks the end of
Xthe copybuffer. Now try:
X.br
X\*QC-a [ M 20 l SPACE 10 l 5 j SPACE\*U
X
Xand notice the difference in the amount of text copied.
X.br
X.ti -2n
X\fBJ\fP joins lines. It toggles between
X3 modes: lines separated by a newline character (012), lines glued seamless,
Xlines separated by a single whitespace. Note that you can prepend the newline
Xcharacter with a carriage return character, by issuing a \*Qcrlf on\*U.
X.br
X.ti -2n
X\fBv\fP is for all the
X.I vi
Xusers with \*Q:set numbers\*U \- it toggles the left margin between column 9
Xand 1. Press
X.br
X.ti -2n
X\fBa\fP before the final space key to toggle in append mode. Thus
Xthe contents of the pastebuffer will not be overwritten, but is appended to.
X.br
X.ti -2n
X\fBA\fP toggles in append mode and sets a (second) mark.
X.br
X.ti -2n
X\fB>\fP sets the (second) mark and writes the contents of the copybuffer to
Xthe screen-exchange file (/tmp/screen-exchange per default) once copy-mode is
Xfinished.
X.br
XThis example demonstrates how to dump the whole scrollback buffer
Xto that file: \*QC-A [ g SPACE G $ >\*U.
X.br
X.ti -2n
X\fBC-g\fP gives information about the current line and column.
X.br
X.ti -2n
X\fB@\fP does nothing. Does not even exit copy mode.
X.in -4n
X.sp
X.ne 3
X.B copy_reg
X.RI [ key ]
X.PP
XStore the current copybuffer contents in a register referenced by \fIkey\fP.
XIf the name is omitted you will be prompted to press the key.
X.sp
X.ne 3
X.BR "crlf on" | off
X.PP
XThis affects the copying of text regions with the `C-a [' command. If it is set
Xto `on', lines will be separated by the two character sequence `CR' - `LF'.
XOtherwise (default) only `LF' is used.
X.sp
X.ne 3
X.BR "defautonuke on" | off
X.PP
XSame as the \fBautonuke\fP command except that the default setting for new displays is changed. Initial setting is `off'.
XNote that you can use the special 'AN' terminal capability if you
Xwant to have a dependency on the terminal type.
X.sp
X.ne 3
X.BR "defflow on" | off | auto
X.RB [ interrupt ]
X.PP
XSame as the \fBflow\fP command except that the default setting for new windows
Xis changed. Initial setting is `auto'.
XSpecifying \*Qdefflow auto interrupt\*U is the same as the command-line options
X.B \-fa
Xand
X.BR \-i .
X.sp
X.ne 3
X.BR "deflogin on" | off
X.PP
XSame as the \fBlogin\fP command except that the default setting for new windows
Xis changed. This is initialised with `on' as distributed (see config.h.in).
X.sp
X.ne 3
X.BI "defmode " mode
X.PP
XThe mode of each newly allocated pseudo-tty is set to \fImode\fP.
X\fIMode\fP is an octal number.
XWhen no \*Qdefmode\*U command is given, mode 0622 is used.
X.sp
X.ne 3
X.BR "defmonitor on" | off
X.PP
XSame as the \fBmonitor\fP command except that the default setting for new
Xwindows is changed. Initial setting is `off'.
X.sp
X.ne 3
X.BI "defobuflimit " limit
X.PP
XSame as the \fBobuflimit\fP command except that the default setting for new displays is changed. Initial setting is 256 bytes.
XNote that you can use the special 'OL' terminal capability if you
Xwant to have a dependency on the terminal type.
X.sp
X.ne 3
X.BI "defscrollback " num
X.PP
XSame as the \fBscrollback\fP command except that the default setting for new
Xwindows is changed. Initial setting is 100.
X.sp
X.ne 3
X.BR "defwrap on" | off
X.PP
XSame as the \fBwrap\fP command except that the default setting for new
Xwindows is changed. Initially line-wrap is on and can be toggled with the
X\*Qwrap\*U command (\*QC-a r\*U) or by means of "C-a : wrap on|off".
X.sp
X.ne 3
X.B detach
X.PP
XDetach the
X.I screen
Xsession (disconnect it from the terminal and put it into the background).
XThis returns you to the shell where you invoked
X.IR screen .
XA detached
X.I screen
Xcan be resumed by invoking
X.I screen
Xwith the
X.B \-r
Xoption. (See also section \*QCOMMAND-LINE OPTIONS\*U.)
X.sp
X.ne 3
X.B dumptermcap
X.PP
XWrite the termcap entry for the virtual terminal optimized for the currently
Xactive window to the file \*Q.termcap\*U in the user's
X\*Q$HOME/.screen\*U directory (or wherever
X.I screen
Xstores its sockets. See the \*QFILES\*U section below).
XThis termcap entry is identical to the value of the environment variable
X$TERMCAP that is set up by
X.I screen
Xfor each window. For terminfo based systems you will need to run a converter
Xlike
X.IR captoinfo
Xand then compile the entry with
X.IR tic .
X.sp
X.ne 3
X.BR "echo " [ -n ]
X.I message
X.PP
XThe echo command may be used to annoy
X.I screen
Xusers with a 'message of the
Xday'. Typically installed in a global /local/etc/screenrc. See also
X\*Qsleep\*U.
XEcho is also useful for online checking of environment variables.
X.sp
X.ne 3
X.BI "escape " xy
X.PP
XSet the command character to \fIx\fP and the character generating a literal
Xcommand character to \fIy\fP (just like in the \-e option).
XEach argument is either a single character, a two-character sequence
Xof the form \*Q^x\*U (meaning \*QC-x\*U), a backslash followed by an octal
Xnumber (specifying the ASCII code of the character), or a backslash followed
Xby a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
XThe default is \*Q^Aa\*U.
X.sp
X.ne 3
X.B exec
X.RI [[ fdpat ]
X.IR "newcommand " [ "args ..." ]]
X.PP
XRun a subprocess (newcommand) in the current window. The flow of data between
Xnewcommands stdin/stdout/stderr, the process already running (shell) and
Xscreen itself (window) is controlled by the filedescriptor pattern fdpat.
XThis pattern is basically a three character sequence representing stdin, stdout
Xand stderr of newcommand. A dot (.) connects the file descriptor
Xto screen. An exclamation mark (!) causes the file
Xdescriptor to be connected to the already running process. A colon (:) combines
Xboth.
XUser input will go to newcommand unless newcommand requests the old process'
Xoutput (fdpats first character is `!' or `:') or a pipe (|) is added to
Xthe end of fdpat.
X.br
XInvoking `exec' without arguments shows name and arguments of the currently
Xrunning subprocess in this window.
X.br
XWhen a subprocess is running the `kill' command will affect it instead of the
Xwindows process.
X.br
XRefer to the postscript file `fdpat.ips' for illustration of all 21 possible
Xcombinations. Each drawing shows the numbers 210 representing the three
Xfile descriptors of newcommand. The box marked `W' is usual pty that has
Xthe old process (shell) on its slave side. The box marked `P' is the
Xsecondary pty that now has screen at its master side.
X.sp
XAbbreviations:
X.br
XWhitespace between the word `exec' and fdpat and the command
Xcan be omitted. Trailing dots and a fdpat consisting only of dots can be
Xomitted. A simple `|' is synonymous for the pattern `!..|'; the word exec can
Xbe ommitted here and can always be replaced by `!'.
X.sp
XExamples:
X.IP
Xexec ... /bin/sh
X.br
Xexec /bin/sh
X.br
X!/bin/sh
X.PP
XCreates another shell in the same window, while the orignal shell is still
Xrunning. Output of both shells is displayed and user input is sent to the new
X/bin/sh.
X.IP
Xexec !.. stty 19200
X.br
Xexec ! stty 19200
X.br
X!!stty 19200
X.PP
XSet the speed of the windows tty. If your stty command operates on stdout, then
Xadd another `!'.
X.IP
Xexec !..| less
X.br
X|less
X.PP
XThis adds a pager to the window output. The special character `|' is needed to
Xgive the user controll over the pager although it gets its input from the
Xoriginal process.
X.IP
X!:sed -n s/.*Error.*/\e007/p
X.PP
XSends window output to both, the user and the sed command. The sed inserts an
Xadditional bell character (oct. 007) to the window output seen by screen.
XThis will cause "Bell in window x" messages, whenever the string "Error"
Xappears in the window.
X.sp
X.ne 3
X.B flow
X.RB [ on | off | "auto\fR]\fP"
X.PP
XSets the flow-control mode for this window.
XWithout parameters it cycles the current window's flow-control setting from
X"automatic" to "on" to "off".
XSee the discussion on \*QFLOW-CONTROL\*U later on in this document for full
Xdetails and note, that this is subject to change in future releases.
XDefault is set by `defflow'.
X.sp
X.ne 3
X.B hardcopy
X.PP
XWrites out the currently displayed image to a file \fIhardcopy.n\fP
Xin the window's default directory, where \fIn\fP is the number
Xof the current window.
XThis either appends or overwrites the file if it exists. See below.
X.sp
X.ne 3
X.BR "hardcopy_append on" | off
X.PP
XIf set to "on",
X.I screen
Xwill append to the "hardcopy.n" files created by the command \*QC-a h\*U,
Xotherwise these files are overwritten each time.
XDefault is `off'.
X.sp
X.ne 3
X.BI "hardcopydir "directory
X.PP
XDefines a directory where hardcopy files will be placed. If unset hardcopys
Xare dumped in screens current working directory.
X.sp
X.ne 3
X.BR "hardstatus " [ on | off ]
X.PP
XToggles the use of the terminal's hardware status line. If "on",
X.I screen
Xwill use this facility to display one line messages. Otherwise these messages
Xare overlayed in reverse video mode at the display line. Note that the
Xhardstatus feature can only be used if the termcap/terminfo capabilities
X"hs", "ts", "fs" and "ds" are set properly. Default is `on'.
X.sp
X.ne 3
X.BR "height " [ \fIlines\fP ]
X.PP
XSet the display height to a specified number of lines. When no argument
Xis given it toggles between 24 and 42 lines display.
X.sp
X.ne 3
X.B help
X.PP
XNot really a online help, but
Xdisplays a help screen showing you all the key bindings.
XThe first pages list all the internal commands followed by their current
Xbindings.
XSubsequent pages will display the custom commands, one command per key.
XPress space when you're done reading each page, or return to exit early.
XAll other characters are ignored, except for the command character, which will
Xexit the help display and begin a command.
XSee also \*QDEFAULT KEY BINDINGS\*U section.
X.sp
X.ne 3
X.B history
X.PP
XUsually users work with a shell that allows easy access to previous commands.
XFor example csh has the command \*Q!!\*U to repeat the last command executed.
X.I Screen
Xallows you to have a primitive way of re-calling \*Qthe command that
Xstarted ...\*U: You just type the first letter of that command, then hit
X`C-a {' and
X.I screen
Xtries to find a previous line that matches with the `prompt character'
Xto the left of the cursor. This line is pasted into this window's input queue.
XThus you have a crude command history (made up by the visible window and its
Xscrollback buffer).
X.sp
X.ne 3
X.B info
X.PP
XUses the message line to display some information about the current window:
Xthe cursor position in the form \*Q(column,row)\*U starting with \*Q(1,1)\*U,
Xthe terminal width and height plus the size of the scrollback buffer in lines,
Xlike in \*U(80,24)+50\*U, various flag settings (flow-control, insert mode,
Xorigin mode, wrap mode, application-keypad mode, output logging, activity
Xmonitoring and redraw (`+' indicates enabled, `\-' not)),
Xthe currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP,
Xor \fIG3\fP), and in square brackets the terminal character sets that are
Xcurrently designated as \fIG0\fP through \fIG3\fP.
XFor system information use the \*Qtime\*U command.
X.sp
X.ne 3
X.BR ins_reg " [" \fIkey ]
X.PP
XPaste contents of register \fIkey\fP in current windows input stream. See also
Xthe \*Qcopy_reg\*U and \*Qregister\*U commands.
X.sp
X.ne 3
X.B kill
X.PP
XKill current window.
X.br
XIf there is an `exec' command running then it is killed. Otherwise the process
X(shell) running in the window receives a HANGUP condition, the window structure
Xis removed and screen switches to the previously displayed window.
XWhen the last window is destroyed,
X.I screen
Xexits.
XNote:
X.I Emacs
Xusers should keep this command in mind, when killing a line.
XIt is recommended not to use \*QC-a\*U as the
X.I screen
Xescape key or to rebind kill to \*QC-a K\*U.
X.sp
X.ne 3
X.B lastmsg
X.PP
XRedisplay the last contents of the message/status line.
XUseful if you're typing when a message appears, because the message goes
Xaway when you press a key (unless your terminal has a hardware status line).
XRefer to the commands \*Qmsgwait\*U and \*Qmsgminwait\*U for fine tuning.
X.sp
X.ne 3
X.B license
X.PP
XDisplay the disclaimer page. This is done whenever
X.I screen
Xis started without options, which should be often enough. See also
Xthe \*Qstartup_message\*U command.
X.sp
X.ne 3
X.B lockscreen
X.PP
XLock this display.
XCall a screenlock program (/local/bin/lck or /usr/bin/lock or a builtin if no
Xother is available). Screen does not accept any command keys until this program
Xterminates. Meanwhile processes in the windows may continue, as the windows
Xare in the `detached' state. The screenlock program may be changed through the
Xenvironment variable $LOCKPRG (which must be set in the shell from which
X.I screen
Xis started) and is executed with the user's uid and gid.
X.sp
X.ne 3
X.BR "log " [ on | off ]
X.PP
XStart/stop writing output of the current window to a file
X\*Qscreenlog.\fIn\fP\*U in the window's default directory, where \fIn\fP
Xis the number of the current window. If no parameter is given, the state
Xof logging is toggled. The session log is appended to the previous contents
Xof the file if it already exists. The current contents and the contents
Xof the scrollback history are not included in the session log.
XDefault is `off'.
X.sp
X.ne 3
X.BI "logdir "directory
X.PP
XDefines a directory where logfiles will be placed. If unset logfiles are written
Xin screens current working directory.
X.sp
X.ne 3
X.BR "login " [ on | off ]
X.PP
XAdds or removes the entry in the utmp database file for the current window.
XThis controls if the window is `logged in'.
XWhen no parameter is given, the login state of the window is toggled.
XAdditionally to that toggle, it is convenient having a `log in' and a `log out'
Xkey. E.\|g. `bind I login on' and `bind O login off' will map these
Xkeys to be C-a I and C-a O.
XThe default setting (in config.h.in) should be \*Qon\*U for a
X.I screen
Xthat runs under suid-root.
XUse the \*Qdeflogin\*U command to change the default login state for new
Xwindows.
X.sp
X.ne 3
X.BI "markkeys " string
X.PP
XThis is a method of changing the keymap used for copy/history mode.
XThe string is made up of \fIoldchar\fP=\fInewchar\fP pairs which are
Xseparated by `:'. Example: The string \*QB=^B:F=^F\*U will change the
Xkeys `C-b' and `C-f' to the vi style binding (scroll up/down fill page).
XThis happens to be the default binding for `B' and `F'.
XThe command \*Qmarkkeys h=^B:l=^F:$=^E\*U would set the mode for an emacs-style
Xbinding.
X.sp
X.ne 3
X.B meta
X.PP
XInsert the command character (C-a) in the current window's input stream.
X.sp
X.ne 3
X.BR "monitor " [ on | off ]
X.PP
XToggles activity monitoring of windows.
XWhen monitoring is turned on and an affected window is switched into the
Xbackground, you will receive the activity notification message in the
Xstatus line at the first sign of output and the window will also be marked
Xwith an `@' in the window-status display.
XMonitoring is initially off for all windows.
X.sp
X.ne 3
X.BI "msgminwait " sec
X.PP
XDefines the time
X.I screen
Xdelays a new message when one message is currently displayed.
XThe default is 1 second.
X.sp
X.ne 3
X.BI "msgwait " sec
X.PP
XDefines the time a message is displayed if
X.I screen
Xis not disturbed by other activity. The default is 5 seconds.
X.sp
X.ne 3
X.BR "multiuser on" | off
X.PP
XSwitch between singleuser and multiuser mode. Standard screen operation
Xis singleuser. In multiuser mode the commands `acladd' and `acldel' can be
Xused to enable (and disable) other users to access this screen.
X.sp
X.ne 3
X.BR "nethack on" | off
X.PP
XChanges the kind of error messages used by
X.IR screen .
XWhen you are familiar with the game \*Qnethack\*U, you may enjoy the
Xnethack-style messages which will often blur the facts a little, but are
Xmuch funnier to read. Anyway, standard messages often tend to be unclear as
Xwell.
X.br
XThis option is only
Xavailable if screen was compiled with the NETHACK flag defined. The
Xdefault setting is then determined by the presence of the environment
Xvariable $NETHACKOPTIONS.
X.sp
X.ne 3
X.B next
X.PP
XSwitch to the next window.
XThis command can be used repeatedly to cycle through the list of windows.
X.sp
X.ne 3
X.BR "obuflimit " [ \fIlimit ]
X.PP
XIf the output buffer contains more bytes than the specified limit, no
Xmore data will be
Xread from the windows. The default value is 256. If you have a fast
Xdisplay (like xterm), you can set it to some higher value. If no
Xargument is specified, the current setting is displayed.
X.sp
X.ne 3
X.B other
X.PP
XSwitch to the window displayed previously.
XNote that this function defaults to the command character typed twice,
Xunless overridden; for instance, if you use the option \*Q\fB\-e]x\fP\*U,
Xthis function becomes \*Q]]\*U, not \*Q]C-a\*U.
X.sp
X.ne 3
X.BR "partial on" | off
X.PP
XDefines whether the display should be refreshed (as done with "C-a l") after
Xswitching to the current window. This command only affects the current window.
XTo affect all windows use the \fIallpartial\fP command.
XDefault is `off', of course.
X.sp
X.ne 3
X.BR "password " [ \fIcrypted_pw ]
X.PP
XPresent a crypted password in your \*Q.screenrc\*U file and screen will ask
Xfor it, whenever someone attempts to resume a detached. This is useful
Xif you have privileged programs running under
X.I screen
Xand you want to protect your session from reattach attempts by another user
Xmasquerading as your uid (i.e. any superuser.)
XIf no crypted password is specified, screen prompts twice for typing a
Xpassword and places its encryption in the copybuffer.
XDefault is `none', this disables password checking.
X.sp
X.ne 3
X.B "paste"
X.PP
XWrite the contents of the paste buffer to the stdin queue of the current window.
XThe paste buffer can be filled with the \fIcopy\fP, \fIhistory\fP and
X\fIreadbuf\fP commands.
X.sp
X.ne 3
X.B pow_break
X.PP
XReopen the window's terminal line and send a break condition. See `break'.
X.sp
X.ne 3
X.B pow_detach
X.PP
XPower detach.
XMainly the same as \fIdetach\fP, but also sends a HANGUP signal to
Xthe parent process of
X.IR screen .
XCAUTION: This will result in a logout, when
X.I screen
Xwas started from your login shell.
X.sp
X.ne 3
X.BI "pow_detach_msg " message
X.PP
XThe \fImessage\fP specified here is output whenever a `Power detach' was
Xperformed. It may be used as a replacement for a logout message or to reset
Xbaud rate, etc.
X.sp
X.ne 3
X.B prev
X.PP
XSwitch to the window with the next lower number.
XThis command can be used repeatedly to cycle through the list of windows.
X.sp
X.ne 3
X.BR process " [" \fIkey ]
X.PP
XStuff the contents of the specified register into \fIscreen\fP's
Xinput queue. If no argument is given you are prompted for a
Xregister name. This command can be used to bind multiple actions
Xto a single key.
X.sp
X.ne 3
X.B quit
X.PP
XKill all windows and terminate
X.IR screen .
XNote that on vt100-style terminals the keys C-4 and C-\e are identical.
XThis makes the default bindings dangerous:
XBe careful not to type C-a C-4 when selecting window no. 4.
XUse the empty bind command (as in \*Qbind '\e'\*U) to remove a key binding.
X.sp
X.ne 3
X.B readbuf
X.PP
XReads the contents of the current screen-exchange file into the copy buffer.
XSee also \*Qbufferfile\*U command.
X.sp
X.ne 3
X.B redisplay
X.PP
XRedisplay the current window. Needed to get a full redisplay when in
Xpartial redraw mode.
X.sp
X.ne 3
X.BI "register " "key string"
X.PP
XSave the specified \fIstring\fP to the register \fIkey\fP. See also the
X\*Qins_reg\*U command.
X.sp
X.ne 3
X.B "removebuf"
X.PP
XUnlinks the screen-exchange file used by the commands \*Qwritebuf\*U and
X\*Qreadbuf\*U.
X.sp
X.ne 3
X.B "reset"
X.PP
XReset the virtual terminal to its \*Qpower-on\*U values. Useful when strange
Xsettings (like scroll regions or graphics character set) are left over from
Xan application.
X.sp
X.ne 3
X.B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]]"
X.PP
XEstablish a new window.
XThe flow-control options (\fB\-f\fP, \fB\-fn\fP and \fB\-fa\fP),
Xtitle (a.\|k.\|a.) option (\fB\-t\fP), login options (\fB-l\fP and \fB-ln\fP)
X, terminal type option (\fB-T <term>\fP) and scrollback option (\fB-h\fP <num>)
Xmay be specified for each command.
XIf an optional number \fIn\fP in the range 0..9 is given, the window
Xnumber \fIn\fP is assigned to the newly created window (or, if this
Xnumber is already in-use, the next available number).
XIf a command is specified after \*Qscreen\*U, this command (with the given
Xarguments) is started in the window; otherwise, a shell is created.
XThus, if your \*Q.screenrc\*U contains the lines
X.sp
X.nf
X # example for .screenrc:
X screen 1
X screen -fn -t foobar 2 telnet foobar
X.fi
X.sp
X.I screen
Xcreates a shell window (in window #1) and a window with a TELNET connection
Xto the machine foobar (with no flow-control using the a.\|k.\|a. \*Qfoobar\*U
Xin window #2). Note, that unlike previous versions of
X.I screen
Xno default window is created when \*Qscreen\*U commands are included in your
X\*Q.screenrc\*U file.
XWhen the initialization is completed,
X.I screen
Xswitches to the last window specified in your .screenrc file or, if none,
Xopens a default window #0.
X.sp
X.ne 3
X.B "scrollback \fP\fInum\fP"
X.PP
XSet the size of the scrollback buffer for the current windows to \fInum\fP
Xlines. The default scrollback is 100 lines.
XSee also the \*Qdefscrollback\*U command and use \*QC-a i\*U to view the
Xcurrent setting.
X.sp
X.ne 3
X.BR "select " [ \fP\fIn\fP ]
X.PP
XSwitch to the window with the number \fIn\fP.
XIf no window number is specified, you get prompted for an
Xidentifier. This can be an a.k.a. or a number.
XWhen a new window is established, the first available number
Xis assigned to this window.
XThus, the first window can be activated by \*QC-a 0\*U (there can be no more
Xthan 10 windows present simultaneously).
X.sp
X.ne
X.B "sessionname \fP[\fIname\fP]"
X.PP
XRename the current session. Note, that for \*Qscreen -list\*U the
Xname shows up with the process-id prepended. If the argument \*Qname\*U
Xis omitted, the name of this session is displayed. Caution: The $STY
Xenvironment variables still reflects the old name. This may result in
Xconfusion.
XThe default is constructed from the tty and host names.
X.sp
X.ne 3
X.B "setenv \fIvar\fP \fIstring\fP"
X.PP
XSet the environment variable \fIvar\fP to value \fIstring\fP.
XThe environment is inherited by all subsequently forked shells.
X.sp
X.ne 3
X.B "shell \fIcommand\fP"
X.PP
XSet the command to be used to create a new shell.
XThis overrides the value of the environment variable $SHELL.
XThis is useful if you'd like to run a tty-enhancer which is expecting to
Xexecute the program specified in $SHELL. If the command begins with
Xa '-' character, the shell will be started as a login-shell.
X.sp
X.ne 3
X.B "shellaka \fIa.\|k.\|a.\fP"
X.PP
XSet the a.\|k.\|a. for all shells created during startup or by
Xthe C-A C-c command.
XFor details about what an a.\|k.\|a.\| is, see the discussion
Xentitled \*QALSO KNOWN AS\*U.
X.sp
X.ne 3
X.BR "silence " [ on | off "|\fIsec\fP]"
X.PP
XToggles silence monitoring of windows.
XWhen silence is turned on and an affected window is switched into the
Xbackground, you will receive the silence notification message in the
Xstatus line after a specified period of inactivity (silence). The default
Xtimeout can be changed with the `silencewait' command or by specifying a
Xnumber of seconds instead of `on' or `off'.
XSilence is initially off for all windows.
X.sp
X.ne 3
X.BI "silencewait " sec
X.PP
XDefine the time that all windows monitored for silence should wait before
Xdisplaying a message. Default 30 seconds.
X.sp
X.ne
X.B "sleep \fP\fInum\fP"
X.PP
XThis command will pause the execution of a .screenrc file for \fInum\fP seconds.
XKeyboard activity will end the sleep.
XIt may be used to give users a chance to read the messages output by \*Qecho\*U.
X.sp
X.ne 3
X.B "slowpaste \fIusec\fP"
X.PP
XDefine the speed at which text is inserted by the paste ("C-a ]") command.
XFor each 80 characters (IOSIZE) pasted
X.I screen
Xwill make a pause of \fIusec\fP milliseconds to allow the application the
Xprocessing of input. Use slowpaste if your underlying system
Xhas difficulties performing large pastes (e.\|g. a VAX).
X.sp
X.ne 3
X.B "startup_message on\fP|\fBoff"
X.PP
XSelect whether you want to see the copyright notice during startup.
XDefault is `on', as you propably noticed.
X.sp
X.ne 3
X.B "suspend"
X.PP
XSuspend
X.IR screen .
XThe windows are in the `detached' state, while
X.IR screen
Xis suspended. This feature relies on the shell being able to do job control.
X.sp
X.ne 3
X.B "term \fIterm\fP"
X.PP
XIn each window's environment
X.I screen
Xopens, the $TERM variable is set to \*Qscreen\*U by default.
XBut when no description for \*Qscreen\*U is installed in the local termcap
Xor terminfo data base, you set $TERM to \- say \-
X\*Qvt100\*U. This won't do much harm, as
X.I screen
Xis VT100/ANSI compatible.
XThe use of the \*Qterm\*U command is discouraged for non-default purpose.
XThat is, one may want to specify special $TERM settings (e.g. vt100) for the
Xnext \*Qscreen rlogin othermachine\*U command. Use the command \*Qscreen -T vt100
Xrlogin othermachine\*U rather than setting (\*Qterm vt100\*U) and resetting
X(\*Qterm screen\*U) the default before and after the \*Qscreen\*U command.
X.sp
X.ne 3
X.BI termcap " term terminal-tweaks"
X.RI [ window-tweaks ]
X.br
X.BI terminfo " term terminal-tweaks"
X.RI [ window-tweaks ]
X.PP
XUse this command to modify your terminal's termcap entry without going through
Xall the hassles involved in creating a custom termcap entry.
XPlus, you can optionally customize the termcap generated for the windows.
XIf your system works with terminfo-database rather than with
Xtermcap,
X.I screen
Xwill understand the `terminfo' command, which has the same effects as
Xthe `termcap' command. Thus users can write one .screenrc file that handles
Xboth cases, although terminfo syntax is slightly different
Xfrom termcap syntax.
X.PP
XThe first argument specifies which terminal(s) should be affected by this
Xdefinition.
XYou can specify multiple terminal names by separating them with `|'s.
XUse `*' to match all terminals and `vt*' to match all terminals that begin
Xwith \*Qvt\*U.
X.PP
XEach \fItweak\fP argument contains one or more termcap defines (separated
Xby `:'s) to be inserted at the start of the appropriate termcap entry,
Xenhancing it or overriding existing values.
XThe first tweak modifies your terminal's termcap, and contains definitions
Xthat your terminal uses to perform certain functions.
XSpecify a null string to leave this unchanged (e.\|g. '').
XThe second (optional) tweak modifies all the window termcaps, and should
Xcontain definitions that screen understands (see the \*QVIRTUAL TERMINAL\*U
Xsection).
X.PP
XSome examples:
X.IP
Xtermcap xterm* LP:hs@
X.PP
XInforms
X.I screen
Xthat all terminals that begin with `xterm' have firm auto-margins that
Xallow the last position on the screen to be updated (LP), but they don't
Xreally have a status line (no 'hs' \- append `@' to turn entries off).
XNote that we assume `LP' for all terminal names that start with \*Qvt\*U,
Xbut only if you don't specify a termcap command for that terminal.
X.IP
Xtermcap vt* LP
Xtermcap vt102|vt220 Z0=\eE[?3h:Z1=\eE[?3l
X.PP
XSpecifies the firm-margined `LP' capability for all terminals that begin with
X`vt', and the second line will also add the escape-sequences to switch
Xinto (Z0) and back out of (Z1) 132-character-per-line mode if this is
Xa vt102 or vt220.
X(You must specify Z0 and Z1 in your termcap to use the width-changing
Xcommands.)
X.IP
Xtermcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
X.PP
XThis leaves your vt100 termcap alone and adds the function key labels to
Xeach window's termcap entry.
X.IP
Xtermcap h19|z19 am@:im=\eE@:ei=\eEO dc=\eE[P
X.PP
XTakes a h19 or z19 termcap and turns off auto-margins (am@) and enables the
Xinsert mode (im) and end-insert (ei) capabilities (the `@' in the `im'
Xstring is after the `=', so it is part of the string).
XHaving the `im' and `ei' definitions put into your terminal's termcap will
Xcause screen to automatically advertise the character-insert capability in
Xeach window's termcap.
XEach window will also get the delete-character capability (dc) added to its
Xtermcap, which screen will translate into a line-update for the terminal
X(we're pretending it doesn't support character deletion).
X.PP
XIf you would like to fully specify each window's termcap entry, you should
Xinstead set the $SCREENCAP variable prior to running
X.IR screen .
XSee the discussion on the \*QVIRTUAL TERMINAL\*U in this manual, and the termcap(5)
Xman page for more information on termcap definitions.
X.sp
X.ne 3
X.B time
X.PP
XUses the message line to display the time of day, the host name, and the load
Xaverages over 1, 5, and 15 minutes (if this is available on your system).
XFor window specific information use \*Qinfo\*U.
X.sp
X.ne 3
X.BI "unsetenv " var
X.PP
XUnset an environment variable.
X.sp
X.ne 3
X.BR "vbell on" | off
X.PP
XIf your terminal does not support
Xa visual bell, a `vbell-message' is displayed in the status line.
XSets the visual bell setting for this window. If your terminal does not support
Xa visual bell, a `vbell-message' is displayed in the status line.
XRefer to the termcap variable `vb' (terminfo: 'flash').
X.sp
X.ne 3
X.BI "vbell_msg " message
X.PP
XSets the visual bell message. \fImessage\fP is printed to the status line if
Xthe window receives a bell character (^G) and vbell is set to \*Qon\*U.
XThe default message is \*QWuff, Wuff!!\*U.
X.sp
X.ne 3
X.BI "vbellwait " sec
X.PP
XDefine a delay in seconds after each display of
X.IR screen 's
Xvisual bell message. The default is 1 second.
X.sp
X.ne 3
X.B version
X.PP
XPrint the current version and the compile date in the status line.
X.sp
X.ne 3
X.BR "width " [ \fInum ]
X.PP
XToggle the window width between 80 and 132 columns or set it to \fInum\fP
Xcolumns if an argument is specified.
XThis requires a capable terminal and the termcap entries \*QZ0\*U and \*QZ1\*U.
XSee the \*Qtermcap\*U command for more information.
X.sp
X.ne 3
X.B windows
X.PP
XUses the message line to display a list of all the windows.
XEach window is listed by number with the name of process that has been
Xstarted in the window (or its a.\|k.\|a.);
Xthe current window is marked with a `*';
Xthe previous window is marked with a `-';
Xall the windows that are \*Qlogged in\*U are marked with a `$';
Xa background window that has received a bell is marked with a `!';
Xa background window that is being monitored and has had activity occur
Xis marked with an `@';
Xa window which has output logging turned on is marked with `(L)'.
X.sp
X.ne 3
X.BR "wrap " [ on | off ]
X.PP
XSets the line-wrap setting for the current window.
XWhen line-wrap is on, the second consecutive printable character output at
Xthe last column of a line will wrap to the start of the following line.
XAs an added feature, backspace (^H) will also wrap through the left margin
Xto the previous line.
XDefault is `on'.
X.sp
X.ne 3
X.B writebuf
X.PP
XWrites the contents of the paste buffer to a public accessible screen-exchange
Xfile. This is thought of as a primitive means of communication between
X.I screen
Xusers on the same host. The filename can be set with the \fIbufferfile\fP
Xcommand and defaults to \*Q/tmp/screen-exchange\*U.
X.sp
X.ne 3
X.B xoff
X.br
X.B xon
X.PP
XInsert a CTRL-s / CTRL-q character to the stdin queue of the
Xcurrent window.
X
X
X.SH "THE MESSAGE LINE"
X.I Screen
Xdisplays informational messages and other diagnostics in a \fImessage line\fP.
XWhile this line is distributed to appear at the bottom of the screen,
Xit can be defined to appear at the top of the screen during compilation.
XIf your terminal has a status line defined in its termcap, screen will use
Xthis for displaying its messages, otherwise a line of the current screen will
Xbe temporarily overwritten and output will be momentarily interrupted. The
Xmessage line is automatically removed after a few seconds delay, but it
Xcan also be removed early (on terminals without a status line) by beginning
Xto type.
X.PP
XThe message line facility can be used by an application running in
Xthe current window by means of the ANSI \fIPrivacy message\fP
Xcontrol sequence.
XFor instance, from within the shell, try something like:
X.IP
Xecho '<esc>^Hello world from window '$WINDOW'<esc>\e\e'
X.PP
Xwhere '<esc>' is an \fIescape\fP, '^' is a literal up-arrow,
Xand '\e\e' turns into a single backslash.
X
X
X.SH "FLOW-CONTROL"
XEach window has a flow-control setting that determines how screen deals with
Xthe XON and XOFF characters (and perhaps the interrupt character).
XWhen flow-control is turned off, screen ignores the XON and XOFF characters,
Xwhich allows the user to send them to the current program by simply typing
Xthem (useful for the \fIemacs\fP editor, for instance).
XThe trade-off is that it will take longer for output from a \*Qnormal\*U
Xprogram to pause in response to an XOFF.
XWith flow-control turned on, XON and XOFF characters are used to immediately
Xpause the output of the current window.
XYou can still send these characters to the current program, but you must use
Xthe appropriate two-character screen commands (typically \*QC-a q\*U (xon)
Xand \*QC-a s\*U (xoff)).
XThe xon/xoff commands are also useful for typing C-s and C-q past a terminal
Xthat intercepts these characters.
X.PP
XEach window has an initial flow-control value set with either the
X.B \-f
Xoption or the \*Qdefflow\*U .screenrc command. Per default the windows
Xare set to automatic flow-switching.
XIt can then be toggled between the three states 'fixed on', 'fixed off' and
X'automatic' interactively with the \*Qflow\*U command bound to "C-a f".
X.PP
XThe automatic flow-switching mode deals with
Xflow control using the TIOCPKT mode (like \*Qrlogin\*U does). If
Xthe tty driver does not support TIOCPKT, screen tries to find out
Xthe right mode based on the current setting of the application
Xkeypad \- when it is enabled, flow-control is turned off and visa versa.
XOf course, you can still manipulate flow-control manually when needed.
X.PP
XIf you're running with flow-control enabled and find that pressing the
Xinterrupt key (usually C-c) does not interrupt the display until another
X6-8 lines have scrolled by, try running screen with the \*Qinterrupt\*U
Xoption (add the \*Qinterrupt\*U flag to the \*Qflow\*U command in
Xyour .screenrc, or use the
X.B \-i
Xcommand-line option).
XThis causes the output that
X.I screen
Xhas accumulated from the interrupted program to be flushed.
XOne disadvantage is that the virtual terminal's memory contains the
Xnon-flushed version of the output, which in rare cases can cause
Xminor inaccuracies in the output.
XFor example, if you switch screens and return, or update the screen
Xwith \*QC-a l\*U you would see the version of the output you would
Xhave gotten without \*Qinterrupt\*U being on.
XAlso, you might need to turn off flow-control (or use auto-flow mode to turn
Xit off automatically) when running a program that expects you to type the
Xinterrupt character as input, as it is possible to interrupt
Xthe output of the virtual terminal to your physical terminal when flow-control
Xis enabled.
XIf this happens, a simple refresh of the screen with \*QC-a l\*U will
Xrestore it.
XGive each mode a try, and use whichever mode you find more comfortable.
X
X
X.SH "ALSO KNOWN AS (A.\|K.\|A.\|)"
XYou can customize each window's name in the window display (viewed with the
X\*Qwindows\*U command (C-a w)) by setting it with one of
Xthe a.\|k.\|a. commands.
XNormally the name displayed is the actual command name of the program
Xcreated in the window.
XHowever, it is sometimes useful to distinguish various programs of the same
Xname or to change the name on-the-fly to reflect the current state of
Xthe window.
X.PP
XThe default name for all shell windows can be set with the \*Qshellaka\*U
Xcommand in the .screenrc file, while all other windows are created with
Xa \*Qscreen\*U command and thus can have their name set with the
X.B \-t
Xoption.
XInteractively, there is the AKA-string escape-sequence
X(<esc>k\fIname\fP<esc>\e) and the \*Qaka\*U command (C-a A).
XThe former can be output from an application to control the window's name
Xunder software control, and the latter will prompt for a name when typed.
XYou can also bind pre-defined names to keys with the \*Qaka\*U command
Xto set things quickly without prompting.
X.PP
XFinally,
X.I screen
Xhas a shell-specific heuristic that is enabled by setting the window's name
Xto \*Q\fIsearch|name\fP\*U and arranging to have a null aka escape-sequence
Xoutput as a part of your prompt.
XThe \fIsearch\fP portion specifies an end-of-prompt search string, while
Xthe \fIname\fP portion specifies the default shell name for the window.
XIf the \fIname\fP ends in a `:'
X.I screen
Xwill add what it believes to be the current command running in the window
Xto the end of the window's shell name (e.\|g. \*Q\fIname:cmd\fP\*U).
XOtherwise the current command name supersedes the shell name while it is
Xrunning.
X.PP
XHere's how it works: you must modify your shell prompt to output a null
Xaka escape-sequence (<esc>k<esc>\e) as a part of your prompt.
XThe last part of your prompt must be the same as the string you specified
Xfor the \fIsearch\fP portion of the a.\|k.\|a.
XOnce this is set up,
X.I screen
Xwill use the aka escape-sequence to clear the previous command name and
Xget ready for the next command.
XThen, when a newline is received from the shell, a search is made for the
Xend of the prompt.
XIf found, it will grab the first word after the matched string and use it
Xas the command name.
XIf the command name begins with either '!', '%', or '^'
X.I screen
Xwill use the first word on the following line (if found) in preference to
Xthe just-found name.
XThis helps csh users get better command names when using job control or
Xhistory recall commands.
X.PP
XHere's some .screenrc examples:
X.IP
Xscreen -t top 2 nice top
X.PP
XAdding this line to your .screenrc would start a nice-d version of the
X\*Qtop\*U command in window 2 name \*Qtop\*U rather than \*Qnice\*U.
X.sp
X.nf
X shellaka '> |csh'
X screen 1
X.fi
X.sp
XThese commands would start a shell with the given shellaka.
XThe a.\|k.\|a. specified is an auto-aka that would expect the prompt and
Xthe typed command to look something like the following:
X.IP
X/usr/joe/src/dir> trn
X.PP
X(it looks after the '> ' for the command name).
XThe window status would show the name \*Qtrn\*U while the command was
Xrunning, and revert to \*Qcsh\*U upon completion.
X.IP
Xbind R screen -t '% |root:' su
X.PP
XHaving this command in your .screenrc would bind the key
Xsequence \*QC-a R\*U to the \*Qsu\*U command and give it an
Xauto-aka name of \*Qroot:\*U.
XFor this auto-aka to work, the screen could look something
Xlike this:
X.sp
X.nf
X % !em
X emacs file.c
X.fi
X.sp
XHere the user typed the csh history command \*Q!em\*U which ran the
Xpreviously entered \*Qemacs\*U command.
XThe window status would show \*Qroot:emacs\*U during the execution
Xof the command, and revert to simply \*Qroot:\*U at its completion.
X.PP
X.nf
X bind o aka
X bind E aka ""
X bind u aka (unknown)
X.fi
X.sp
XThe first binding doesn't have any arguments, so it would prompt you
Xfor an a.\|k.\|a. when you type \*QC-a o\*U.
XThe second binding would clear an auto-aka's current setting (C-a E).
XThe third binding would set the current window's a.\|k.\|a. to \*Q(unknown)\*U
X(C-a u).
X.PP
XOne thing to keep in mind when adding a null aka escape-sequence to
Xyour prompt is that some shells (like the csh) count all the non-control
Xcharacters as part of the prompt's length.
XIf these invisible characters aren't a multiple of 8 then backspacing over
Xa tab will result in an incorrect display.
XOne way to get around this is to use a prompt like this:
X.IP
Xset prompt='^[[0000m^[k^[\e% '
X.PP
XThe escape-sequence \*Q<esc>[0000m\*U not only normalizes the character
Xattributes, but all the zeros round the length of the invisible characters
Xup to 8.
XBash users will probably want to echo the escape sequence in the
XPROMPT_COMMAND:
X.IP
XPROMPT_COMMAND='echo -n -e "\e033k\e033\e134"'
X.PP
X(I used \*Q\134\*U to output a `\e' because of a bug in bash v1.04).
X
X
X.SH "THE VIRTUAL TERMINAL"
XUsually
X.I screen
Xtries to emulate as much of the VT100/ANSI standard
Xas possible. But if your terminal lacks certain capabilities,
Xthe emulation may not be complete. In these cases
X.I screen
Xhas to tell the applications that some of the features
Xare missing. This is no problem on machines using termcap,
Xbecause
X.I screen
Xcan use the $TERMCAP variable to
Xcustomize the standard screen termcap.
X.PP
XBut if you do a
Xrlogin on another machine or your machine supports only
Xterminfo this method fails. Because of this,
X.I screen
Xoffers a way to deal with these cases.
XHere is how it works:
X.PP
XWhen
X.I screen
Xtries to figure out a terminal name for itself,
Xit first looks
Xfor an entry named \*Qscreen.<term>\*U, where <term> is
Xthe contents of your $TERM variable.
XIf no such entry exists,
X.I screen
Xtries \*Qscreen\*U (or \*Qscreen-w\*U if the terminal is wide
X(132 cols or more)).
XIf even this entry cannot be found, \*Qvt100\*U is used as a
Xsubstitute.
X.PP
XThe idea is that if you have a terminal which doesn't
Xsupport an important feature (e.g. delete char or clear to EOS)
Xyou can build a new termcap/terminfo entry for
X.I screen
X(named \*Qscreen.<dumbterm>\*U) in which this capability
Xhas been disabled. If this entry is installed on your
Xmachines you are able to do
Xa rlogin and still keep the correct termcap/terminfo entry.
XThe terminal name is put in the $TERM variable
Xof all new windows.
X.I Screen
Xalso sets the $TERMCAP variable reflecting the capabilities
Xof the virtual terminal emulated. Notice that, however, on machines
Xusing the terminfo database this variable has no effect.
XFurthermore, the variable $WINDOW is set to the window number
Xof each window.
X.PP
XThe actual set of capabilities supported by the virtual terminal
Xdepends on the capabilities supported by the physical terminal.
XIf, for instance, the physical terminal does not support underscore mode,
X.I screen
Xdoes not put the `us' and `ue' capabilities into the window's $TERMCAP
Xvariable, accordingly.
XHowever, a minimum number of capabilities must be supported by a
Xterminal in order to run
X.IR screen ;
Xnamely scrolling, clear screen, and direct cursor addressing
X(in addition,
X.I screen
Xdoes not run on hardcopy terminals or on terminals that over-strike).
X.PP
XAlso, you can customize the $TERMCAP value used by
X.I screen
Xby using the \*Qtermcap\*U .screenrc command, or
Xby defining the variable $SCREENCAP prior to startup.
XWhen the is latter defined, its value will be copied verbatim into each
Xwindow's $TERMCAP variable.
XThis can either be the full terminal definition, or a filename where the
Xterminal \*Qscreen\*U (and/or \*Qscreen-w\*U) is defined.
X.PP
XNote that
X.I screen
Xhonors the \*Qterminfo\*U .screenrc command if the system uses the
Xterminfo database rather than termcap.
X.PP
XWhen the boolean `G0' capability is present in the termcap entry
Xfor the terminal on which
X.I screen
Xhas been called, the terminal emulation of
X.I screen
Xsupports multiple character sets.
XThis allows an application to make use of, for instance,
Xthe VT100 graphics character set or national character sets.
XThe following control functions from ISO 2022 are supported:
X\fIlock shift G0\fP (\fISI\fP), \fIlock shift G1\fP (\fISO\fP),
X\fIlock shift G2\fP, \fIlock shift G3\fP, \fIsingle shift G2\fP,
Xand \fIsingle shift G3\fP.
XWhen a virtual terminal is created or reset, the ASCII character
Xset is designated as \fIG0\fP through \fIG3\fP.
XWhen the `G0' capability is present, screen evaluates the capabilities
X`S0', `E0', and `C0' if present. `S0' is the sequence the terminal uses
Xto enable and start the graphics character set rather than \fISI\fP.
X`E0' is the corresponding replacement for \fISO\fP. `C0' gives a character
Xby character translation string that is used during semi-graphics mode. This
Xstring is built like the `acsc' terminfo capability.
X.PP
XWhen the `po' and `pf' capabilities are present in the terminal's
Xtermcap entry, applications running in a
X.I screen
Xwindow can send output to the printer port of the terminal.
XThis allows a user to have an application in one window
Xsending output to a printer connected to the terminal, while all
Xother windows are still active (the printer port is enabled
Xand disabled again for each chunk of output).
XAs a side-effect, programs running in different windows can
Xsend output to the printer simultaneously.
XData sent to the printer is not displayed in the window.
X.PP
XSome capabilities are only put into the $TERMCAP
Xvariable of the virtual terminal if they can be efficiently
Ximplemented by the physical terminal.
XFor instance, `dl' (delete line) is only put into the $TERMCAP
Xvariable if the terminal supports either delete line itself or
Xscrolling regions. Note that this may provoke confusion, when
Xthe session is reattached on a different terminal, as the value
Xof $TERMCAP cannot be modified by parent processes.
X.PP
XThe following is a list of control sequences recognized by
X.IR screen .
X\*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI- or
XISO-specific functions, respectively.
X.PP
X.ta 22n
X.TP 27
X.B "ESC E"
XNext Line
X.TP 27
X.B "ESC D"
XIndex
X.TP 27
X.B "ESC M"
XReverse Index
X.TP 27
X.B "ESC H"
XHorizontal Tab Set
X.TP 27
X.B "ESC Z"
XSend VT100 Identification String
X.TP 27
X.BR "ESC 7" " (V)"
XSave Cursor and Attributes
X.TP 27
X.BR "ESC 8" " (V)"
XRestore Cursor and Attributes
X.TP 27
X.BR "ESC [s" " (A)"
XSave Cursor and Attributes
X.TP 27
X.BR "ESC [u" " (A)"
XRestore Cursor and Attributes
X.TP 27
X.B "ESC c"
XReset to Initial State
X.TP 27
X.BR "ESC =" " (V)"
XApplication Keypad Mode
X.TP 27
X.BR "ESC >" " (V)"
XNumeric Keypad Mode
X.TP 27
X.BR "ESC # 8" " (V)"
XFill Screen with E's
X.TP 27
X.BR "ESC \e" " (A)"
XString Terminator
X.TP 27
X.BR "ESC ^" " (A)"
XPrivacy Message String (Message Line)
X.TP 27
X.B "ESC !"
XGlobal Message String (Message Line)
X.TP 27
X.B "ESC k"
XA.\|k.\|a. Definition String
X.TP 27
X.BR "ESC P" " (A)"
XDevice Control String.
XOutputs a string directly to the host
Xterminal without interpretation.
X.TP 27
X.BR "ESC _" " (A)"
XApplication Program Command (not used)
X.TP 27
X.BR "ESC ]" " (A)"
XOperating System Command (not used)
X.TP 27
X.BR "Control-N" " (A)"
XLock Shift G1 (SO)
X.TP 27
X.BR "Control-O" " (A)"
XLock Shift G0 (SI)
X.TP 27
X.BR "ESC n" " (A)"
XLock Shift G2
X.TP 27
X.BR "ESC o" " (A)"
XLock Shift G3
X.TP 27
X.BR "ESC N" " (A)"
XSingle Shift G2
X.TP 27
X.BR "ESC O" " (A)"
XSingle Shift G3
X.TP 27
X.BR "ESC ( \fPPcs" " (A)"
XDesignate character set as G0
X.TP 27
X.BR "ESC ) \fPPcs" " (A)"
XDesignate character set as G1
X.TP 27
X.BR "ESC * \fPPcs" " (A)"
XDesignate character set as G2
X.TP 27
X.BR "ESC + \fPPcs" " (A)"
XDesignate character set as G3
X.TP 27
X.B "ESC [ \fPPn\fB ; \fPPn\fB H"
XDirect Cursor Addressing
X.TP 27
X.B "ESC [ \fPPn\fB ; \fPPn\fB f"
XDirect Cursor Addressing
X.TP 27
X.B "ESC [ \fPPn\fB J"
XErase in Display
X.TP 27
X\h'\w'ESC [ 'u'Pn = None or \fB0\fP
XFrom Cursor to End of Screen
X.TP 27
X\h'\w'ESC [ Pn = 'u'\fB1\fP
XFrom Beginning of Screen to Cursor
X.TP 27
X\h'\w'ESC [ Pn = 'u'\fB2\fP
XEntire Screen
X.TP 27
X.B "ESC [ \fPPn\fB K"
XErase in Line
X.TP 27
X\h'\w'ESC [ 'u'Pn = None or \fB0\fP
XFrom Cursor to End of Line
X.TP 27
X\h'\w'ESC [ Pn = 'u'\fB1\fP
XFrom Beginning of Line to Cursor
X.TP 27
X\h'\w'ESC [ Pn = 'u'\fB2\fP
XEntire Line
X.TP 27
X.B "ESC [ \fPPn\fB A"
XCursor Up
X.TP 27
X.B "ESC [ \fPPn\fB B"
XCursor Down
X.TP 27
X.B "ESC [ \fPPn\fB C"
XCursor Right
X.TP 27
X.B "ESC [ \fPPn\fB D"
XCursor Left
X.TP 27
X.B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB m"
XSelect Graphic Rendition
X.TP 27
X\h'\w'ESC [ 'u'Ps = None or \fB0\fP
XDefault Rendition
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB1\fP
XBold
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB2\fP (A)
XFaint
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB3\fP (A)
X\fIStandout\fP Mode (ANSI: Italicized)
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB4\fP
XUnderlined
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB5\fP
XBlinking
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB7\fP
XNegative Image
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB22\fP (A)
XNormal Intensity
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB23\fP (A)
X\fIStandout\fP Mode off (ANSI: Italicized off)
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB24\fP (A)
XNot Underlined
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB25\fP (A)
XNot Blinking
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB27\fP (A)
XPositive Image
X.TP 27
X.B "ESC [ \fPPn\fB g"
XTab Clear
X.TP 27
X\h'\w'ESC [ 'u'Pn = None or \fB0\fP
XClear Tab at Current Position
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB3\fP
XClear All Tabs
X.TP 27
X.BR "ESC [ \fPPn\fB ; \fPPn\fB r" " (V)"
XSet Scrolling Region
X.TP 27
X.BR "ESC [ \fPPn\fB I" " (A)"
XHorizontal Tab
X.TP 27
X.BR "ESC [ \fPPn\fB Z" " (A)"
XBackward Tab
X.TP 27
X.BR "ESC [ \fPPn\fB L" " (A)"
XInsert Line
X.TP 27
X.BR "ESC [ \fPPn\fB M" " (A)"
XDelete Line
X.TP 27
X.BR "ESC [ \fPPn\fB @" " (A)"
XInsert Character
X.TP 27
X.BR "ESC [ \fPPn\fB P" " (A)"
XDelete Character
X.TP 27
X.B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB h"
XSet Mode
X.TP 27
X.B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB l"
XReset Mode
X.TP 27
X\h'\w'ESC [ 'u'Ps = \fB4\fP (A)
XInsert Mode
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB?1\fP (V)
XApplication Cursor Keys
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB?3\fP (V)
XChange Terminal Width to 132 columns
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB?5\fP (V)
XVisible Bell (\fIOn\fP followed by \fIOff\fP)
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB?6\fP (V)
X\fIOrigin\fP Mode
X.TP 27
X\h'\w'ESC [ Ps = 'u'\fB?7\fP (V)
X\fIWrap\fP Mode
X.TP 27
X.BR "ESC [ 5 i" " (A)"
XStart relay to printer (ANSI Media Copy)
X.TP 27
X.BR "ESC [ 4 i" " (A)"
XStop relay to printer (ANSI Media Copy)
X.TP 27
X.B "ESC [ 8 ; \fPPh\fB ; \fPPw\fB t"
XResize the window to `Ph' lines and `Pw' columns (SunView special)
X.TP 27
X.B "ESC [ c"
XSend VT100 Identification String
X.TP 27
X.B "ESC [ 6 n"
XSend Cursor Position Report
X
X
X.SH SPECIAL TERMINAL CAPABILITIES
XThe following table describes all terminal capabilities
Xthat are recognized by \fIscreen\fP and are not in the
Xtermcap(5) manual.
X.PP
X.ta 5n
X.TP 13
X.BI LP " (bool)"
XTerminal has vt100 style margins (`magic margins'). Note that
Xthis capability is obsolete because \fIscreen\fP uses 'xn'
Xinstead.
X.TP 13
X.BI Z0 " (str)"
XChange width to 132 columns.
X.TP 13
X.BI Z1 " (str)"
XChange width to 80 columns.
X.TP 13
X.BI WS " (str)"
XResize display. This capability has the desired width and height as
Xarguments. \fISunView(tm)\fP example: '\eE[8;%d;%dt'.
X.TP 13
X.BI B8 " (str)"
XTell \fIscreen\fP to look out for characters with 8th bit set. If such
Xa character is found \fIscreen\fP processes the specified string
Xand than outputs the character with the 8th bit stripped off.
XNote that the string can contain any esc-sequences known to
X\fIscreen\fP, too. (Example: Single Shift G2 = \eEN.)
X.TP 13
X.BI OP " (bool)"
XDon't do a full vt100 style margin emulation. Same as the -O option.
X.TP 13
X.BI NF " (bool)"
XTerminal doesn't need flow control. Send ^S and ^Q direct to
Xthe application. Same as 'flow off'. The opposite of this
Xcapability is 'xo'.
X.TP 13
X.BI G0 " (bool)"
XTerminal can deal with ISO2022 font selection sequences.
X.TP 13
X.BI S0 " (str)"
XSwitch charset 'G0' to the specified charset. Default
Xis '\eE(%d'.
X.TP 13
X.BI E0 " (str)"
XSwitch charset 'G0' back to standard charset. Default
Xis '\eE(B'.
X.TP 13
X.BI C0 " (str)"
XUse the string as a conversion table for font '0'. See
Xthe 'ac' capability for more details.
X.TP 13
X.BI CS " (str)"
XSwitch cursorkeys to application mode.
X.TP 13
X.BI CE " (str)"
XSwitch cursorkeys back to normal mode.
X.TP 13
X.BI AN " (bool)"
XTurn on autonuke. See the 'autonuke' command for more details.
X.TP 13
X.BI OL " (num)"
XSet the output buffer limit. See the 'obuflimit' command for more details.
X
X
X.SH ENVIRONMENT
X.PD 0
X.IP COLUMNS 15
XNumber of columns on the terminal (overrides termcap entry).
X.IP HOME
XDirectory in which to look for .screenrc.
X.IP ISCREENRC
XAlternate user screenrc file.
X.IP LINES
XNumber of lines on the terminal (overrides termcap entry).
X.IP LOCKPRG
XScreen lock program.
X.IP NETHACKOPTIONS
XTurns on nethack option.
X.IP PATH
XUsed for locating programs to run.
X.IP SCREENCAP
XFor customizing a terminal's TERMCAP value.
X.IP SCREENDIR
XAlternate socket directory.
X.IP SCREENRC
XAlternate user screenrc file.
X.IP SHELL
XDefault shell program for opening windows (default \*Q/bin/sh\*U).
X.IP STY
XAlternate socket name.
X.IP SYSSCREENRC
XAlternate system screenrc file.
X.IP TERM
XTerminal name.
X.IP TERMCAP
XTerminal description.
X
X
X.SH FILES
X.PD 0
X.IP $SYSSCREENRC 28
X.IP /local/etc/screenrc
X\fIscreen\fP initialization commands
X.IP $ISCREENRC
X.IP $SCREENRC
X.IP $HOME/.iscreenrc
X.IP $HOME/.screenrc
XRead in after /local/etc/screenrc
X.IP $ISCREENDIR/S-<login>
X.IP $SCREENDIR/S-<login>
X.IP /local/screens/S-<login>
XSocket directories (default)
X.IP /usr/tmp/screens/S-<login>
XAlternate socket directories.
X.IP "<socket directory>/.termcap"
XWritten by the "termcap" output function
X.IP /usr/tmp/screens/screen-exchange
Xor
X.IP /tmp/screen-exchange
X\fIscreen\fP `interprocess communication buffer'
X.IP hardcopy.[0-9]
XScreen images created by the hardcopy function
X.IP screenlog.[0-9]
XOutput log files created by the log function
X.IP /usr/lib/terminfo/?/*
Xor
X.IP /etc/termcap
XTerminal capability databases
X.IP /etc/utmp
XLogin records
X.IP $LOCKPRG
XProgram that locks a terminal.
X
X
X.SH "SEE ALSO"
Xtermcap(5), utmp(5), vi(1), captoinfo(1), tic(1)
X
X
X.SH AUTHORS
XOriginally created by Oliver Laumann, this latest version was
Xproduced by Wayne Davison, Juergen Weigert and Michael Schroeder.
X
X.SH COPYLEFT
XCopyright (C) 1993
X Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
X Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
XCopyright (C) 1987 Oliver Laumann
X.PP
XThis program is free software; you can redistribute it and/or modify
Xit under the terms of the GNU General Public License as published by
Xthe Free Software Foundation; either version 2, or (at your option)
Xany later version.
X.PP
XThis program is distributed in the hope that it will be useful,
Xbut WITHOUT ANY WARRANTY; without even the implied warranty of
XMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
XGNU General Public License for more details.
X.PP
XYou should have received a copy of the GNU General Public License
Xalong with this program (see the file COPYING); if not, write to the
XFree Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
X
X.SH CONTRIBUTORS
X.nf
XKen Beal (kbeal@amber.ssd.csd.harris.com),
XRudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de),
XToerless Eckert (eckert@immd4.informatik.uni-erlangen.de),
XWayne Davison (davison@borland.com),
XPatrick Wolfe (pat@kai.com, kailand!pat),
XBart Schaefer (schaefer@cse.ogi.edu),
XNathan Glasser (nathan@brokaw.lcs.mit.edu),
XLarry W. Virden (lvirden@cas.org),
XHoward Chu (hyc@hanauma.jpl.nasa.gov),
XTim MacKenzie (tym@dibbler.cs.monash.edu.au),
XMarkku Jarvinen (mta@{cc,cs,ee}.tut.fi),
XMarc Boucher (marc@CAM.ORG),
XDoug Siebert (dsiebert@isca.uiowa.edu),
XKen Stillson (stillson@tsfsrv.mitre.org),
XIan Frechett (frechett@spot.Colorado.EDU),
XBrian Koehmstedt (bpk@gnu.ai.mit.edu),
XDon Smith (djs6015@ultb.isc.rit.edu),
XFrank van der Linden (vdlinden@fwi.uva.nl),
XMartin Schweikert (schweik@cpp.ob.open.de),
XDavid Vrona (dave@sashimi.lcu.com),
XE. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
XMatthew Green (phone@coombs.anu.edu.au),
XChristopher Williams (cgw@unt.edu),
XMatt Mosley (mattm@access.digex.net),
XGregory Neil Shapiro (gshapiro@wpi.WPI.EDU).
X.fi
X
X
X.SH VERSION
XThis is version 3.3. Its roots are a merge of a custom version
X2.3PR7 by Wayne Davison
Xand several enhancements to Oliver Laumann's version 2.0. Note that all versions
Xnumbered 2.x are copyright by Oliver Laumann.
X
X
X.SH BUGS
X.PD
X.IP \(bu 3
X`dm' (delete mode) and `xs' are not handled
Xcorrectly (they are ignored). `xn' is treated as a magic-margin
Xindicator.
X.IP \(bu
XThe \fIGR\fP set of ISO 2022 is not supported.
X.IP \(bu
XThere is no keyboard input translation to VT100 sequences.
X.IP \(bu
XIt is not possible to change the environment variable $TERMCAP when
Xreattaching under a different terminal type.
X.IP \(bu
XThe support of terminfo based systems is very limited. Adding extra
Xcapabilities to $TERMCAP may not have any effects.
X.IP \(bu
X.I Screen
Xdoes not make use of hardware tabs.
X.IP \(bu
X.I Screen
Xmust be installed as set-uid with owner root in order to be able
Xto correctly change the owner of the tty device file for each
Xwindow.
XSpecial permission may also be required to write the file \*Q/etc/utmp\*U.
X.IP \(bu
XEntries in \*Q/etc/utmp\*U are not removed when
X.I screen
Xis killed with SIGKILL.
XThis will cause some programs (like "w" or "rwho")
Xto advertise that a user is logged on who really isn't.
X.IP \(bu
X.I Screen
Xmay give a strange warning when your tty has no utmp entry.
X.IP \(bu
XSend bugreports, fixes, enhancements, t-shirts, money, beer & pizza to
X.BR screen@uni-erlangen.de .
X
END_OF_FILE
if test 82010 -ne `wc -c <'doc/screen.1'`; then
echo shar: \"'doc/screen.1'\" unpacked with wrong size!
fi
# end of 'doc/screen.1'
fi
echo shar: End of archive 9 \(of 10\).
cp /dev/null ark9isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 10 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0