Go to the first, previous, next, last section, table of contents.


New Window

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. The number of windows is limited at compile-time by the MAXWIN configuration parameter.

Chdir

Command: chdir [directory]
(none)
Change the current directory of 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 Command

Command: screen [opts] [n] [cmd [args]]
(C-a c, C-a C-c)
Establish a new window. The flow-control options (`-f', `-fn' and `-fa'), title option (`-t'), login options (`-l' and `-ln') , terminal type option (`-T term'), the all-capability-flag (`-a') and scrollback option (`-h num') may be specified with each command. The option (`-M') turns monitoring on for this window. The option (`-L') turns output logging on for this window. If an optional number n in the range 0...9 is given, the window number n is assigned to the newly created window (or, if this number is already in-use, the next available number). If a command is specified after screen, this command (with the given arguments) is started in the window; otherwise, a shell is created.

Screen has built in some functionality of `cu' and `telnet'. See section Window Types.

Thus, if your `.screenrc' contains the lines

# example for .screenrc:
screen 1
screen -fn -t foobar 2 -L 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) and will write a logfile `screenlog.2' of the telnet session. 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.

Setenv

Command: setenv var string
(none)
Set the environment variable var to value string. If only var is specified, the user will be prompted to enter a value. If no parameters are specified, the user will be prompted for both variable and value. The environment is inherited by all subsequently forked shells.

Command: unsetenv var
(none)
Unset an environment variable.

Shell

Command: shell command
Command: defshell command
(none)
Set the command to be used to create a new shell. This overrides the value of the environment variable $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.

defshell is currently a synonym to the shell command.

Command: shelltitle title
(none)
Set the title for all shells created during startup or by the C-a C-c command. See section Naming Windows (Titles), for details about what titles are.

Term

Command: term term
(none)
In each window 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.

Window Types

Screen provides three different window types. New windows are created with screen's `screen' command (see section Screen Command). The first parameter to the `screen' command defines which type of window is created. The different window types are all special cases of the normal type. They have been added in order to allow screen to be used efficiently as a console with 100 or more windows.


Go to the first, previous, next, last section, table of contents.