Go to the previous, next section.

Customizing Screen

You can modify the default settings for screen to fit your tastes either through a personal `.screenrc' file which contains commands to be executed at startup, or on the fly using the colon command.

The `.screenrc' file

When screen is invoked, it executes initialization commands from the files `.screenrc' in the user's home directory and `/usr/local/etc/screenrc'. These defaults can be overridden in the following ways: For the global screenrc file screen searches for the environment variable $SYSSCREENRC (this override feature may be disabled at compile-time). The user specific screenrc file is searched for in $ISCREENRC, then $SCREENRC, then `$HOME/.iscreenrc' and finally defaults to `$HOME/.screenrc'. The command line option `-c' specifies which file to use (see section Invoking Screen. Commands in these files are used to set options, bind commands to keys, and to automatically establish one or more windows at the beginning of your screen session. Commands are listed one per line, with empty lines being ignored. A command's arguments are separated by tabs or spaces, and may be surrounded by single or double quotes. A `#' turns the rest of the line into a comment, except in quotes. Unintelligible lines are warned about and ignored. Commands may contain references to environment variables. The syntax is the shell-like $VAR or ${VAR}. Note that this causes incompatibility with previous screen versions, as now the '$'-character has to be protected with '\' if no variable substitution is intended. A string in single-quotes is also protected from variable substitution.

Two configuration files are shipped as examples with your screen distribution: `etc/screenrc' and `etc/etcscreenrc'. They contain a number of useful examples for various commands.

Colon

Customization can also be done online, with this command:

Command: colon

(C-a :)
Allows you to enter `.screenrc' command lines. Useful for on-the-fly modification of key bindings, specific window creation and changing settings. Note that the set keyword no longer exists, as of version 3.3. Change default settings with commands starting with `def'. You might think of this as the ex command mode of screen, with copy as its vi command mode (see section Copy and Paste).

Go to the previous, next section.