Warning: Undefined array key "stylesheets" in /home/public/screen/inc/StyleUtils.php on line 102

Site Tools

termcapinfo (termcap, terminfo)

termcap, terminfo, and termcapinfo all have the same syntax and purpose; their only differences are that termcap only affects systems that use termcap, terminfo only affects systems that use terminfo, and termcapinfo affects both.

Default Keybindings



  • termcap term terminal-tweaks [window-tweaks]
  • terminfo term terminal-tweaks [window-tweaks]
  • termcapinfo term terminal-tweaks [window-tweaks]


Use this command to modify your terminal's termcap entry without going through all the hassles involved in creating a custom termcap entry. Plus, you can optionally customize the termcap generated for the windows. You have to place these commands in one of the screenrc startup files, as they are meaningless once the terminal emulator is booted.

If your system works using the terminfo database rather than termcap, screen will understand the terminfo command, which has the same effects as the termcap command. Two separate commands are provided, as there are subtle syntactic differences, e.g. when parameter interpolation (using %) is required. Note that termcap names of the capabilities have to be used with the terminfo command.

In many cases, where the arguments are valid in both terminfo and termcap syntax, you can use the command termcapinfo, which is just a shorthand for a pair of termcap and terminfo commands with identical arguments.

The first argument specifies which terminal(s) should be affected by this definition. You can specify multiple terminal names by separating them with |s. Use * to match all terminals and vt* to match all terminals that begin with “vt”.

Each tweak argument contains one or more termcap defines (separated by :s) to be inserted at the start of the appropriate termcap entry, enhancing it or overriding existing values. The first tweak modifies your terminal's termcap, and contains definitions that your terminal uses to perform certain functions. Specify a null string to leave this unchanged (e.g. “”). The second (optional) tweak modifies all the window termcaps, and should contain definitions that screen understands (see the “The Virtual Terminal” section).

If you would like to fully specify each window's termcap entry, you should instead set the $SCREENCAP variable prior to running screen. See the discussion on the “The Virtual Terminal” in this manual, and the termcap(5) man page for more information on termcap definitions.


termcap xterm*  LP:hs@

Informs screen that all terminals that begin with “xterm” have firm auto-margins that allow the last position on the screen to be updated (LP), but they don't really have a status line (no hs - append @ to turn entries off). Note that we assume LP for all terminal names that start with “vt”, but only if you don't specify a termcap command for that terminal.

termcap vt*  LP
termcap vt102|vt220  Z0=\E[?3h:Z1=\E[?3l

Specifies the firm-margined LP capability for all terminals that begin with “vt”, and the second line will also add the escape-sequences to switch into (Z0) and back out of (Z1) 132-character-per-line mode if this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap to use the width-changing commands.)

termcap vt100  ""  l0=PF1:l1=PF2:l2=PF3:l3=PF4

This leaves your vt100 termcap alone and adds the function key labels to each window's termcap entry.

termcap h19|z19  am@:im=\E@:ei=\EO  dc=\E[P

Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables the insert mode (im) and end-insert (ei) capabilities (the @ in the im string is after the =, so it is part of the string). Having the im and ei definitions put into your terminal's termcap will cause screen to automatically advertise the character-insert capability in each window's termcap. Each window will also get the delete-character capability (dc) added to its termcap, which screen will translate into a line-update for the terminal (we're pretending it doesn't support character deletion).

See Also

User Tools