This section describes the commands for creating a new window for
running programs. When a new window is created, the first available
number from the range 0...9 is assigned to it. There can be no more
than 10 windows active at any one time unless screen
was compiled
with a higher MAXWIN setting.
screen
to the specified directory
or, if called without an argument, to your home directory (the value of
the environment variable $HOME
). All windows that are created by means
of the screen
command from within `.screenrc' or by means of
C-a : screen ... or C-a c use this as their default
directory. Without a chdir
command, this would be the directory
from which screen
was invoked. Hardcopy and log files are always
written to the window's default directory, not the current
directory of the process running in the window. You can use this
command multiple times in your `.screenrc' to start various windows
in different default directories, but the last chdir
value will
affect all the windows you create interactively.
screen
, this command (with the given
arguments) is started in the window; otherwise, a shell is created.
If a tty (character special device) name (e.g. `/dev/ttyS0') is specified as cmd, then the window is directly connected to this device. This is similar to the cmd `kermit -l /dev/ttyS0 -c' but saves resources and is more efficient.
Thus, if your `.screenrc' contains the lines
# example for .screenrc: screen 1 screen -fn -t foobar 2 telnet foobar
screen
creates a shell window (in window #1) and a window with a
TELNET connection to the machine foobar (with no flow-control using the
title `foobar' in window #2). If you do not include any
screen
commands in your `.screenrc' file, then screen
defaults to creating a single shell window, number zero. When the
initialization is completed, screen
switches to the last window
specified in your .screenrc file or, if none, it opens default window
#0.
$SHELL
. This is useful if
you'd like to run a tty-enhancer which is expecting to execute the
program specified in $SHELL
. If the command begins with
a `-' character, the shell will be started as a login-shell.
screen
opens, it sets the $TERM
variable to `screen' by default, unless no description for
`screen' is installed in the local termcap or terminfo data base.
In that case it pretends that the terminal emulator is `vt100'.
This won't do much harm, as screen
is VT100/ANSI compatible. The
use of the term
command is discouraged for non-default purpose.
That is, one may want to specify special $TERM
settings (e.g. vt100) for
the next screen rlogin othermachine
command. Use the command
screen -T vt100 rlogin othermachine
rather than setting
and resetting the default.