   This file documents the `Screen' virtual terminal manager.

   Copyright (c) 1993-2003 Free Software Foundation, Inc.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Foundation.

22 Environment Variables
************************

`COLUMNS'
     Number of columns on the terminal (overrides termcap entry).

`HOME'
     Directory in which to look for .screenrc.

`LINES'
     Number of lines on the terminal (overrides termcap entry).

`LOCKPRG'
     Screen lock program.

`NETHACKOPTIONS'
     Turns on `nethack' option.

`PATH'
     Used for locating programs to run.

`SCREENCAP'
     For customizing a terminal's `TERMCAP' value.

`SCREENDIR'
     Alternate socket directory.

`SCREENRC'
     Alternate user screenrc file.

`SHELL'
     Default shell program for opening windows (default `/bin/sh').

`STY'
     Alternate socket name. If `screen' is invoked, and the environment
     variable `STY' is set, then it creates only a window in the
     running `screen' session rather than starting a new session.

`SYSSCREENRC'
     Alternate system screenrc file.

`TERM'
     Terminal name.

`TERMCAP'
     Terminal description.

`WINDOW'
     Window number of a window (at creation time).

23 Files Referenced
*******************

`.../screen-4.?.??/etc/screenrc'
`.../screen-4.?.??/etc/etcscreenrc'
     Examples in the `screen' distribution package for private and
     global initialization files.

``$SYSSCREENRC''
`/etc/screenrc'
     `screen' initialization commands

``$SCREENRC''
``$HOME'/.iscreenrc'
``$HOME'/.screenrc'
     Read in after /etc/screenrc

``$SCREENDIR'/S-LOGIN'

`/var/run/screen/S-LOGIN'
     Socket directories (default)

`/usr/tmp/screens/S-LOGIN'
     Alternate socket directories.

`SOCKET DIRECTORY/.termcap'
     Written by the `dumptermcap' command

`/usr/tmp/screens/screen-exchange or'
`/tmp/screen-exchange'
     `screen' interprocess communication buffer

`hardcopy.[0-9]'
     Screen images created by the hardcopy command

`screenlog.[0-9]'
     Output log files created by the log command

`/usr/lib/terminfo/?/* or'
`/etc/termcap'
     Terminal capability databases

`/var/run/utmp'
     Login records

``$LOCKPRG''
     Program for locking the terminal.

24 Credits
**********

Authors
=======

   Originally created by Oliver Laumann, this latest version was
produced by Wayne Davison, Juergen Weigert and Michael Schroeder.

Contributors
============

          Ken Beal (kbeal@amber.ssd.csd.harris.com),
          Rudolf Koenig (rfkoenig@informatik.uni-erlangen.de),
          Toerless Eckert (eckert@informatik.uni-erlangen.de),
          Wayne Davison (davison@borland.com),
          Patrick Wolfe (pat@kai.com, kailand!pat),
          Bart Schaefer (schaefer@cse.ogi.edu),
          Nathan Glasser (nathan@brokaw.lcs.mit.edu),
          Larry W. Virden (lvirden@cas.org),
          Howard Chu (hyc@hanauma.jpl.nasa.gov),
          Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
          Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
          Marc Boucher (marc@CAM.ORG),
          Doug Siebert (dsiebert@isca.uiowa.edu),
          Ken Stillson (stillson@tsfsrv.mitre.org),
          Ian Frechett (frechett@spot.Colorado.EDU),
          Brian Koehmstedt (bpk@gnu.ai.mit.edu),
          Don Smith (djs6015@ultb.isc.rit.edu),
          Frank van der Linden (vdlinden@fwi.uva.nl),
          Martin Schweikert (schweik@cpp.ob.open.de),
          David Vrona (dave@sashimi.lcu.com),
          E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
          Matthew Green (mrg@eterna.com.au),
          Christopher Williams (cgw@pobox.com),
          Matt Mosley (mattm@access.digex.net),
          Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
          Jason Merrill (jason@jarthur.Claremont.EDU),
          Johannes Zellner (johannes@zellner.org),
          Pablo Averbuj (pablo@averbuj.com).

Version
=======

   This manual describes version 4.0.2 of the `screen' program. Its
roots are a merge of a custom version 2.3PR7 by Wayne Davison and
several enhancements to Oliver Laumann's version 2.0.  Note that all
versions numbered 2.x are copyright by Oliver Laumann.

   See also Availability.

25 Bugs
*******

Just like any other significant piece of software, `screen' has a few
bugs and missing features.  Please send in a bug report if you have
found a bug not mentioned here.

25.1 Known Bugs
===============

   * `dm' (delete mode) and `xs' are not handled correctly (they are
     ignored).  `xn' is treated as a magic-margin indicator.

   * `screen' has no clue about double-high or double-wide characters.
     But this is the only area where `vttest' is allowed to fail.

   * It is not possible to change the environment variable `$TERMCAP'
     when reattaching under a different terminal type.

   * The support of terminfo based systems is very limited. Adding extra
     capabilities to `$TERMCAP' may not have any effects.

   * `screen' does not make use of hardware tabs.

   * `screen' must be installed setuid root on most systems in order to
     be able to correctly change the owner of the tty device file for
     each window.  Special permission may also be required to write the
     file `/var/run/utmp'.

   * Entries in `/var/run/utmp' are not removed when `screen' is killed
     with SIGKILL.  This will cause some programs (like "w" or "rwho")
     to advertise that a user is logged on who really isn't.

   * `screen' may give a strange warning when your tty has no utmp
     entry.

   * When the modem line was hung up, `screen' may not automatically
     detach (or quit) unless the device driver sends a HANGUP signal.
     To detach such a `screen' session use the -D or -d command line
     option.

   * If a password is set, the command line options -d and -D still
     detach a session without asking.

   * Both `breaktype' and `defbreaktype' change the break generating
     method used by all terminal devices. The first should change a
     window specific setting, where the latter should change only the
     default for new windows.

   * When attaching to a multiuser session, the user's `.screenrc' file
     is not sourced. Each users personal settings have to be included
     in the `.screenrc' file from which the session is booted, or have
     to be changed manually.

   * A weird imagination is most useful to gain full advantage of all
     the features.

25.2 Reporting Bugs
===================

If you find a bug in `Screen', please send electronic mail to
`screen@uni-erlangen.de', and also to `bug-gnu-utils@prep.ai.mit.edu'.
Include the version number of `Screen' which you are using.  Also
include in your message the hardware and operating system, the compiler
used to compile, a description of the bug behavior, and the conditions
that triggered the bug. Please recompile `screen' with the `-DDEBUG'
options enabled, reproduce the bug, and have a look at the debug output
written to the directory `/tmp/debug'. If necessary quote suspect
passages from the debug output and show the contents of your `config.h'
if it matters.

25.3 Availability
=================

`Screen' is available under the `GNU' copyleft.

   The latest official release of `screen' available via anonymous ftp
from `prep.ai.mit.edu', `nic.funet.fi' or any other `GNU' distribution
site.  The home site of `screen' is `ftp.uni-erlangen.de
(131.188.3.71)', in the directory `pub/utilities/screen'.  The
subdirectory `private' contains the latest beta testing release.  If
you want to help, send a note to screen@uni-erlangen.de.

26 Installation
***************

Since `screen' uses pseudo-ttys, the select system call, and
UNIX-domain sockets/named pipes, it will not run under a system that
does not include these features of 4.2 and 4.3 BSD UNIX.

26.1 Socket Directory
=====================

The socket directory defaults either to `$HOME/.screen' or simply to
`/tmp/screens' or preferably to `/var/run/screen' chosen at
compile-time. If `screen' is installed setuid root, then the
administrator should compile screen with an adequate (not NFS mounted)
`SOCKDIR'. If `screen' is not running setuid-root, the user can specify
any mode 700 directory in the environment variable `$SCREENDIR'.

26.2 Compiling Screen
=====================

To compile and install screen:

   The `screen' package comes with a `GNU Autoconf' configuration
script. Before you compile the package run

                           `sh ./configure'

   This will create a `config.h' and `Makefile' for your machine.  If
`configure' fails for some reason, then look at the examples and
comments found in the `Makefile.in' and `config.h.in' templates.
Rename `config.status' to `config.status.MACHINE' when you want to keep
configuration data for multiple architectures. Running `sh
./config.status.MACHINE' recreates your configuration significantly
faster than rerunning `configure'.
Read through the "User Configuration" section of `config.h', and verify
that it suits your needs.  A comment near the top of this section
explains why it's best to install screen setuid to root.  Check for the
place for the global `screenrc'-file and for the socket directory.
Check the compiler used in `Makefile', the prefix path where to install
`screen'. Then run

                                `make'

   If `make' fails to produce one of the files `term.h', `comm.h' or
`tty.c', then use `FILENAME.X.dist' instead.  For additional
information about installation of `screen' refer to the file
`INSTALLATION', coming with this package.

Command Index
*************

This is a list of all the commands supported by `screen'.

Keystroke Index
***************

This is a list of the default key bindings.

   The leading escape character (see Command Character) has been
omitted from the key sequences, since it is the same for all bindings.