1 This is screen.info, produced by makeinfo version 4.5 from
4 INFO-DIR-SECTION General Commands
6 * Screen: (screen). Full-screen window manager.
9 This file documents the `Screen' virtual terminal manager.
11 Copyright (c) 1993-2003 Free Software Foundation, Inc.
13 Permission is granted to make and distribute verbatim copies of this
14 manual provided the copyright notice and this permission notice are
15 preserved on all copies.
17 Permission is granted to copy and distribute modified versions of
18 this manual under the conditions for verbatim copying, provided that
19 the entire resulting derived work is distributed under the terms of a
20 permission notice identical to this one.
22 Permission is granted to copy and distribute translations of this
23 manual into another language, under the above conditions for modified
24 versions, except that this permission notice may be stated in a
25 translation approved by the Foundation.
28 File: screen.info, Node: Window Termcap, Next: Dump Termcap, Up: Termcap
30 Choosing the termcap entry for a window
31 =======================================
33 Usually `screen' tries to emulate as much of the VT100/ANSI standard
34 as possible. But if your terminal lacks certain capabilities the
35 emulation may not be complete. In these cases `screen' has to tell the
36 applications that some of the features are missing. This is no problem
37 on machines using termcap, because `screen' can use the `$TERMCAP'
38 variable to customize the standard screen termcap.
40 But if you do a rlogin on another machine or your machine supports
41 only terminfo this method fails. Because of this `screen' offers a way
42 to deal with these cases. Here is how it works:
44 When `screen' tries to figure out a terminal name for itself, it
45 first looks for an entry named `screen.TERM', where TERM is the
46 contents of your `$TERM' variable. If no such entry exists, `screen'
47 tries `screen' (or `screen-w', if the terminal is wide (132 cols or
48 more)). If even this entry cannot be found, `vt100' is used as a
51 The idea is that if you have a terminal which doesn't support an
52 important feature (e.g. delete char or clear to EOS) you can build a new
53 termcap/terminfo entry for `screen' (named `screen.DUMBTERM') in which
54 this capability has been disabled. If this entry is installed on your
55 machines you are able to do a rlogin and still keep the correct
56 termcap/terminfo entry. The terminal name is put in the `$TERM'
57 variable of all new windows. `screen' also sets the `$TERMCAP'
58 variable reflecting the capabilities of the virtual terminal emulated.
59 Furthermore, the variable `$WINDOW' is set to the window number of each
62 The actual set of capabilities supported by the virtual terminal
63 depends on the capabilities supported by the physical terminal. If, for
64 instance, the physical terminal does not support underscore mode,
65 `screen' does not put the `us' and `ue' capabilities into the window's
66 `$TERMCAP' variable, accordingly. However, a minimum number of
67 capabilities must be supported by a terminal in order to run `screen';
68 namely scrolling, clear screen, and direct cursor addressing (in
69 addition, `screen' does not run on hardcopy terminals or on terminals
72 Also, you can customize the `$TERMCAP' value used by `screen' by
73 using the `termcap' command, or by defining the variable `$SCREENCAP'
74 prior to startup. When the latter defined, its value will be copied
75 verbatim into each window's `$TERMCAP' variable. This can either be
76 the full terminal definition, or a filename where the terminal `screen'
77 (and/or `screen-w') is defined.
79 Note that `screen' honors the `terminfo' command if the system uses
80 the terminfo database rather than termcap. On such machines the
81 `$TERMCAP' variable has no effect and you must use the `dumptermcap'
82 command (*note Dump Termcap::) and the `tic' program to generate
83 terminfo entries for `screen' windows.
85 When the boolean `G0' capability is present in the termcap entry for
86 the terminal on which `screen' has been called, the terminal emulation
87 of `screen' supports multiple character sets. This allows an
88 application to make use of, for instance, the VT100 graphics character
89 set or national character sets. The following control functions from
90 ISO 2022 are supported: `lock shift G0' (`SI'), `lock shift G1' (`SO'),
91 `lock shift G2', `lock shift G3', `single shift G2', and `single shift
92 G3'. When a virtual terminal is created or reset, the ASCII character
93 set is designated as `G0' through `G3'. When the `G0' capability is
94 present, screen evaluates the capabilities `S0', `E0', and `C0' if
95 present. `S0' is the sequence the terminal uses to enable and start the
96 graphics character set rather than `SI'. `E0' is the corresponding
97 replacement for `SO'. `C0' gives a character by character translation
98 string that is used during semi-graphics mode. This string is built
99 like the `acsc' terminfo capability.
101 When the `po' and `pf' capabilities are present in the terminal's
102 termcap entry, applications running in a `screen' window can send
103 output to the printer port of the terminal. This allows a user to have
104 an application in one window sending output to a printer connected to
105 the terminal, while all other windows are still active (the printer
106 port is enabled and disabled again for each chunk of output). As a
107 side-effect, programs running in different windows can send output to
108 the printer simultaneously. Data sent to the printer is not displayed
109 in the window. The `info' command displays a line starting with `PRIN'
110 while the printer is active.
112 Some capabilities are only put into the `$TERMCAP' variable of the
113 virtual terminal if they can be efficiently implemented by the physical
114 terminal. For instance, `dl' (delete line) is only put into the
115 `$TERMCAP' variable if the terminal supports either delete line itself
116 or scrolling regions. Note that this may provoke confusion, when the
117 session is reattached on a different terminal, as the value of
118 `$TERMCAP' cannot be modified by parent processes. You can force
119 `screen' to include all capabilities in `$TERMCAP' with the `-a'
120 command-line option (*note Invoking Screen::).
122 The "alternate screen" capability is not enabled by default. Set
123 the `altscreen' `.screenrc' command to enable it.
126 File: screen.info, Node: Dump Termcap, Next: Termcap Syntax, Prev: Window Termcap, Up: Termcap
128 Write out the window's termcap entry
129 ====================================
131 - Command: dumptermcap
133 Write the termcap entry for the virtual terminal optimized for the
134 currently active window to the file `.termcap' in the user's
135 `$HOME/.screen' directory (or wherever `screen' stores its
136 sockets. *note Files::). This termcap entry is identical to the
137 value of the environment variable `$TERMCAP' that is set up by
138 `screen' for each window. For terminfo based systems you will need
139 to run a converter like `captoinfo' and then compile the entry with
143 File: screen.info, Node: Termcap Syntax, Next: Termcap Examples, Prev: Dump Termcap, Up: Termcap
145 The `termcap' command
146 =====================
148 - Command: termcap term terminal-tweaks [window-tweaks]
149 - Command: terminfo term terminal-tweaks [window-tweaks]
150 - Command: termcapinfo term terminal-tweaks [window-tweaks]
152 Use this command to modify your terminal's termcap entry without
153 going through all the hassles involved in creating a custom
154 termcap entry. Plus, you can optionally customize the termcap
155 generated for the windows. You have to place these commands in
156 one of the screenrc startup files, as they are meaningless once
157 the terminal emulator is booted.
159 If your system uses the terminfo database rather than termcap,
160 `screen' will understand the `terminfo' command, which has the
161 same effects as the `termcap' command. Two separate commands are
162 provided, as there are subtle syntactic differences, e.g. when
163 parameter interpolation (using `%') is required. Note that the
164 termcap names of the capabilities should also be used with the
167 In many cases, where the arguments are valid in both terminfo and
168 termcap syntax, you can use the command `termcapinfo', which is
169 just a shorthand for a pair of `termcap' and `terminfo' commands
170 with identical arguments.
172 The first argument specifies which terminal(s) should be affected by
173 this definition. You can specify multiple terminal names by separating
174 them with `|'s. Use `*' to match all terminals and `vt*' to match all
175 terminals that begin with `vt'.
177 Each TWEAK argument contains one or more termcap defines (separated
178 by `:'s) to be inserted at the start of the appropriate termcap entry,
179 enhancing it or overriding existing values. The first tweak modifies
180 your terminal's termcap, and contains definitions that your terminal
181 uses to perform certain functions. Specify a null string to leave this
182 unchanged (e.g. ""). The second (optional) tweak modifies all the
183 window termcaps, and should contain definitions that screen understands
184 (*note Virtual Terminal::).
187 File: screen.info, Node: Termcap Examples, Next: Special Capabilities, Prev: Termcap Syntax, Up: Termcap
194 termcap xterm* xn:hs@
196 Informs `screen' that all terminals that begin with `xterm' have firm
197 auto-margins that allow the last position on the screen to be updated
198 (xn), but they don't really have a status line (no 'hs' - append `@' to
199 turn entries off). Note that we assume `xn' for all terminal names
200 that start with `vt', but only if you don't specify a termcap command
204 termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l
206 Specifies the firm-margined `xn' capability for all terminals that
207 begin with `vt', and the second line will also add the escape-sequences
208 to switch into (Z0) and back out of (Z1) 132-character-per-line mode if
209 this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap
210 to use the width-changing commands.)
212 termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
214 This leaves your vt100 termcap alone and adds the function key labels to
215 each window's termcap entry.
217 termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P
219 Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables
220 the insert mode (im) and end-insert (ei) capabilities (the `@' in the
221 `im' string is after the `=', so it is part of the string). Having the
222 `im' and `ei' definitions put into your terminal's termcap will cause
223 screen to automatically advertise the character-insert capability in
224 each window's termcap. Each window will also get the delete-character
225 capability (dc) added to its termcap, which screen will translate into
226 a line-update for the terminal (we're pretending it doesn't support
229 If you would like to fully specify each window's termcap entry, you
230 should instead set the `$SCREENCAP' variable prior to running `screen'.
231 *Note Virtual Terminal::, for the details of the `screen' terminal
232 emulation. *Note Termcap: (termcap)Top, for more information on
236 File: screen.info, Node: Special Capabilities, Next: Autonuke, Prev: Termcap Examples, Up: Termcap
238 Special Terminal Capabilities
239 =============================
241 The following table describes all terminal capabilities that are
242 recognized by `screen' and are not in the termcap manual (*note
243 Termcap: (termcap)Top.). You can place these capabilities in your
244 termcap entries (in `/etc/termcap') or use them with the commands
245 `termcap', `terminfo' and `termcapinfo' in your `screenrc' files. It is
246 often not possible to place these capabilities in the terminfo database.
249 Terminal has VT100 style margins (`magic margins'). Note that this
250 capability is obsolete -- `screen' now uses the standard `xn'
255 Change width to 132 columns.
259 Change width to 80 columns.
263 Resize display. This capability has the desired width and height as
264 arguments. SunView(tm) example: `\E[8;%d;%dt'.
268 Terminal doesn't need flow control. Send ^S and ^Q direct to the
269 application. Same as `flow off'. The opposite of this capability
274 Terminal can deal with ISO 2022 font selection sequences.
278 Switch charset `G0' to the specified charset. Default is `\E(%.'.
282 Switch charset `G0' back to standard charset. Default is `\E(B'.
286 Use the string as a conversion table for font 0. See the `ac'
287 capability for more details.
291 Switch cursor-keys to application mode.
295 Switch cursor-keys to cursor mode.
299 Enable autonuke for displays of this terminal type. (*note
304 Set the output buffer limit. See the `obuflimit' command (*note
305 Obuflimit::) for more details.
309 Set the encoding of the terminal. See the `encoding' command
310 (*note Character Processing::) for valid encodings.
314 Change character foreground color in an ANSI conform way. This
315 capability will almost always be set to `\E[3%dm' (`\E[3%p1%dm' on
320 Same as `AF', but change background color.
324 Does understand ANSI set default fg/bg color (`\E[39m / \E[49m').
328 Describe a translation of characters to strings depending on the
329 current font. (*note Character Translation::).
333 Terminal understands special xterm sequences (OSC, mouse tracking).
337 Terminal needs bold to display high-intensity colors (e.g. Eterm).
341 Add missing capabilities to the termcap/info entry. (Set by
345 File: screen.info, Node: Autonuke, Next: Obuflimit, Prev: Special Capabilities, Up: Termcap
350 - Command: autonuke STATE
352 Sets whether a clear screen sequence should nuke all the output
353 that has not been written to the terminal. *Note Obuflimit::.
354 This property is set per display, not per window.
356 - Command: defautonuke STATE
358 Same as the `autonuke' command except that the default setting for
359 new displays is also changed. Initial setting is `off'. Note that
360 you can use the special `AN' terminal capability if you want to
361 have a terminal type dependent setting.
364 File: screen.info, Node: Obuflimit, Next: Character Translation, Prev: Autonuke, Up: Termcap
369 - Command: obuflimit [LIMIT]
371 If the output buffer contains more bytes than the specified limit,
372 no more data will be read from the windows. The default value is
373 256. If you have a fast display (like `xterm'), you can set it to
374 some higher value. If no argument is specified, the current
375 setting is displayed. This property is set per display, not per
378 - Command: defobuflimit LIMIT
380 Same as the `obuflimit' command except that the default setting
381 for new displays is also changed. Initial setting is 256 bytes.
382 Note that you can use the special `OL' terminal capability if you
383 want to have a terminal type dependent limit.
386 File: screen.info, Node: Character Translation, Prev: Obuflimit, Up: Termcap
388 Character Translation
389 =====================
391 `Screen' has a powerful mechanism to translate characters to
392 arbitrary strings depending on the current font and terminal type. Use
393 this feature if you want to work with a common standard character set
394 (say ISO8851-latin1) even on terminals that scatter the more unusual
395 characters over several national language font pages.
399 XC=<CHARSET-MAPPING>{,,<CHARSET-MAPPING>}
400 <CHARSET-MAPPING> := <DESIGNATOR><TEMPLATE>{,<MAPPING>}
401 <MAPPING> := <CHAR-TO-BE-MAPPED><TEMPLATE-ARG>
403 The things in braces may be repeated any number of times.
405 A <CHARSET-MAPPING> tells screen how to map characters in font
406 <DESIGNATOR> (`B': Ascii, `A': UK, `K': german, etc.) to strings.
407 Every <MAPPING> describes to what string a single character will be
408 translated. A template mechanism is used, as most of the time the codes
409 have a lot in common (for example strings to switch to and from another
410 charset). Each occurrence of `%' in <TEMPLATE> gets substituted with the
411 TEMPLATE-ARG specified together with the character. If your strings are
412 not similar at all, then use `%' as a template and place the full
413 string in <TEMPLATE-ARG>. A quoting mechanism was added to make it
414 possible to use a real `%'. The `\' character quotes the special
415 characters `\', `%', and `,'.
419 termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]'
421 This tells `screen', how to translate ISOlatin1 (charset `B') upper
422 case umlaut characters on a `hp700' terminal that has a german charset.
423 `\304' gets translated to `\E(K[\E(B' and so on. Note that this line
424 gets parsed *three* times before the internal lookup table is built,
425 therefore a lot of quoting is needed to create a single `\'.
427 Another extension was added to allow more emulation: If a mapping
428 translates the unquoted `%' char, it will be sent to the terminal
429 whenever screen switches to the corresponding <DESIGNATOR>. In this
430 special case the template is assumed to be just `%' because the charset
431 switch sequence and the character mappings normally haven't much in
434 This example shows one use of the extension:
435 termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334'
437 Here, a part of the german (`K') charset is emulated on an xterm.
438 If screen has to change to the `K' charset, `\E(B' will be sent to the
439 terminal, i.e. the ASCII charset is used instead. The template is just
440 `%', so the mapping is straightforward: `[' to `\304', `\' to `\326',
444 File: screen.info, Node: Message Line, Next: Logging, Prev: Termcap, Up: Top
449 `screen' displays informational messages and other diagnostics in a
450 "message line" at the bottom of the screen. If your terminal has a
451 status line defined in its termcap, screen will use this for displaying
452 its messages, otherwise the last line of the screen will be temporarily
453 overwritten and output will be momentarily interrupted. The message
454 line is automatically removed after a few seconds delay, but it can also
455 be removed early (on terminals without a status line) by beginning to
460 * Privacy Message:: Using the message line from your program.
461 * Hardware Status Line:: Use the terminal's hardware status line.
462 * Last Message:: Redisplay the last message.
463 * Message Wait:: Control how long messages are displayed.
466 File: screen.info, Node: Privacy Message, Next: Hardware Status Line, Up: Message Line
468 Using the message line from your program
469 ========================================
471 The message line facility can be used by an application running in
472 the current window by means of the ANSI "Privacy message" control
473 sequence. For instance, from within the shell, try something like:
475 echo "
\e^Hello world from window $WINDOW
\e\"
477 where `
\e' is ASCII ESC and `^' is a literal caret or up-arrow.
480 File: screen.info, Node: Hardware Status Line, Next: Last Message, Prev: Privacy Message, Up: Message Line
485 - Command: hardstatus [state]
486 - Command: hardstatus [`always']`lastline'|`message'|`ignore' [string]
487 - Command: hardstatus `string' [string]
489 This command configures the use and emulation of the terminal's
490 hardstatus line. The first form toggles whether `screen' will use
491 the hardware status line to display messages. If the flag is set
492 to `off', these messages are overlaid in reverse video mode at the
493 display line. The default setting is `on'.
495 The second form tells screen what to do if the terminal doesn't
496 have a hardstatus line (i.e. the termcap/terminfo capabilities
497 "hs", "ts", "fs" and "ds" are not set). If the type `lastline' is
498 used, screen will reserve the last line of the display for the
499 hardstatus. `message' uses `screen''s message mechanism and
500 `ignore' tells `screen' never to display the hardstatus. If you
501 prepend the word `always' to the type (e.g., `alwayslastline'),
502 `screen' will use the type even if the terminal supports a
505 The third form specifies the contents of the hardstatus line.
506 `%h' is used as default string, i.e. the stored hardstatus of the
507 current window (settable via `ESC]0;^G' or `ESC_\\') is displayed.
508 You can customize this to any string you like including string
509 escapes (*note String Escapes::). If you leave out the argument
510 STRING, the current string is displayed.
512 You can mix the second and third form by providing the string as
516 File: screen.info, Node: Last Message, Next: Message Wait, Prev: Hardware Status Line, Up: Message Line
523 Repeat the last message displayed in the message line. Useful if
524 you're typing when a message appears, because (unless your
525 terminal has a hardware status line) the message goes away when
529 File: screen.info, Node: Message Wait, Prev: Last Message, Up: Message Line
534 - Command: msgminwait sec
536 Defines the time `screen' delays a new message when another is
537 currently displayed. Defaults to 1 second.
539 - Command: msgwait sec
541 Defines the time a message is displayed, if `screen' is not
542 disturbed by other activity. Defaults to 5 seconds.
545 File: screen.info, Node: Logging, Next: Startup, Prev: Message Line, Up: Top
550 This section describes the commands for keeping a record of your
555 * Hardcopy:: Dump the current screen to a file
556 * Log:: Log the output of a window to a file
559 File: screen.info, Node: Hardcopy, Next: Log, Up: Logging
564 - Command: hardcopy [-h] [FILE]
566 Writes out the currently displayed image to the file FILE, or, if
567 no filename is specified, to `hardcopy.N' in the default
568 directory, where N is the number of the current window. This
569 either appends or overwrites the file if it exists, as determined
570 by the `hardcopy_append' command. If the option `-h' is
571 specified, dump also the contents of the scrollback buffer.
573 - Command: hardcopy_append state
575 If set to `on', `screen' will append to the `hardcopy.N' files
576 created by the command `hardcopy'; otherwise, these files are
577 overwritten each time.
579 - Command: hardcopydir directory
581 Defines a directory where hardcopy files will be placed. If unset
582 hardcopys are dumped in screen's current working directory.
585 File: screen.info, Node: Log, Prev: Hardcopy, Up: Logging
590 - Command: deflog state
592 Same as the `log' command except that the default setting for new
593 windows is changed. Initial setting is `off'.
595 - Command: log [state]
597 Begins/ends logging of the current window to the file
598 `screenlog.N' in the window's default directory, where N is the
599 number of the current window. This filename can be changed with
600 the `logfile' command. If no parameter is given, the logging
601 state is toggled. The session log is appended to the previous
602 contents of the file if it already exists. The current contents
603 and the contents of the scrollback history are not included in the
604 session log. Default is `off'.
606 - Command: logfile filename
607 - Command: logfile flush secs
609 Defines the name the logfiles will get. The default is
610 `screenlog.%n'. The second form changes the number of seconds
611 `screen' will wait before flushing the logfile buffer to the
612 file-system. The default value is 10 seconds.
614 - Command: logtstamp [state]
615 - Command: logtstamp `after' secs
616 - Command: logtstamp `string' string
618 This command controls logfile time-stamp mechanism of screen. If
619 time-stamps are turned `on', screen adds a string containing the
620 current time to the logfile after two minutes of inactivity. When
621 output continues and more than another two minutes have passed, a
622 second time-stamp is added to document the restart of the output.
623 You can change this timeout with the second form of the command.
624 The third form is used for customizing the time-stamp string (`--
625 %n:%t -- time-stamp -- %M/%d/%y %c:%s --\n' by default).
628 File: screen.info, Node: Startup, Next: Miscellaneous, Prev: Logging, Up: Top
633 This section describes commands which are only useful in the
634 `.screenrc' file, for use at startup.
638 * echo:: Display a message.
639 * sleep:: Pause execution of the `.screenrc'.
640 * Startup Message:: Control display of the copyright notice.
643 File: screen.info, Node: echo, Next: sleep, Up: Startup
648 - Command: echo [`-n'] message
650 The echo command may be used to annoy `screen' users with a
651 'message of the day'. Typically installed in a global screenrc.
652 The option `-n' may be used to suppress the line feed. See also
653 `sleep'. Echo is also useful for online checking of environment
657 File: screen.info, Node: sleep, Next: Startup Message, Prev: echo, Up: Startup
664 This command will pause the execution of a .screenrc file for NUM
665 seconds. Keyboard activity will end the sleep. It may be used to
666 give users a chance to read the messages output by `echo'.
669 File: screen.info, Node: Startup Message, Prev: sleep, Up: Startup
674 - Command: startup_message state
676 Select whether you want to see the copyright notice during startup.
677 Default is `on', as you probably noticed.
680 File: screen.info, Node: Miscellaneous, Next: String Escapes, Prev: Startup, Up: Top
682 Miscellaneous commands
683 **********************
685 The commands described here do not fit well under any of the other
690 * At:: Execute a command at other displays or windows.
691 * Break:: Send a break signal to the window.
692 * Debug:: Suppress/allow debugging output.
693 * License:: Display the disclaimer page.
694 * Nethack:: Use `nethack'-like error messages.
695 * Nonblock:: Disable flow-control to a display.
696 * Number:: Change the current window's number.
697 * Silence:: Notify on inactivity.
698 * Time:: Display the time and load average.
699 * Verbose:: Display window creation commands.
700 * Version:: Display the version of `screen'.
701 * Zombie:: Keep dead windows.
702 * Printcmd:: Set command for VT100 printer port emulation.
703 * Sorendition:: Change the text highlighting method.
704 * Attrcolor:: Map attributes to colors.
705 * Setsid:: Change process group management.
706 * Eval:: Parse and execute arguments.
707 * Maxwin:: Set the maximum window number.
708 * Backtick:: Program a command for a backtick string escape.
709 * Screen Saver:: Define a screen safer.
710 * Zmodem:: Define how screen treats zmodem requests.
713 File: screen.info, Node: At, Next: Break, Up: Miscellaneous
718 - Command: at [identifier][#|*|%] command [args]
720 Execute a command at other displays or windows as if it had been
721 entered there. `At' changes the context (the `current window' or
722 `current display' setting) of the command. If the first parameter
723 describes a non-unique context, the command will be executed
724 multiple times. If the first parameter is of the form
725 `IDENTIFIER*' then identifier is matched against user names. The
726 command is executed once for each display of the selected user(s).
727 If the first parameter is of the form `IDENTIFIER%' identifier is
728 matched against displays. Displays are named after the ttys they
729 attach. The prefix `/dev/' or `/dev/tty' may be omitted from the
730 identifier. If IDENTIFIER has a `#' or nothing appended it is
731 matched against window numbers and titles. Omitting an identifier
732 in front of the `#', `*' or `%' character selects all users,
733 displays or windows because a prefix-match is performed. Note that
734 on the affected display(s) a short message will describe what
735 happened. Note that the `#' character works as a comment
736 introducer when it is preceded by whitespace. This can be escaped
737 by prefixing `#' with a `\'. Permission is checked for the
738 initiator of the `at' command, not for the owners of the affected
739 display(s). Caveat: When matching against windows, the command is
740 executed at least once per window. Commands that change the
741 internal arrangement of windows (like `other') may be called
742 again. In shared windows the command will be repeated for each
743 attached display. Beware, when issuing toggle commands like
744 `login'! Some commands (e.g. `\*Qprocess') require that a display
745 is associated with the target windows. These commands may not
746 work correctly under `at' looping over windows.
749 File: screen.info, Node: Break, Next: Debug, Prev: At, Up: Miscellaneous
754 - Command: break [duration]
756 Send a break signal for DURATION*0.25 seconds to this window. For
757 non-Posix systems the time interval is rounded up to full seconds.
758 Most useful if a character device is attached to the window rather
759 than a shell process (*note Window Types::). The maximum duration
760 of a break signal is limited to 15 seconds.
764 Reopen the window's terminal line and send a break condition.
766 - Command: breaktype [tcsendbreak|TIOCSBRK|TCSBRK]
768 Choose one of the available methods of generating a break signal
769 for terminal devices. This command should affect the current
770 window only. But it still behaves identical to `defbreaktype'.
771 This will be changed in the future. Calling `breaktype' with no
772 parameter displays the break setting for the current window.
774 - Command: defbreaktype [tcsendbreak|TIOCSBRK|TCSBRK]
776 Choose one of the available methods of generating a break signal
777 for terminal devices opened afterwards. The preferred methods are
778 `tcsendbreak' and `TIOCSBRK'. The third, `TCSBRK', blocks the
779 complete `screen' session for the duration of the break, but it
780 may be the only way to generate long breaks. `tcsendbreak' and
781 `TIOCSBRK' may or may not produce long breaks with spikes (e.g. 4
782 per second). This is not only system dependant, this also differs
783 between serial board drivers. Calling `defbreaktype' with no
784 parameter displays the current setting.
787 File: screen.info, Node: Debug, Next: License, Prev: Break, Up: Miscellaneous
792 - Command: debug [on|off]
794 Turns runtime debugging on or off. If `screen' has been compiled
795 with option `-DDEBUG' debugging is available and is turned on per
796 default. Note that this command only affects debugging output
797 from the main `SCREEN' process correctly. Debug output from
798 attacher processes can only be turned off once and forever.
801 File: screen.info, Node: License, Next: Nethack, Prev: Debug, Up: Miscellaneous
808 Display the disclaimer page. This is done whenever `screen' is
809 started without options, which should be often enough.
812 File: screen.info, Node: Nethack, Next: Nonblock, Prev: License, Up: Miscellaneous
817 - Command: nethack state
819 Changes the kind of error messages used by `screen'. When you are
820 familiar with the game `nethack', you may enjoy the nethack-style
821 messages which will often blur the facts a little, but are much
822 funnier to read. Anyway, standard messages often tend to be
825 This option is only available if `screen' was compiled with the
826 NETHACK flag defined (*note Installation::). The default setting
827 is then determined by the presence of the environment variable
831 File: screen.info, Node: Nonblock, Next: Number, Prev: Nethack, Up: Miscellaneous
836 - Command: nonblock [STATE|NUMSECS]
837 Tell screen how to deal with user interfaces (displays) that cease
838 to accept output. This can happen if a user presses ^S or a
839 TCP/modem connection gets cut but no hangup is received. If
840 nonblock is `off' (this is the default) screen waits until the
841 display restarts to accept the output. If nonblock is `on', screen
842 waits until the timeout is reached (`on' is treated as 1s). If the
843 display still doesn't receive characters, screen will consider it
844 "blocked" and stop sending characters to it. If at some time it
845 restarts to accept characters, screen will unblock the display and
846 redisplay the updated window contents.
848 - Command: defnonblock STATE|NUMSECS
849 Same as the `nonblock' command except that the default setting for
850 displays is changed. Initial setting is `off'.
853 File: screen.info, Node: Number, Next: Silence, Prev: Nonblock, Up: Miscellaneous
858 - Command: number [N]
860 Change the current window's number. If the given number N is
861 already used by another window, both windows exchange their
862 numbers. If no argument is specified, the current window number
863 (and title) is shown.
866 File: screen.info, Node: Silence, Next: Time, Prev: Number, Up: Miscellaneous
871 - Command: silence [STATE|SEC]
873 Toggles silence monitoring of windows. When silence is turned on
874 and an affected window is switched into the background, you will
875 receive the silence notification message in the status line after
876 a specified period of inactivity (silence). The default timeout
877 can be changed with the `silencewait' command or by specifying a
878 number of seconds instead of `on' or `off'. Silence is initially
881 - Command: defsilence state
883 Same as the `silence' command except that the default setting for
884 new windows is changed. Initial setting is `off'.
886 - Command: silencewait SECONDS
888 Define the time that all windows monitored for silence should wait
889 before displaying a message. Default is 30 seconds.
892 File: screen.info, Node: Time, Next: Verbose, Prev: Silence, Up: Miscellaneous
897 - Command: time [STRING]
899 Uses the message line to display the time of day, the host name,
900 and the load averages over 1, 5, and 15 minutes (if this is
901 available on your system). For window-specific information use
902 `info' (*note Info::). If a STRING is specified, it changes the
903 format of the time report like it is described in the string
904 escapes chapter (*note String Escapes::). Screen uses a default of
905 `%c:%s %M %d %H%? %l%?'.
908 File: screen.info, Node: Verbose, Next: Version, Prev: Time, Up: Miscellaneous
913 - Command: verbose [on|off]
914 If verbose is switched on, the command name is echoed, whenever a
915 window is created (or resurrected from zombie state). Default is
916 off. Without parameter, the current setting is shown.
919 File: screen.info, Node: Version, Next: Zombie, Prev: Verbose, Up: Miscellaneous
926 Display the version and modification date in the message line.
929 File: screen.info, Node: Zombie, Next: Printcmd, Prev: Version, Up: Miscellaneous
934 - Command: zombie [KEYS [onerror]]
935 - Command: defzombie [KEYS]
937 Per default windows are removed from the window list as soon as the
938 windows process (e.g. shell) exits. When a string of two keys is
939 specified to the zombie command, `dead' windows will remain in the
940 list. The `kill' command may be used to remove the window.
941 Pressing the first key in the dead window has the same effect.
942 Pressing the second key, however, screen will attempt to resurrect
943 the window. The process that was initially running in the window
944 will be launched again. Calling `zombie' without parameters will
945 clear the zombie setting, thus making windows disappear when the
948 As the zombie setting is affected globally for all windows, this
949 command should only be called `defzombie'. Until we need this as a
950 per window setting, the commands `zombie' and `defzombie' are
953 Optionally you can put the word \*Qonerror\*U after the keys. This will
954 cause screen to monitor exit status of the process running in the window.
955 If it exits normally ('0'), the window disappears. Any other exit value
956 causes the window to become a zombie.
959 File: screen.info, Node: Printcmd, Next: Sorendition, Prev: Zombie, Up: Miscellaneous
964 - Command: printcmd [CMD]
966 If CMD is not an empty string, screen will not use the terminal
967 capabilities `po/pf' for printing if it detects an ansi print
968 sequence `ESC [ 5 i', but pipe the output into CMD. This should
969 normally be a command like `lpr' or `cat > /tmp/scrprint'.
970 `Printcmd' without an argument displays the current setting. The
971 ansi sequence `ESC \' ends printing and closes the pipe.
973 Warning: Be careful with this command! If other user have write
974 access to your terminal, they will be able to fire off print
978 File: screen.info, Node: Sorendition, Next: Attrcolor, Prev: Printcmd, Up: Miscellaneous
983 - Command: sorendition [ATTR [COLOR]]
985 Change the way screen does highlighting for text marking and
986 printing messages. See the chapter about string escapes (*note
987 String Escapes::) for the syntax of the modifiers. The default is
988 currently `=s dd' (standout, default colors).
991 File: screen.info, Node: Attrcolor, Next: Setsid, Prev: Sorendition, Up: Miscellaneous
996 - Command: attrcolor ATTRIB [ATTRIBUTE/COLOR-MODIFIER]
998 This command can be used to highlight attributes by changing the
999 color of the text. If the attribute ATTRIB is in use, the
1000 specified attribute/color modifier is also applied. If no modifier
1001 is given, the current one is deleted. See the chapter about string
1002 escapes (*note String Escapes::) for the syntax of the modifier.
1003 Screen understands two pseudo-attributes, `i' stands for
1004 high-intensity foreground color and `I' for high-intensity
1009 Change the color to bright red if bold text is to be printed.
1011 `attrcolor u "-u b"'
1012 Use blue text instead of underline.
1015 Use bright colors for bold text. Most terminal emulators do
1019 Make bright colored text also bold.
1022 File: screen.info, Node: Setsid, Next: Eval, Prev: Attrcolor, Up: Miscellaneous
1027 - Command: setsid state
1029 Normally screen uses different sessions and process groups for the
1030 windows. If setsid is turned `off', this is not done anymore and
1031 all windows will be in the same process group as the screen
1032 backend process. This also breaks job-control, so be careful. The
1033 default is `on', of course. This command is probably useful only
1034 in rare circumstances.
1037 File: screen.info, Node: Eval, Next: Maxwin, Prev: Setsid, Up: Miscellaneous
1042 - Command: eval COMMAND1 [COMMAND2 ...]
1044 Parses and executes each argument as separate command.
1047 File: screen.info, Node: Maxwin, Next: Backtick, Prev: Eval, Up: Miscellaneous
1054 Set the maximum window number screen will create. Doesn't affect
1055 already existing windows. The number may only be decreased.
1058 File: screen.info, Node: Backtick, Next: Screen Saver, Prev: Maxwin, Up: Miscellaneous
1063 - Command: backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]
1064 - Command: backtick ID
1066 Program the backtick command with the numerical id ID. The output
1067 of such a command is used for substitution of the `%`' string
1068 escape (*note String Escapes::). The specified LIFESPAN is the
1069 number of seconds the output is considered valid. After this time,
1070 the command is run again if a corresponding string escape is
1071 encountered. The AUTOREFRESH parameter triggers an automatic
1072 refresh for caption and hardstatus strings after the specified
1073 number of seconds. Only the last line of output is used for
1076 If both the LIFESPAN and the AUTOREFRESH parameters are zero, the
1077 backtick program is expected to stay in the background and
1078 generate output once in a while. In this case, the command is
1079 executed right away and screen stores the last line of output. If
1080 a new line gets printed screen will automatically refresh the
1081 hardstatus or the captions.
1083 The second form of the command deletes the backtick command with
1084 the numerical id ID.
1087 File: screen.info, Node: Screen Saver, Next: Zmodem, Prev: Backtick, Up: Miscellaneous
1092 - Command: idle [TIMEOUT [CMD ARGS]]
1094 Sets a command that is run after the specified number of seconds
1095 inactivity is reached. This command will normally be the `blanker'
1096 command to create a screen blanker, but it can be any screen
1097 command. If no command is specified, only the timeout is set. A
1098 timeout of zero (ot the special timeout `off') disables the timer.
1099 If no arguments are given, the current settings are displayed.
1103 Activate the screen blanker. First the screen is cleared. If no
1104 blanker program is defined, the cursor is turned off, otherwise,
1105 the program is started and it's output is written to the screen.
1106 The screen blanker is killed with the first keypress, the read key
1109 This command is normally used together with the `idle' command.
1111 - Command: blankerprg [PROGRAM ARGS]
1112 Defines a blanker program. Disables the blanker program if no
1113 arguments are given.
1116 File: screen.info, Node: Zmodem, Prev: Screen Saver, Up: Miscellaneous
1121 - Command: zmodem [off|auto|catch|pass]
1122 - Command: zmodem sendcmd [string]
1123 - Command: zmodem recvcmd [string]
1125 Define zmodem support for screen. Screen understands two different
1126 modes when it detects a zmodem request: `pass' and `catch'. If the
1127 mode is set to `pass', screen will relay all data to the attacher
1128 until the end of the transmission is reached. In `catch' mode
1129 screen acts as a zmodem endpoint and starts the corresponding
1130 rz/sz commands. If the mode is set to `auto', screen will use
1131 `catch' if the window is a tty (e.g. a serial line), otherwise it
1134 You can define the templates screen uses in `catch' mode via the
1135 second and the third form.
1137 Note also that this is an experimental feature.
1140 File: screen.info, Node: String Escapes, Next: Environment, Prev: Miscellaneous, Up: Top
1145 Screen provides an escape mechanism to insert information like the
1146 current time into messages or file names. The escape character is `%'
1147 with one exception: inside of a window's hardstatus `^%' (`^E') is used
1150 Here is the full list of supported escapes:
1153 the escape character itself
1162 current time `HH:MM' in 24h format
1165 current time `HH:MM' in 12h format
1177 sets %? to true if the window has the focus
1180 hardstatus of the window
1183 hostname of the system
1186 current load of the system
1204 all other users on this window
1207 all window numbers and names. With `-' quailifier: up to the
1208 current window; with `+' qualifier: starting with the window after
1212 all window numbers and names except the current one
1215 last two digits of the year number
1221 the part to the next `%?' is displayed only if a `%' escape inside
1222 the part expands to a non-empty string
1228 pad the string to the display's width (like TeX's hfill). If a
1229 number is specified, pad to the percentage of the window's width.
1230 A `0' qualifier tells screen to treat the number as absolute
1231 position. You can specify to pad relative to the last absolute
1232 pad position by adding a `+' qualifier or to pad relative to the
1233 right margin by using `-'. The padding truncates the string if the
1234 specified position lies before the current position. Add the `L'
1235 qualifier to change this.
1238 same as `%=' but just do truncation, do not fill with spaces
1241 mark the current text position for the next truncation. When
1242 screen needs to do truncation, it tries to do it in a way that the
1243 marked position gets moved to the specified percentage of the
1244 output area. (The area starts from the last absolute pad position
1245 and ends with the position specified by the truncation operator.)
1246 The `L' qualifier tells screen to mark the truncated parts with
1250 attribute/color modifier string terminated by the next `}'
1253 Substitute with the output of a `backtick' command. The length
1254 qualifier is misused to identify one of the commands. *Note
1256 The `c' and `C' escape may be qualified with a `0' to make screen use
1257 zero instead of space as fill character. The `n' and `=' escapes
1258 understand a length qualifier (e.g. `%3n'), `D' and `M' can be prefixed
1259 with `L' to generate long names, `w' and `W' also show the window flags
1262 An attribute/color modifier is is used to change the attributes or
1263 the color settings. Its format is `[attribute modifier] [color
1264 description]'. The attribute modifier must be prefixed by a change type
1265 indicator if it can be confused with a color desciption. The following
1266 change types are known:
1268 add the specified set to the current attributes
1271 remove the set from the current attributes
1274 invert the set in the current attributes
1277 change the current attributes to the specified set
1278 The attribute set can either be specified as a hexadecimal number or
1279 a combination of the following letters:
1297 Colors are coded either as a hexadecimal number or two letters
1298 specifying the desired background and foreground color (in that order).
1299 The following colors are known:
1328 leave color unchanged
1329 The capitalized versions of the letter specify bright colors. You
1330 can also use the pseudo-color `i' to set just the brightness and leave
1331 the color unchanged.
1333 A one digit/letter color description is treated as foreground or
1334 background color dependant on the current attributes: if reverse mode is
1335 set, the background color is changed instead of the foreground color.
1336 If you don't like this, prefix the color with a `.'. If you want the
1337 same behaviour for two-letter color descriptions, also prefix them with
1340 As a special case, `%{-}' restores the attributes and colors that
1341 were set before the last change was made (i.e. pops one level of the
1342 color-change stack).
1346 set color to bright green
1352 clear all attributes, write in default color on yellow background.
1354 `%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<'
1355 The available windows centered at the current win dow and
1356 truncated to the available width. The current window is displayed
1357 white on blue. This can be used with `hardstatus alwayslastline'.
1359 `%?%F%{.R.}%?%3n %t%? [%h]%?'
1360 The window number and title and the window's hardstatus, if one is
1361 set. Also use a red background if this is the active focus.
1362 Useful for `caption string'.
1365 File: screen.info, Node: Environment, Next: Files, Prev: String Escapes, Up: Top
1367 Environment Variables
1368 *********************
1371 Number of columns on the terminal (overrides termcap entry).
1374 Directory in which to look for .screenrc.
1377 Number of lines on the terminal (overrides termcap entry).
1380 Screen lock program.
1383 Turns on `nethack' option.
1386 Used for locating programs to run.
1389 For customizing a terminal's `TERMCAP' value.
1392 Alternate socket directory.
1395 Alternate user screenrc file.
1398 Default shell program for opening windows (default `/bin/sh').
1401 Alternate socket name. If `screen' is invoked, and the environment
1402 variable `STY' is set, then it creates only a window in the
1403 running `screen' session rather than starting a new session.
1406 Alternate system screenrc file.
1412 Terminal description.
1415 Window number of a window (at creation time).