2 .TH SCREEN 1 "Aug 2003"
9 screen \- screen manager with VT100/ANSI terminal emulation
23 [[\fIpid\fP\fB.\fP]\fItty\fP[\fB.\fP\fIhost\fP]]
26 \fIsessionowner\fP\fB/\fP[[\fIpid\fP\fB.\fP]\fItty\fP[\fB.\fP\fIhost\fP]]
32 is a full-screen window manager that
33 multiplexes a physical terminal between several processes (typically
35 Each virtual terminal provides the functions
36 of a DEC VT100 terminal and, in addition, several control functions
37 from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards
38 (e.\|g. insert/delete line and support for multiple character sets).
39 There is a scrollback history buffer for each virtual terminal and a
40 copy-and-paste mechanism that allows moving text regions between
45 is called, it creates a single window with a shell in it (or the specified
46 command) and then gets out of your way so that you can use the program as you
48 Then, at any time, you can create new (full-screen) windows with other programs
49 in them (including more shells), kill existing windows, view a list of
50 windows, turn output logging on and off, copy-and-paste text between
51 windows, view the scrollback history, switch between windows
52 in whatever manner you wish, etc. All windows run their programs completely
53 independent of each other. Programs continue to run when their window
54 is currently not visible and even when the whole
56 session is detached from the user's terminal. When a program terminates,
58 (per default) kills the window that contained it.
59 If this window was in the foreground, the display switches to the previous
60 window; if none are left,
64 Everything you type is sent to the program running in the current window.
65 The only exception to this is the one keystroke that is used to initiate
66 a command to the window manager.
67 By default, each command begins with a control-a (abbreviated C-a from
68 now on), and is followed by one other keystroke.
69 The command character and all the key bindings can be fully customized
70 to be anything you like, though they are always two characters in length.
73 does not understand the prefix \*QC-\*U to mean control.
74 Please use the caret notation (\*Q^A\*U instead of \*QC-a\*U) as arguments
77 command or the \fI-e\fP option.
79 will also print out control characters in caret notation.
81 The standard way to create a new window is to type \*QC-a c\*U.
82 This creates a new window running a shell and switches to that
83 window immediately, regardless of the state of the process running
84 in the current window.
85 Similarly, you can create a new window with a custom command in it by
86 first binding the command to a keystroke (in your .screenrc file or at the
87 \*QC-a :\*U command line) and
88 then using it just like the \*QC-a c\*U command.
89 In addition, new windows can be created by running a command like:
93 from a shell prompt within a previously created window.
94 This will not run another copy of
96 but will instead supply the command name and its arguments to the window
97 manager (specified in the $STY environment variable) who will use it to
98 create the new window.
99 The above example would start the emacs editor (editing prog.c) and switch
100 to its window. - Note that you cannot transport environment variables from
101 the invoking shell to the application (emacs in this case), because it is
102 forked from the parent screen process, not from the invoking shell.
104 If \*Q/etc/utmp\*U is writable by
106 an appropriate record will be written to this file for each window, and
107 removed when the window is terminated.
108 This is useful for working with \*Qtalk\*U, \*Qscript\*U, \*Qshutdown\*U,
109 \*Qrsend\*U, \*Qsccs\*U and other similar programs that use the utmp
110 file to determine who you are. As long as
112 is active on your terminal,
113 the terminal's own record is removed from the utmp file. See also \*QC-a L\*U.
117 Before you begin to use
119 you'll need to make sure you have correctly selected your terminal type,
120 just as you would for any other termcap/terminfo program.
121 (You can do this by using
125 If you're impatient and want to get started without doing a lot more reading,
126 you should remember this one command: \*QC-a ?\*U.
127 Typing these two characters will display a list of the available
129 commands and their bindings. Each keystroke is discussed in
130 the section \*QDEFAULT KEY BINDINGS\*U. The manual section \*QCUSTOMIZATION\*U
131 deals with the contents of your .screenrc.
133 If your terminal is a \*Qtrue\*U auto-margin terminal (it doesn't allow
134 the last position on the screen to be updated without scrolling the
135 screen) consider using a version of your terminal's termcap that has
136 automatic margins turned \fIoff\fP. This will ensure an accurate and
137 optimal update of the screen in all circumstances. Most terminals
138 nowadays have \*Qmagic\*U margins (automatic margins plus usable last
139 column). This is the VT100 style type and perfectly suited for
141 If all you've got is a \*Qtrue\*U auto-margin terminal
143 will be content to use it, but updating a character put into the last
144 position on the screen may not be possible until the screen scrolls or
145 the character is moved into a safe position in some other way. This
146 delay can be shortened by using a terminal with insert-character
150 .SH "COMMAND-LINE OPTIONS"
151 Screen has the following command-line options:
154 include \fIall\fP capabilities (with some minor exceptions) in each
155 window's termcap, even if
157 must redraw parts of the display in order to implement a function.
160 Adapt the sizes of all windows to the size of the current terminal.
163 tries to restore its old window sizes when attaching to resizable terminals
164 (those with \*QWS\*U in its description, e.g. suncmd or some xterm).
167 override the default configuration file from \*Q$HOME/.screenrc\*U
170 .BR \-d | \-D " [" \fIpid.tty.host ]
173 but detaches the elsewhere running
175 session. It has the same effect as typing \*QC-a d\*U from
177 controlling terminal. \fB\-D\fP is the equivalent to the power detach key.
178 If no session can be detached, this option is ignored. In combination with the
179 \fB\-r\fP/\fB\-R\fP option more powerful effects can be achieved:
182 Reattach a session and if necessary detach it first.
185 Reattach a session and if necessary detach or even create it first.
188 Reattach a session and if necessary detach or create it. Use the first
189 session if more than one session is available.
192 Reattach a session. If necessary detach and logout remotely first.
195 Attach here and now. In detail this means: If a session is running, then
196 reattach. If necessary detach and logout remotely first.
197 If it was not running create it and notify the user. This is the
201 Attach here and now. Whatever that means, just do it.
203 Note: It is always a good idea to check the status of your sessions by means of
207 specifies the command character to be \fIx\fP and the character generating a
208 literal command character to \fIy\fP (when typed after the command character).
209 The default is \*QC-a\*U and `a', which can be specified as \*Q-e^Aa\*U.
212 session, this option sets the default command character. In a multiuser
213 session all users added will start off with this command character. But
214 when attaching to an already running session, this option changes only
215 the command character of the attaching user.
216 This option is equivalent to either the commands \*Qdefescape\*U or
217 \*Qescape\*U respectively.
219 .BR \-f\fP ", " \-fn ", and " \-fa
220 turns flow-control on, off, or \*Qautomatic switching mode\*U.
221 This can also be defined through the \*Qdefflow\*U .screenrc command.
224 Specifies the history scrollback buffer to be \fInum\fP lines high.
227 will cause the interrupt key (usually C-c) to interrupt the display
228 immediately when flow-control is on.
229 See the \*Qdefflow\*U .screenrc command for details.
230 The use of this option is discouraged.
233 turns login mode on or off (for /etc/utmp updating).
234 This can also be defined through the \*Qdeflogin\*U .screenrc command.
236 .BR \-ls " [" \fImatch ]
239 .BR \-list " [" \fImatch ]
245 strings identifying your
248 Sessions marked `detached' can be resumed with \*Qscreen -r\*U. Those marked
249 `attached' are running and have a controlling terminal. If the session runs in
250 multiuser mode, it is marked `multi'. Sessions marked as `unreachable' either
251 live on a different host or are `dead'.
252 An unreachable session is considered dead, when its name
253 matches either the name of the local host, or the specified parameter, if any.
254 See the \fB-r\fP flag for a description how to construct matches.
255 Sessions marked as `dead' should be thoroughly checked and removed.
256 Ask your system administrator if you are not sure. Remove sessions with the
262 to turn on automatic output logging for the windows.
267 to ignore the $STY environment variable. With \*Qscreen -m\*U creation of
268 a new session is enforced, regardless whether
270 is called from within another
272 session or not. This flag has a special meaning in connection
273 with the `-d' option:
278 in \*Qdetached\*U mode. This creates a new session but doesn't
279 attach to it. This is useful for system startup scripts.
282 This also starts screen in \*Qdetached\*U mode, but doesn't fork
283 a new process. The command exits if the session terminates.
286 selects a more optimal output mode for your terminal rather than true VT100
287 emulation (only affects auto-margin terminals without `LP').
288 This can also be set in your .screenrc by specifying `OP' in a \*Qtermcap\*U
291 .BI "\-p " number_or_name
292 Preselect a window. This is useful when you want to reattach to a
293 specific window or you want to send a command via the \*Q-X\*U
294 option to a specific window. As with screen's select command, \*Q-\*U
295 selects the blank window. As a special case for reattach, \*Q=\*U
296 brings up the windowlist on the blank window. The command will not be
297 executed if the specified window could not be found.
300 Suppress printing of error messages. In combination with \*Q-ls\*U the exit
301 value is as follows: 9 indicates a directory without sessions. 10
302 indicates a directory with running but not attachable sessions. 11 (or more)
303 indicates 1 (or more) usable sessions.
304 In combination with \*Q-r\*U the exit value is as follows: 10 indicates that
305 there is no session to resume. 12 (or more) indicates that there are 2 (or
306 more) sessions to resume and you should specify which one to choose.
307 In all other cases \*Q-q\*U has no effect.
310 Some commands now can be queried from a remote session using this
311 flag, e.g. 'screen -Q windows'. The commands will send the
312 response to the stdout of the querying process. If there was an
313 error in the command, then the querying process will exit with
316 The commands that can be queried now are:
326 .BR \-r " [" \fIpid.tty.host ]
329 .BR \-r " \fIsessionowner/[" \fIpid.tty.host ]
333 session. No other options (except combinations with \fB\-d\fP/\fB\-D\fP) may
334 be specified, though an optional prefix of [\fIpid.\fP]\fItty.host\fP
335 may be needed to distinguish between multiple detached
337 sessions. The second form is used to connect to another user's screen session
338 which runs in multiuser mode. This indicates that screen should look for
339 sessions in another user's directory. This requires setuid-root.
342 attempts to resume the first detached
344 session it finds. If successful, all other command-line options are ignored.
345 If no detached session exists, starts a new session using the specified
348 had not been specified. The option is set by default if
350 is run as a login-shell (actually screen uses \*Q-xRR\*U in that case).
351 For combinations with the \fB\-d\fP/\fB\-D\fP option see there.
354 sets the default shell to the program specified, instead of the value
355 in the environment variable $SHELL (or \*Q/bin/sh\*U if not defined).
356 This can also be defined through the \*Qshell\*U .screenrc command.
358 .BI "\-S " sessionname
359 When creating a new session, this option can be used to specify a
360 meaningful name for the session. This name identifies the session for
361 \*Qscreen -list\*U and \*Qscreen -r\*U actions. It substitutes the
362 default [\fItty.host\fP] suffix.
365 sets the title (a.\|k.\|a.) for the default shell or specified program.
366 See also the \*Qshelltitle\*U .screenrc command.
369 Run screen in UTF-8 mode. This option tells screen that your terminal
370 sends and understands UTF-8 encoded characters. It also sets the default
371 encoding for new windows to `utf8'.
374 Print version number.
376 .BR \-wipe " [" \fImatch ]
377 does the same as \*Qscreen -ls\*U, but removes destroyed sessions instead of
378 marking them as `dead'.
379 An unreachable session is considered dead, when its name matches either
380 the name of the local host, or the explicitly given parameter, if any.
381 See the \fB-r\fP flag for a description how to construct matches.
384 Attach to a not detached
386 session. (Multi display mode).
388 refuses to attach from within itself.
389 But when cascading multiple screens, loops are not detected; take care.
392 Send the specified command to a running screen session. You can use
393 the \fB-d\fP or \fB-r\fP option to tell screen to look only for
394 attached or detached screen sessions. Note that this command doesn't
395 work if the session is password protected.
397 .SH "DEFAULT KEY BINDINGS"
401 command consists of a
402 \*QC-a\*U followed by one other character.
403 For your convenience, all commands that are bound to lower-case letters are
404 also bound to their control character counterparts (with the exception
405 of \*QC-a a\*U; see below), thus, \*QC-a c\*U as well as \*QC-a C-c\*U can
406 be used to create a window. See section \*QCUSTOMIZATION\*U for a description
410 The following table shows the default key bindings:
411 .IP "\fBC-a '\fP (select)"
412 Prompt for a window name or number to switch to.
413 .IP "\fBC-a ""\fP (windowlist -b)"
414 Present a list of all windows for selection.
415 .IP "\fBC-a 0\fP (select 0)"
417 .IP "\fB ... \fP ..."
418 .IP "\fBC-a 9\fP (select 9)"
419 .IP "\fBC-a -\fP (select -)"
421 Switch to window number 0 \- 9, or to the blank window.
422 .IP "\fBC-a tab\fP (focus)"
424 Switch the input focus to the next region.
425 See also \fIsplit, remove, only\fP.
426 .IP "\fBC-a C-a\fP (other)"
427 Toggle to the window displayed previously.
428 Note that this binding defaults to the command character typed twice,
429 unless overridden. For instance, if you use the option \*Q\fB\-e]x\fP\*U,
430 this command becomes \*Q]]\*U.
431 .IP "\fBC-a a\fP (meta)"
432 Send the command character (C-a) to window. See \fIescape\fP command.
433 .IP "\fBC-a A\fP (title)"
434 Allow the user to enter a name for the current window.
437 .IP "\fBC-a C-b\fP (break)"
439 Send a break to window.
440 .IP "\fBC-a B\fP (pow_break)"
441 Reopen the terminal line and send a break.
444 .IP "\fBC-a C-c\fP (screen)"
446 Create a new window with a shell and switch to that window.
447 .IP "\fBC-a C\fP (clear)"
451 .IP "\fBC-a C-d\fP (detach)"
456 .IP "\fBC-a D D\fP (pow_detach)"
460 .IP "\fBC-a C-f\fP (flow)"
462 Toggle flow \fIon\fP, \fIoff\fP or \fIauto\fP.
463 .IP "\fBC-a F\fP (fit)"
464 Resize the window to the current region size.
465 .IP "\fBC-a C-g\fP (vbell)"
469 .IP "\fBC-a h\fP (hardcopy)"
471 Write a hardcopy of the current window to the file \*Qhardcopy.\fIn\fP\*U.
472 .IP "\fBC-a H\fP (log)"
473 Begins/ends logging of the current window to the file \*Qscreenlog.\fIn\fP\*U.
476 .IP "\fBC-a C-i\fP (info)"
478 Show info about this window.
481 .IP "\fBC-a C-k\fP (kill)"
483 Destroy current window.
486 .IP "\fBC-a C-l\fP (redisplay)"
488 Fully refresh current window.
489 .IP "\fBC-a L\fP (login)"
490 Toggle this windows login slot. Available only if
492 is configured to update the utmp database.
495 .IP "\fBC-a C-m\fP (lastmsg)"
497 Repeat the last message displayed in the message line.
498 .IP "\fBC-a M\fP (monitor)"
499 Toggles monitoring of the current window.
500 .IP "\fBC-a space\fP"
503 .IP "\fBC-a C-n\fP (next)"
505 Switch to the next window.
506 .IP "\fBC-a N\fP (number)"
507 Show the number (and title) of the current window.
508 .IP "\fBC-a backspace\fP"
512 .IP "\fBC-a C-p\fP (prev)"
514 Switch to the previous window (opposite of \fBC-a n\fP).
517 .IP "\fBC-a C-q\fP (xon)"
519 Send a control-q to the current window.
520 .IP "\fBC-a Q\fP (only)"
521 Delete all regions but the current one.
522 See also \fIsplit, remove, focus\fP.
525 .IP "\fBC-a C-r\fP (wrap)"
527 Toggle the current window's line-wrap setting (turn the current window's
528 automatic margins on and off).
531 .IP "\fBC-a C-s\fP (xoff)"
533 Send a control-s to the current window.
534 .IP "\fBC-a S\fP (split)"
535 Split the current region horizontally into two new ones.
536 See also \fIonly, remove, focus\fP.
539 .IP "\fBC-a C-t\fP (time)"
541 Show system information.
542 .IP "\fBC-a v\fP (version)"
544 Display the version and compilation date.
545 .IP "\fBC-a C-v\fP (digraph)"
550 .IP "\fBC-a C-w\fP (windows)"
552 Show a list of window.
553 .IP "\fBC-a W\fP (width)"
554 Toggle 80/132 columns.
557 .IP "\fBC-a C-x\fP (lockscreen)"
560 .IP "\fBC-a X\fP (remove)"
561 Kill the current region.
562 See also \fIsplit, only, focus\fP.
565 .IP "\fBC-a C-z\fP (suspend)"
569 Your system must support BSD-style job-control.
570 .IP "\fBC-a Z\fP (reset)"
571 Reset the virtual terminal to its \*Qpower-on\*U values.
572 .IP "\fBC-a .\fP (dumptermcap)"
573 Write out a \*Q.termcap\*U file.
574 .IP "\fBC-a ?\fP (help)"
576 .IP "\fBC-a C-\e\fP (quit)"
577 Kill all windows and terminate
579 .IP "\fBC-a :\fP (colon)"
580 Enter command line mode.
584 .IP "\fBC-a esc\fP (copy)"
586 Enter copy/scrollback mode.
589 .IP "\fBC-a ]\fP (paste .)"
591 Write the contents of the paste buffer to the stdin queue of the
595 .IP "\fBC-a }\fP (history)"
597 Copy and paste a previous (command) line.
598 .IP "\fBC-a >\fP (writebuf)"
599 Write paste buffer to a file.
600 .IP "\fBC-a <\fP (readbuf)"
601 Reads the screen-exchange file into the paste buffer.
602 .IP "\fBC-a =\fP (removebuf)"
603 Removes the file used by \fBC-a <\fP and \fPC-a >\fP.
604 .IP "\fBC-a ,\fP (license)"
607 comes from, where it went to and why you can use it.
608 .IP "\fBC-a _\fP (silence)"
609 Start/stop monitoring the current window for inactivity.
610 .IP "\fBC-a |\fP (split -v)"
611 Split the current region vertically into two new ones.
612 .IP "\fBC-a *\fP (displays)"
613 Show a listing of all currently attached displays.
617 The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to
618 /tmp/screens or preferably to /usr/local/screens chosen at compile-time. If
620 is installed setuid-root, then the administrator
623 with an adequate (not NFS mounted) socket directory. If
625 is not running setuid-root, the user can specify any mode 700 directory
626 in the environment variable $SCREENDIR.
630 is invoked, it executes initialization commands from the files
631 \*Q/usr/local/etc/screenrc\*U and
632 \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's
633 defaults\*U that can be overridden in the following ways: for the
636 searches for the environment variable $SYSSCREENRC (this override feature
637 may be disabled at compile-time). The user specific
638 screenrc file is searched in $SCREENRC, then $HOME/.screenrc.
639 The command line option \fB-c\fP takes
640 precedence over the above user screenrc files.
642 Commands in these files are used to set options, bind functions to
643 keys, and to automatically establish one or more windows at the
647 Commands are listed one per line, with empty lines being ignored.
648 A command's arguments are separated by tabs or spaces, and may be
649 surrounded by single or double quotes.
650 A `#' turns the rest of the line into a comment, except in quotes.
651 Unintelligible lines are warned about and ignored.
652 Commands may contain references to environment variables. The
653 syntax is the shell-like "$VAR " or "${VAR}". Note that this causes
654 incompatibility with previous
656 versions, as now the '$'-character has to be protected with '\e' if no
657 variable substitution shall be performed. A string in single-quotes is also
658 protected from variable substitution.
660 Two configuration files are shipped as examples with your screen distribution:
661 \*Qetc/screenrc\*U and \*Qetc/etcscreenrc\*U. They contain a number of
662 useful examples for various commands.
664 Customization can also be done 'on-line'. To enter the command mode type
665 `C-a :'. Note that commands starting with \*Qdef\*U change default values,
666 while others change current settings.
668 The following commands are available:
671 .BI acladd " usernames"
674 .BI addacl " usernames"
676 Enable users to fully access this screen session. \fIUsernames\fP can be one
677 user or a comma separated list of users. This command enables to attach to the
679 session and performs the equivalent of `aclchg \fIusernames\fP +rwx \&"#?\&"'.
680 executed. To add a user with restricted access, use the `aclchg' command below.
681 If an optional second parameter is supplied, it should be a crypted password
682 for the named user(s). `Addacl' is a synonym to `acladd'.
683 Multi user mode only.
686 .BI aclchg " usernames permbits list"
688 .BI chacl " usernames permbits list"
690 Change permissions for a comma separated list of users. Permission bits are
691 represented as `r', `w' and `x'. Prefixing `+' grants the permission, `-'
692 removes it. The third parameter is a comma separated list of commands and/or
693 windows (specified either by number or title). The special list `#' refers to
694 all windows, `?' to all commands. if \fIusernames\fP consists of a single `*',
695 all known users are affected.
696 A command can be executed when the user has the `x' bit for it.
697 The user can type input to a window when he has its `w' bit set and no other
698 user obtains a writelock for this window.
699 Other bits are currently ignored.
700 To withdraw the writelock from another user in window 2:
701 `aclchg \fIusername\fP -w+w 2'.
702 To allow read-only access to the session: `aclchg \fIusername\fP
703 -w \&"#\&"'. As soon as a user's name is known to
705 he can attach to the session and (per default) has full permissions for all
706 command and windows. Execution permission for the acl commands, `at' and others
707 should also be removed or the user may be able to regain write permission.
708 Rights of the special username
710 cannot be changed (see the \*Qsu\*U command).
711 `Chacl' is a synonym to `aclchg'.
712 Multi user mode only.
715 .BI acldel " username"
719 access control list. If currently attached, all the
720 user's displays are detached from the session. He cannot attach again.
721 Multi user mode only.
724 .BI aclgrp " username"
727 Creates groups of users that share common access rights. The name of the
728 group is the username of the group leader. Each member of the group inherits
729 the permissions that are granted to the group leader. That means, if a user
730 fails an access check, another check is made for the group leader.
731 A user is removed from all groups the special value \*Qnone\*U is used for
733 If the second parameter is omitted all groups the user is in are listed.
738 .RI |[ users ] -bits " .... ]"
742 .RI |[ users ] -bits " .... ]"
744 This specifies the access other users have to windows that will be created by
745 the caller of the command.
747 may be no, one or a comma separated list of known usernames. If no users are
748 specified, a list of all currently known users is assumed.
750 is any combination of access control bits allowed defined with the
751 \*Qaclchg\*U command. The special username \*Q?\*U predefines the access
752 that not yet known users will be granted to any window initially.
753 The special username \*Q??\*U predefines the access that not yet known
754 users are granted to any command.
755 Rights of the special username
757 cannot be changed (see the \*Qsu\*U command).
758 `Umask' is a synonym to `aclumask'.
761 .BI activity " message"
763 When any activity occurs in a background window that is being monitored,
765 displays a notification in the message line.
766 The notification message can be re-defined by means of the \*Qactivity\*U
768 Each occurrence of `%' in \fImessage\fP is replaced by
769 the number of the window in which activity has occurred,
770 and each occurrence of `^G' is replaced by the definition for bell
771 in your termcap (usually an audible bell).
772 The default message is
774 'Activity in window %n'
776 Note that monitoring is off for all windows by default, but can be altered
777 by use of the \*Qmonitor\*U command (C-a M).
780 .BR "allpartial on" | off
782 If set to on, only the current cursor line is refreshed on window change.
783 This affects all windows and is useful for slow terminal lines. The
784 previous setting of full/partial refresh for each window is restored
785 with \*Qallpartial off\*U. This is a global flag that immediately takes effect
786 on all windows overriding the \*Qpartial\*U settings. It does not change the
787 default redraw behavior of newly created windows.
790 .BR "altscreen on" | off
792 If set to on, "alternate screen" support is enabled in virtual terminals,
793 just like in xterm. Initial setting is `off'.
796 .BR "at " "[\fIidentifier\fP][" "#\fP|\fP*\fP|\fP%\fP] "
797 .IR "command " [ args " ... ]"
799 Execute a command at other displays or windows as if it had been entered there.
800 \*QAt\*U changes the context (the `current window' or `current display'
801 setting) of the command. If the first parameter describes a
802 non-unique context, the command will be executed multiple times. If the first
803 parameter is of the form `\fIidentifier\fP*' then identifier is matched against
804 user names. The command is executed once for each display of the selected
805 user(s). If the first parameter is of the form `\fIidentifier\fP%' identifier
806 is matched against displays. Displays are named after the ttys they
807 attach. The prefix `/dev/' or `/dev/tty' may be omitted from the identifier.
808 If \fIidentifier\fP has a `#' or nothing appended it is matched against
809 window numbers and titles. Omitting an identifier in front of the `#', `*' or
810 `%'-character selects all users, displays or windows because a prefix-match is
811 performed. Note that on the affected display(s) a short message will describe
812 what happened. Permission is checked for initiator of the \*Qat\*U command,
813 not for the owners of the affected display(s).
814 Note that the '#' character works as a comment introducer when it is preceded by
815 whitespace. This can be escaped by prefixing a '\e'.
816 Permission is checked for the initiator of the \*Qat\*U command, not for the
817 owners of the affected display(s).
820 When matching against windows, the command is executed at least
821 once per window. Commands that change the internal arrangement of windows
822 (like \*Qother\*U) may be called again. In shared windows the command will
823 be repeated for each attached display. Beware, when issuing toggle commands
825 Some commands (e.g. \*Qprocess\*U) require that
826 a display is associated with the target windows. These commands may not work
827 correctly under \*Qat\*U looping over windows.
830 .BI "attrcolor " attrib
831 .RI [ "attribute/color-modifier" ]
833 This command can be used to highlight attributes by changing the color of
834 the text. If the attribute
836 is in use, the specified attribute/color modifier is also applied. If no
837 modifier is given, the current one is deleted. See the \*QSTRING ESCAPES\*U
838 chapter for the syntax of the modifier. Screen understands two
839 pseudo-attributes, \*Qi\*U stands for high-intensity foreground
840 color and \*QI\*U for high-intensity background color.
846 Change the color to bright red if bold text is to be printed.
850 Use blue text instead of underline.
854 Use bright colors for bold text. Most terminal emulators do this
859 Make bright colored text also bold.
862 .BR "autodetach on" | off
866 will automatically detach upon hangup, which
867 saves all your running programs until they are resumed with a
870 When turned off, a hangup signal will terminate
872 and all the processes it contains. Autodetach is on by default.
875 .BR "autonuke on" | off
877 Sets whether a clear screen sequence should nuke all the output
878 that has not been written to the terminal. See also
890 Program the backtick command with the numerical id \fIid\fP.
891 The output of such a command is used for substitution of the
892 \*Q%`\*U string escape. The specified \fIlifespan\fP is the number
893 of seconds the output is considered valid. After this time, the
894 command is run again if a corresponding string escape is encountered.
895 The \fIautorefresh\fP parameter triggers an
896 automatic refresh for caption and hardstatus strings after the
897 specified number of seconds. Only the last line of output is used
900 If both the \fIlifespan\fP and the \fIautorefresh\fP parameters
901 are zero, the backtick program is expected to stay in the
902 background and generate output once in a while.
903 In this case, the command is executed right away and screen stores
904 the last line of output. If a new line gets printed screen will
905 automatically refresh the hardstatus or the captions.
907 The second form of the command deletes the backtick command
908 with the numerical id \fIid\fP.
911 .BR "bce " [ on | off ]
913 Change background-color-erase setting. If \*Qbce\*U is set to on, all
914 characters cleared by an erase/insert/scroll/clear operation
915 will be displayed in the current background color. Otherwise
916 the default background color is used.
922 When a bell character is sent to a background window,
924 displays a notification in the message line.
925 The notification message can be re-defined by this command.
926 Each occurrence of `%' in \fImessage\fP is replaced by
927 the number of the window to which a bell has been sent,
928 and each occurrence of `^G' is replaced by the definition for bell
929 in your termcap (usually an audible bell).
930 The default message is
934 An empty message can be supplied to the \*Qbell_msg\*U command to suppress
935 output of a message line (bell_msg "").
936 Without parameter, the current message is shown.
943 .RI [ command " [" args ]]
945 Bind a command to a key.
946 By default, most of the commands provided by
948 are bound to one or more keys as indicated in the \*QDEFAULT KEY BINDINGS\*U
950 command to create a new window is bound to \*QC-c\*U and \*Qc\*U.
951 The \*Qbind\*U command can be used to redefine the key bindings and to
953 The \fIkey\fP argument is either a single character, a two-character sequence
954 of the form \*Q^x\*U (meaning \*QC-x\*U), a backslash followed by an octal
955 number (specifying the ASCII code of the character), or a backslash followed
956 by a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
957 The argument can also be quoted, if you like.
958 If no further argument is given, any previously established binding
959 for this key is removed.
960 The \fIcommand\fP argument can be any command listed in this section.
962 If a command class is specified via the \*Q-c\*U option, the key
963 is bound for the specified class. Use the \*Qcommand\*U command
964 to activate a class. Command classes can be used to create multiple
965 command keys or multi-character bindings.
974 bind ^f screen telnet foobar
975 bind \e033 screen -ln -t root -h 1000 9 su
978 would bind the space key to the command that displays a list
979 of windows (so that the command usually invoked by \*QC-a C-w\*U
980 would also be available as \*QC-a space\*U). The next three lines
981 remove the default kill binding from \*QC-a C-k\*U and \*QC-a k\*U.
982 \*QC-a K\*U is then bound to the kill command. Then it
983 binds \*QC-f\*U to the command \*Qcreate a window with a TELNET
984 connection to foobar\*U, and bind \*Qescape\*U to the command
985 that creates an non-login window with a.\|k.\|a. \*Qroot\*U in slot #9, with
986 a superuser shell and a scrollback buffer of 1000 lines.
989 bind -c demo1 0 select 10
990 bind -c demo1 1 select 11
991 bind -c demo1 2 select 12
992 bindkey "^B" command -c demo1
995 makes \*QC-b 0\*U select window 10, \*QC-b 1\*U window 11, etc.
998 bind -c demo2 0 select 10
999 bind -c demo2 1 select 11
1000 bind -c demo2 2 select 12
1001 bind - command -c demo2
1004 makes \*QC-a - 0\*U select window 10, \*QC-a - 1\*U window 11, etc.
1015 This command manages screen's input translation tables. Every
1016 entry in one of the tables tells screen how to react if a certain
1017 sequence of characters is encountered. There are three tables:
1018 one that should contain actions programmed by the user, one for
1019 the default actions used for terminal emulation and one for
1020 screen's copy mode to do cursor movement. See section
1021 \*QINPUT TRANSLATION\*U for a list of default key bindings.
1025 option is given, bindkey modifies the default table,
1027 changes the copy mode table
1028 and with neither option the user table is selected.
1031 is the sequence of characters to which an action is bound. This
1032 can either be a fixed string or a termcap keyboard capability
1033 name (selectable with the
1037 Some keys on a VT100 terminal can send a different
1038 string if application mode is turned on (e.g the cursor keys).
1039 Such keys have two entries in the translation table. You can
1040 select the application mode entry by specifying the
1046 option tells screen not to do inter-character timing. One cannot
1047 turn off the timing if a termcap capability is used.
1050 can be any of screen's commands with an arbitrary number of
1054 is omitted the key-binding is removed from the table.
1056 Here are some examples of keyboard bindings:
1061 Show all of the default key bindings. The application mode entries
1062 are marked with [A].
1065 bindkey -k k1 select 1
1067 Make the "F1" key switch to window one.
1070 bindkey -t foo stuff barfoo
1072 Make "foo" an abbreviation of the word "barfoo". Timeout is disabled
1073 so that users can type slowly.
1076 bindkey "\e024" mapdefault
1078 This key-binding makes \*Q^T\*U an escape character for key-bindings. If
1079 you did the above \*Qstuff barfoo\*U binding, you can enter the word
1080 \*Qfoo\*U by typing \*Q^Tfoo\*U. If you want to insert a \*Q^T\*U
1081 you have to press the key twice (i.e., escape the escape binding).
1084 bindkey -k F1 command
1086 Make the F11 (not F1!) key an alternative screen
1087 escape (besides ^A).
1093 Send a break signal for \fIduration\fP*0.25 seconds to this window.
1094 For non-Posix systems the time interval may be rounded up to full seconds.
1095 Most useful if a character device is attached to the window rather than
1096 a shell process (See also chapter \*QWINDOW TYPES\*U). The maximum duration of
1097 a break signal is limited to 15 seconds.
1102 Activate the screen blanker. First the screen is cleared. If no blanker
1103 program is defined, the cursor is turned off, otherwise, the
1104 program is started and it's output is written to the screen.
1105 The screen blanker is killed with the first keypress, the read key
1108 This command is normally used together with the \*Qidle\*U command.
1112 .RI [ "program args" ]
1114 Defines a blanker program. Disables the blanker program if an
1115 empty argument is given. Shows the currently set blanker program if no
1116 arguments are given.
1120 .RI [ tcsendbreak | TIOCSBRK
1123 Choose one of the available methods of generating a break signal for
1124 terminal devices. This command should affect the current window only.
1125 But it still behaves identical to \*Qdefbreaktype\*U. This will be changed in
1127 Calling \*Qbreaktype\*U with no parameter displays the break method for the
1132 .RI [ exchange-file ]
1134 Change the filename used for reading and writing with the paste buffer.
1135 If the optional argument to the \*Qbufferfile\*U command is omitted,
1136 the default setting (\*Q/tmp/screen-exchange\*U) is reactivated.
1137 The following example will paste the system's password file into
1140 window (using the paste buffer, where a copy remains):
1143 C-a : bufferfile /etc/passwd
1149 .BR "c1 " [ on | off ]
1151 Change c1 code processing. \*QC1 on\*U tells screen to treat
1152 the input characters between 128 and 159 as control functions.
1153 Such an 8-bit code is normally the same as ESC followed by the
1154 corresponding 7-bit code. The default setting is to process c1
1155 codes and can be changed with the \*Qdefc1\*U command.
1156 Users with fonts that have usable characters in the
1157 c1 positions may want to turn this off.
1160 .BR "caption always" | splitonly
1166 This command controls the display of the window captions. Normally
1167 a caption is only used if more than one window is shown on the
1168 display (split screen mode). But if the type is set to
1170 screen shows a caption even if only one window is displayed. The default
1174 The second form changes the text used for the caption. You can use
1175 all escapes from the \*QSTRING ESCAPES\*U chapter. Screen uses
1176 a default of `%3n %t'.
1178 You can mix both forms by providing a string as an additional argument.
1183 Change the current character set slot designation and charset
1184 mapping. The first four character of
1186 are treated as charset designators while the fifth and sixth
1187 character must be in range '0' to '3' and set the GL/GR charset
1188 mapping. On every position a '.' may be used to indicate that
1189 the corresponding charset/mapping should not be changed
1190 (\fIset\fP is padded to six characters internally by appending '.'
1191 chars). New windows have "BBBB02" as default charset, unless a
1192 \*Qencoding\*U command is active.
1194 The current setting can be viewed with the \*Qinfo\*U command.
1200 Change the \fIcurrent directory\fP of
1202 to the specified directory or, if called without an argument,
1203 to your home directory (the value of the environment variable $HOME).
1204 All windows that are created by means of the \*Qscreen\*U command
1205 from within \*Q.screenrc\*U or by means of \*QC-a : screen ...\*U
1206 or \*QC-a c\*U use this as their default directory.
1207 Without a chdir command, this would be the directory from which
1210 Hardcopy and log files are always written to the \fIwindow's\fP default
1211 directory, \fInot\fP the current directory of the process running in the
1213 You can use this command multiple times in your .screenrc to start various
1214 windows in different default directories, but the last chdir value will
1215 affect all the windows you create interactively.
1220 Clears the current window and saves its image to the scrollback buffer.
1226 Allows you to enter \*Q.screenrc\*U command lines. Useful
1227 for on-the-fly modification of key bindings,
1228 specific window creation and changing settings. Note that the \*Qset\*U
1229 keyword no longer exists! Usually commands affect the current window rather
1230 than default settings for future windows. Change defaults with commands
1231 starting with 'def...'.
1233 If you consider this as the `Ex command mode' of
1235 you may regard \*QC-a esc\*U (copy mode) as its `Vi command mode'.
1242 This command has the same effect as typing the screen escape
1243 character (^A). It is probably only useful for key bindings.
1244 If the \*Q-c\*U option is given, select the specified command
1245 class. See also \*Qbind\*U and \*Qbindkey\*U.
1248 .BR "compacthist " [ on | off ]
1250 This tells screen whether to suppress trailing blank lines when
1251 scrolling up text into the history buffer.
1254 .BR "console " [ on | off ]
1256 Grabs or un-grabs the machines console output to a window.
1258 Only the owner of /dev/console can grab the console output.
1259 This command is only available if the machine supports the ioctl TIOCCONS.
1264 Enter copy/scrollback mode. This allows you to copy text from the current
1265 window and its history into the paste buffer. In this mode a vi-like
1266 `full screen editor' is active:
1268 .IR "Movement keys" :
1272 \fBh\fP, \fBj\fP, \fBk\fP, \fBl\fP move the cursor line by line or
1276 \fB0\fP, \fB^\fP and \fB$\fP move to the leftmost column, to the first or last
1277 non-whitespace character on the line.
1280 \fBH\fP, \fBM\fP and \fBL\fP move the cursor to the leftmost column
1281 of the top, center or bottom line of the window.
1284 \fB+\fP and \fB\-\fP positions one line up and down.
1287 \fBG\fP moves to the specified absolute line (default: end of buffer).
1290 \fB|\fP moves to the specified absolute column.
1293 \fBw\fP, \fBb\fP, \fBe\fP move the cursor word by word.
1296 \fBB\fP, \fBE\fP move the cursor WORD by WORD (as in vi).
1299 .\"\fBf\fP,\fBt\fP, \fBF\fP, \fBT\fP move the cursor forward/backward to the next occurence of the target.
1300 \fBf/F\fP, \fBt/T\fP move the cursor forward/backward to the next occurence of the target. (eg, '3fy' will
1301 move the cursor to the 3rd 'y' to the right.)
1304 \fB;\fP \fB,\fP Repeat the last f/F/t/T command in the same/opposite direction.
1307 \fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of
1308 lines while preserving the cursor position. (Default: half screen-full).
1311 \fBC-b\fP and \fBC-f\fP scroll the display up/down a full screen.
1314 \fBg\fP moves to the beginning of the buffer.
1317 \fB%\fP jumps to the specified percentage of the buffer.
1323 Emacs style movement keys can be customized by a .screenrc command.
1324 (E.\|g. markkeys "h=^B:l=^F:$=^E") There is no simple method for a full
1325 emacs-style keymap, as this involves multi-character codes.
1331 The copy range is specified by setting two marks. The text between these marks
1332 will be highlighted. Press
1335 \fBspace\fP to set the first or second mark
1339 \fBY\fP and \fBy\fP used to mark one whole line or to mark from
1343 \fBW\fP marks exactly one word.
1346 .IR "Repeat count" :
1348 Any of these commands can be prefixed with a repeat count number by pressing
1352 \fB0\fP..\fB9\fP which
1353 is taken as a repeat count.
1355 Example: \*QC-a C-[ H 10 j 5 Y\*U will copy lines
1356 11 to 15 into the paste buffer.
1361 \fB/\fP \fIVi\fP-like search forward.
1363 \fB?\fP \fIVi\fP-like search backward.
1365 \fBC-a s\fP \fIEmacs\fP style incremental search forward.
1367 \fBC-r\fP \fIEmacs\fP style reverse i-search.
1371 There are however some keys that act differently than in
1374 does not allow one to yank rectangular blocks of text, but
1379 \fBc\fP or \fBC\fP to set the left or right margin respectively. If no repeat count is
1380 given, both default to the current cursor position.
1382 Example: Try this on a rather full text screen:
1383 \*QC-a [ M 20 l SPACE c 10 l 5 j C SPACE\*U.
1385 This moves one to the middle line of the screen, moves in 20 columns left,
1386 marks the beginning of the paste buffer, sets the left column, moves 5 columns
1387 down, sets the right column, and then marks the end of
1388 the paste buffer. Now try:
1390 \*QC-a [ M 20 l SPACE 10 l 5 j SPACE\*U
1392 and notice the difference in the amount of text copied.
1395 \fBJ\fP joins lines. It toggles between 4 modes: lines separated by a
1396 newline character (012), lines glued seamless, lines separated by a single
1397 whitespace and comma separated lines. Note that you can prepend the newline
1398 character with a carriage return character, by issuing a \*Qcrlf on\*U.
1401 \fBv\fP is for all the
1403 users with \*Q:set numbers\*U \- it toggles the left margin between column 9
1407 \fBa\fP before the final space key to toggle in append mode. Thus
1408 the contents of the paste buffer will not be overwritten, but is appended to.
1411 \fBA\fP toggles in append mode and sets a (second) mark.
1414 \fB>\fP sets the (second) mark and writes the contents of the paste buffer to
1415 the screen-exchange file (/tmp/screen-exchange per default) once copy-mode is
1418 This example demonstrates how to dump the whole scrollback buffer
1419 to that file: \*QC-A [ g SPACE G $ >\*U.
1422 \fBC-g\fP gives information about the current line and column.
1425 \fBx\fP exchanges the first mark and the current cursor position. You
1426 can use this to adjust an already placed mark.
1429 \fB@\fP does nothing. Does not even exit copy mode.
1432 All keys not described here exit copy mode.
1439 No longer exists, use \*Qreadreg\*U instead.
1442 .BR "crlf " [ on | off ]
1444 This affects the copying of text regions with the `C-a [' command. If it is set
1445 to `on', lines will be separated by the two character sequence `CR' - `LF'.
1446 Otherwise (default) only `LF' is used.
1447 When no parameter is given, the state is toggled.
1450 .BR "debug on" | off
1452 Turns runtime debugging on or off. If
1454 has been compiled with option -DDEBUG debugging available and is turned on per
1455 default. Note that this command only affects debugging output from the main
1456 \*QSCREEN\*U process correctly. Debug output from attacher processes can only
1457 be turned off once and forever.
1460 .BR "defc1 on" | off
1462 Same as the \fBc1\fP command except that the default setting for new
1463 windows is changed. Initial setting is `on'.
1466 .BR "defautonuke on" | off
1468 Same as the \fBautonuke\fP command except that the default setting for new displays is changed. Initial setting is `off'.
1469 Note that you can use the special `AN' terminal capability if you
1470 want to have a dependency on the terminal type.
1473 .BR "defbce on" | off
1475 Same as the \fBbce\fP command except that the default setting for new
1476 windows is changed. Initial setting is `off'.
1480 .RI [ tcsendbreak | TIOCSBRK
1483 Choose one of the available methods of generating a break signal for
1484 terminal devices. The preferred methods are
1485 .IR tcsendbreak " and " TIOCSBRK .
1490 session for the duration
1491 of the break, but it may be the only way to generate long breaks.
1492 .IR Tcsendbreak " and " TIOCSBRK
1493 may or may not produce long breaks with spikes (e.g. 4 per
1494 second). This is not only system-dependent, this also differs between
1495 serial board drivers.
1496 Calling \*Qdefbreaktype\*U with no parameter displays the current setting.
1499 .BR "defcharset " [ \fIset ]
1501 Like the \fBcharset\fP command except that the default setting for
1502 new windows is changed. Shows current default if called without
1508 Set the default command characters. This is equivalent to the
1509 \*Qescape\*U except that it is useful multiuser sessions only. In a
1510 multiuser session \*Qescape\*U changes the command character of the
1511 calling user, where \*Qdefescape\*U changes the default command
1512 characters for users that will be added later.
1515 .BR "defflow on" | off | auto
1518 Same as the \fBflow\fP command except that the default setting for new windows
1519 is changed. Initial setting is `auto'.
1520 Specifying \*Qdefflow auto interrupt\*U is the same as the command-line options
1526 .BR "defgr on" | off
1528 Same as the \fBgr\fP command except that the default setting for new
1529 windows is changed. Initial setting is `off'.
1532 .BR "defhstatus " [ \fIstatus ]
1534 The hardstatus line that all new windows will get is set to
1536 This command is useful to make the hardstatus of every window
1537 display the window number or title or the like.
1539 may contain the same directives as in the window messages, but
1540 the directive escape character is '^E' (octal 005) instead of '%'.
1541 This was done to make a misinterpretation of program generated
1542 hardstatus lines impossible.
1545 is omitted, the current default string is displayed.
1546 Per default the hardstatus line of new windows is empty.
1549 .BI "defencoding " enc
1551 Same as the \fBencoding\fP command except that the default setting for new
1552 windows is changed. Initial setting is the encoding taken from the
1556 .BR "deflog on" | off
1558 Same as the \fBlog\fP command except that the default setting for new windows
1559 is changed. Initial setting is `off'.
1562 .BR "deflogin on" | off
1564 Same as the \fBlogin\fP command except that the default setting for new windows
1565 is changed. This is initialized with `on' as distributed (see config.h.in).
1570 The mode of each newly allocated pseudo-tty is set to \fImode\fP.
1571 \fIMode\fP is an octal number.
1572 When no \*Qdefmode\*U command is given, mode 0622 is used.
1575 .BR "defmonitor on" | off
1577 Same as the \fBmonitor\fP command except that the default setting for new
1578 windows is changed. Initial setting is `off'.
1581 .BR "defmousetrack on" | off
1583 Same as the \fBmousetrack\fP command except that the default setting for new
1584 windows is changed. Initial setting is `off'.
1588 .BR on | off | \fInumsecs
1590 Same as the \fBnonblock\fP command except that the default setting for
1591 displays is changed. Initial setting is `off'.
1594 .BI "defobuflimit " limit
1596 Same as the \fBobuflimit\fP command except that the default setting for new displays is changed. Initial setting is 256 bytes.
1597 Note that you can use the special 'OL' terminal capability if you
1598 want to have a dependency on the terminal type.
1601 .BI "defscrollback " num
1603 Same as the \fBscrollback\fP command except that the default setting for new
1604 windows is changed. Initial setting is 100.
1607 .BI "defshell " command
1609 Synonym to the \fBshell\fP command. See there.
1612 .BR "defsilence on" | off
1614 Same as the \fBsilence\fP command except that the default setting for new
1615 windows is changed. Initial setting is `off'.
1618 .BI "defslowpaste " msec"
1620 Same as the \fBslowpaste\fP command except that the default setting for new
1621 windows is changed. Initial setting is 0 milliseconds, meaning `off'.
1624 .BR "defutf8 on" | off
1626 Same as the \fButf8\fP command except that the default setting for new
1627 windows is changed. Initial setting is `on' if screen was started with
1628 \*Q-U\*U, otherwise `off'.
1631 .BR "defwrap on" | off
1633 Same as the \fBwrap\fP command except that the default setting for new
1634 windows is changed. Initially line-wrap is on and can be toggled with the
1635 \*Qwrap\*U command (\*QC-a r\*U) or by means of "C-a : wrap on|off".
1638 .BR "defwritelock on" | off | auto
1640 Same as the \fBwritelock\fP command except that the default setting for new
1641 windows is changed. Initially writelocks will off.
1644 .BR "defzombie " [\fIkeys\fP]
1646 Synonym to the \fBzombie\fP command. Both currently change the default.
1655 session (disconnect it from the terminal and put it into the background).
1656 This returns you to the shell where you invoked
1660 can be resumed by invoking
1664 option (see also section \*QCOMMAND-LINE OPTIONS\*U). The
1666 option tells screen to immediately close the connection to the
1667 terminal (\*Qhangup\*U).
1672 Show what screen thinks about your terminal. Useful if you want to know
1673 why features like color or the alternate charset don't work.
1678 Shows a tabular listing of all currently connected user front-ends (displays).
1679 This is most useful for multiuser sessions.
1682 .BR "digraph " [ \fIpreset [ \fI unicode-value ] ]
1684 This command prompts the user for a digraph sequence. The next
1685 two characters typed are looked up in a builtin table and the
1686 resulting character is inserted in the input stream. For example,
1687 if the user enters 'a"', an a-umlaut will be inserted. If the
1688 first character entered is a 0 (zero),
1690 will treat the following characters (up to three) as an octal
1691 number instead. The optional argument
1693 is treated as user input, thus one can create an \*Qumlaut\*U key.
1694 For example the command "bindkey ^K digraph '"'" enables the user
1695 to generate an a-umlaut by typing CTRL-K a.
1698 is specified, a new digraph is created with the specified preset. The digraph is unset
1699 if a zero value is provided for the
1705 Write the termcap entry for the virtual terminal optimized for the currently
1706 active window to the file \*Q.termcap\*U in the user's
1707 \*Q$HOME/.screen\*U directory (or wherever
1709 stores its sockets. See the \*QFILES\*U section below).
1710 This termcap entry is identical to the value of the environment variable
1711 $TERMCAP that is set up by
1713 for each window. For terminfo based systems you will need to run a converter
1716 and then compile the entry with
1723 The echo command may be used to annoy
1725 users with a 'message of the
1726 day'. Typically installed in a global /local/etc/screenrc.
1727 The option \*Q-n\*U may be used to suppress the line feed.
1728 See also \*Qsleep\*U.
1729 Echo is also useful for online checking of environment variables.
1737 how to interpret the input/output. The first argument
1738 sets the encoding of the current window. Each window can emulate
1739 a different encoding. The optional second parameter overwrites
1740 the encoding of the connected terminal. It should never be
1741 needed as screen uses the locale setting to detect the encoding.
1742 There is also a way to select a terminal encoding depending on
1743 the terminal type by using the \*QKJ\*U termcap entry.
1745 Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, GBK, KOI8-R,
1746 CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6,
1747 ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis.
1749 See also \*Qdefencoding\*U, which changes the default setting of a new
1755 Set the command character to \fIx\fP and the character generating a literal
1756 command character (by triggering the \*Qmeta\*U command) to \fIy\fP (similar
1758 Each argument is either a single character, a two-character sequence
1759 of the form \*Q^x\*U (meaning \*QC-x\*U), a backslash followed by an octal
1760 number (specifying the ASCII code of the character), or a backslash followed
1761 by a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
1762 The default is \*Q^Aa\*U.
1770 Parses and executes each argument as separate command.
1775 .IR "newcommand " [ "args ..." ]]
1777 Run a unix subprocess (specified by an executable path \fInewcommand\fP and its
1778 optional arguments) in the current window. The flow of data between
1779 newcommands stdin/stdout/stderr, the process originally started in the window
1780 (let us call it "application-process") and screen itself (window) is
1781 controlled by the file descriptor pattern fdpat.
1782 This pattern is basically a three character sequence representing stdin, stdout
1783 and stderr of newcommand. A dot (.) connects the file descriptor
1786 An exclamation mark (!) causes the file
1787 descriptor to be connected to the application-process. A colon (:) combines
1789 User input will go to newcommand unless newcommand receives the
1790 application-process'
1791 output (fdpats first character is `!' or `:') or a pipe symbol (|) is added
1792 (as a fourth character) to the end of fdpat.
1794 Invoking `exec' without arguments shows name and arguments of the currently
1795 running subprocess in this window. Only one subprocess a time can be running
1798 When a subprocess is running the `kill' command will affect it instead of the
1801 Refer to the postscript file `doc/fdpat.ps' for a confusing illustration
1802 of all 21 possible combinations. Each drawing shows the digits 2,1,0
1803 representing the three file descriptors of newcommand. The box marked
1804 `W' is the usual pty that has the application-process on its slave side.
1805 The box marked `P' is the secondary pty that now has
1811 Whitespace between the word `exec' and fdpat and the command
1812 can be omitted. Trailing dots and a fdpat consisting only of dots can be
1813 omitted. A simple `|' is synonymous for the pattern `!..|'; the word exec can
1814 be omitted here and can always be replaced by `!'.
1824 Creates another shell in the same window, while the original shell is still
1825 running. Output of both shells is displayed and user input is sent to the new
1834 Set the speed of the window's tty. If your stty command operates on stdout,
1835 then add another `!'.
1841 This adds a pager to the window output. The special character `|' is needed to
1842 give the user control over the pager although it gets its input from the
1843 window's process. This works, because
1845 listens on stderr (a behavior that
1847 would not expect without the `|')
1848 when its stdin is not a tty.
1850 versions newer than 177 fail miserably here; good old
1854 !:sed -n s/.*Error.*/\e007/p
1856 Sends window output to both, the user and the sed command. The sed inserts an
1857 additional bell character (oct. 007) to the window output seen by
1859 This will cause "Bell in window x" messages, whenever the string "Error"
1860 appears in the window.
1865 Change the window size to the size of the current region. This
1866 command is needed because screen doesn't adapt the window size
1867 automatically if the window is displayed more than once.
1871 .RB [ on | off | "auto\fR]\fP"
1873 Sets the flow-control mode for this window.
1874 Without parameters it cycles the current window's flow-control setting from
1875 "automatic" to "on" to "off".
1876 See the discussion on \*QFLOW-CONTROL\*U later on in this document for full
1877 details and note, that this is subject to change in future releases.
1878 Default is set by `defflow'.
1881 .BR "focus " [ up | down | top | bottom ]
1883 Move the input focus to the next region. This is done in a cyclic
1884 way so that the top region is selected after the bottom one. If
1885 no subcommand is given it defaults to `down'. `up' cycles in the
1886 opposite order, `top' and `bottom' go to the top and bottom
1887 region respectively. Useful bindings are (j and k as in vi)
1894 Note that \fBk\fP is traditionally bound to the \fIkill\fP command.
1897 .BI "focusminsize [ ( " width "|max|_ ) ( " height "|max|_ ) ]"
1899 This forces any currently selected region to be automatically
1900 resized at least a certain \fIwidth\fP and \fIheight\fP. All
1901 other surrounding regions will be resized in order to accomodate.
1902 This constraint follows everytime the \*Qfocus\*U command is
1903 used. The \*Qresize\*U command can be used to increase either
1904 dimension of a region, but never below what is set with
1905 \*Qfocusminsize\*U. The underscore `_' is a synonym for
1906 \fBmax\fP. Setting a \fIwidth\fP and \fIheight\fP of `0 0'
1907 (zero zero) will undo any constraints and allow for manual resizing.
1908 Without any parameters, the minimum width and height is shown.
1911 .BR "gr " [ on | off ]
1913 Turn GR charset switching on/off. Whenever screen sees an input
1914 character with the 8th bit set, it will use the charset stored in the
1915 GR slot and print the character with the 8th bit stripped. The
1916 default (see also \*Qdefgr\*U) is not to process GR switching because
1917 otherwise the ISO88591 charset would not work.
1923 Change or show the group the current window belongs to. Windows can
1924 be moved around between different groups by specifying the name of
1925 the destination group. Without specifying a group, the title of the
1926 current group is displayed.
1933 Writes out the currently displayed image to the file \fIfile\fP,
1934 or, if no filename is specified, to \fIhardcopy.n\fP in the
1935 default directory, where \fIn\fP is the number of the current window.
1936 This either appends or overwrites the file if it exists. See below.
1937 If the option \fB-h\fP is specified, dump also the contents of the
1941 .BR "hardcopy_append on" | off
1945 will append to the "hardcopy.n" files created by the command \*QC-a h\*U,
1946 otherwise these files are overwritten each time.
1950 .BI "hardcopydir "directory
1952 Defines a directory where hardcopy files will be placed. If unset, hardcopys
1955 current working directory.
1958 .BR "hardstatus " [ on | off ]
1960 .BR "hardstatus \fR[\fBalways\fR]\fBlastline" | message | ignore
1963 .B "hardstatus string"
1966 This command configures the use and emulation of the terminal's
1967 hardstatus line. The first form
1970 will use the hardware status line to display messages. If the
1971 flag is set to `off', these messages
1972 are overlaid in reverse video mode at the display line. The default
1975 The second form tells
1977 what to do if the terminal doesn't
1978 have a hardstatus line (i.e. the termcap/terminfo capabilities
1979 "hs", "ts", "fs" and "ds" are not set). If the type
1980 \*Qlastline\*U is used,
1982 will reserve the last line of the
1984 the hardstatus. \*Qmessage\*U uses
1986 message mechanism and
1989 never to display the hardstatus.
1990 If you prepend the word \*Qalways\*U to the type (e.g., \*Qalwayslastline\*U),
1992 will use the type even if the terminal supports a hardstatus.
1994 The third form specifies the contents of the hardstatus line. '%h' is
1995 used as default string, i.e., the stored hardstatus of the current
1996 window (settable via \*QESC]0;<string>^G\*U or \*QESC_<string>ESC\e\*U)
1997 is displayed. You can customize this to any string you like including
1998 the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave out
2001 the current string is displayed.
2003 You can mix the second and third form by providing the string as
2004 additional argument.
2009 .RI [ lines " [" cols ]]
2011 Set the display height to a specified number of lines. When no argument
2012 is given it toggles between 24 and 42 lines display. You can also
2013 specify a width if you want to change both values.
2016 option tells screen to leave the display size unchanged and just set
2026 Not really a online help, but
2029 showing you all the key bindings.
2030 The first pages list all the internal commands followed by their current
2032 Subsequent pages will display the custom commands, one command per key.
2033 Press space when you're done reading each page, or return to exit early.
2034 All other characters are ignored. If the \*Q-c\*U option is given,
2035 display all bound commands for the specified command class.
2036 See also \*QDEFAULT KEY BINDINGS\*U section.
2041 Usually users work with a shell that allows easy access to previous commands.
2042 For example csh has the command \*Q!!\*U to repeat the last command executed.
2044 allows you to have a primitive way of re-calling \*Qthe command that
2045 started ...\*U: You just type the first letter of that command, then hit
2048 tries to find a previous line that matches with the `prompt character'
2049 to the left of the cursor. This line is pasted into this window's input queue.
2050 Thus you have a crude command history (made up by the visible window and its
2054 .BI "hstatus " status
2056 Change the window's hardstatus line to the string \fIstatus\fP.
2063 Sets a command that is run after the specified number of seconds
2064 inactivity is reached. This command will normally be the \*Qblanker\*U
2065 command to create a screen blanker, but it can be any screen command.
2066 If no command is specified, only the timeout is set. A timeout of
2067 zero (or the special timeout \fBoff\fP) disables the timer.
2068 If no arguments are given, the current settings are displayed.
2071 .BR "ignorecase " [ on | off ]
2073 Tell screen to ignore the case of characters in searches. Default is
2079 Uses the message line to display some information about the current window:
2080 the cursor position in the form \*Q(column,row)\*U starting with \*Q(1,1)\*U,
2081 the terminal width and height plus the size of the scrollback buffer in lines,
2082 like in \*Q(80,24)+50\*U, the current state of window XON/XOFF flow control
2083 is shown like this (See also section FLOW CONTROL):
2086 +flow automatic flow control, currently on.
2087 -flow automatic flow control, currently off.
2088 +(+)flow flow control enabled. Agrees with automatic control.
2089 -(+)flow flow control disabled. Disagrees with automatic control.
2090 +(-)flow flow control enabled. Disagrees with automatic control.
2091 -(-)flow flow control disabled. Agrees with automatic control.
2094 The current line wrap setting (`+wrap' indicates enabled, `\-wrap' not) is
2095 also shown. The flags `ins', `org', `app', `log', `mon' or `nored' are
2096 displayed when the window is in insert mode, origin mode,
2097 application-keypad mode, has output logging,
2098 activity monitoring or partial redraw enabled.
2100 The currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP,
2101 or \fIG3\fP) and in square brackets the terminal character sets that are
2102 currently designated as \fIG0\fP through \fIG3\fP is shown. If the window
2103 is in UTF-8 mode, the string \*QUTF-8\*U is shown instead.
2105 Additional modes depending on the type of the window are displayed at the end of the status line (See also chapter \*QWINDOW TYPES\*U).
2107 If the state machine of the terminal emulator is in a non-default state,
2108 the info line is started with a string identifying the current state.
2110 For system information use the \*Qtime\*U command.
2113 .BR ins_reg " [" \fIkey ]
2115 No longer exists, use \*Qpaste\*U instead.
2120 Kill current window.
2122 If there is an `exec' command running then it is killed. Otherwise the process
2123 (shell) running in the window receives a HANGUP condition,
2124 the window structure is removed and
2126 (your display) switches to another
2127 window. When the last window is destroyed,
2132 switches to the previously displayed window.
2136 users should keep this command in mind, when killing a line.
2137 It is recommended not to use \*QC-a\*U as the
2139 escape key or to rebind kill to \*QC-a K\*U.
2144 Redisplay the last contents of the message/status line.
2145 Useful if you're typing when a message appears, because the message goes
2146 away when you press a key (unless your terminal has a hardware status line).
2147 Refer to the commands \*Qmsgwait\*U and \*Qmsgminwait\*U for fine tuning.
2150 .BR "layout new " [\fItitle\fP]
2152 Create a new layout. The screen will change to one whole region
2153 and be switched to the blank window. From here, you build the
2154 regions and the windows they show as you desire. The new layout
2155 will be numbered with the smallest available integer, starting
2156 with zero. You can optionally give a title to your new layout.
2157 Otherwise, it will have a default title of \*Qlayout\*U. You
2158 can always change the title later by using the command
2162 .BR "layout remove " [\fIn|title\fP]
2164 Remove, or in other words, delete the specified layout. Either
2165 the number or the title can be specified. Without either
2166 specification, \fIscreen\fP will remove the current layout.
2168 Removing a layout does not affect your set windows or regions.
2173 Switch to the next layout available
2178 Switch to the previous layout available
2181 .BR "layout select " [\fIn|title\fP]
2183 Select the desired layout. Either the number or the title can
2184 be specified. Without either specification, \fIscreen\fP will
2185 prompt and ask which screen is desired. To see which layouts are
2186 available, use the \fBlayout show\fP command.
2191 List on the message line the number(s) and title(s) of the available
2192 layout(s). The current layout is flagged.
2195 .BR "layout title " [\fItitle\fP]
2197 Change or display the title of the current layout. A string given
2198 will be used to name the layout. Without any options, the current
2199 title and number is displayed on the message line.
2202 .BR "layout number " [\fIn\fP]
2204 Change or display the number of the current layout. An integer given
2205 will be used to number the layout. Without any options, the current
2206 number and title is displayed on the message line.
2209 .BR "layout attach " [\fItitle\fP|\fB:last\fP]
2211 Change or display which layout to reattach back to. The default is
2212 \fB:last\fP, which tells \fIscreen\fP to reattach back to the last
2213 used layout just before detachment. By supplying a title, You can
2214 instruct \fIscreen\fP to reattach to a particular layout regardless
2215 which one was used at the time of detachment. Without any options,
2216 the layout to reattach to will be shown in the message line.
2219 .BR "layout save " [\fIn|title\fP]
2221 Remember the current arrangement of regions. When used, \fIscreen\fP
2222 will remember the arrangement of vertically and horizontally split
2223 regions. This arrangement is restored when a \fIscreen\fP session
2224 is reattached or switched back from a different layout. If the
2225 session ends or the \fIscreen\fP process dies, the layout
2226 arrangements are lost. The \fBlayout dump\fP command should help
2227 in this siutation. If a number
2228 or title is supplied, \fIscreen\fP will remember the arrangement of
2229 that particular layout. Without any options, \fIscreen\fP will
2230 remember the current layout.
2232 Saving your regions can be done automatically by using the
2233 \fBlayout autosave\fP command.
2236 .BR "layout autosave " [\fBon|off\fP]
2238 Change or display the status of automatcally saving layouts. The
2239 default is \fBon\fP, meaning when \fIscreen\fP is detached or
2240 changed to a different layout, the arrangement of regions and windows
2241 will be remembered at the time of change and restored upon return.
2242 If autosave is set to \fBoff\fP, that arrangement will only be
2243 restored to either to the last manual save, using \fBlayout save\fP,
2244 or to when the layout was first created, to a single region with
2245 a single window. Without either an \fBon\fP or \fBoff\fP, the
2246 current status is displayed on the message line.
2249 .BR "layout dump " [\fIfilename\fP]
2251 Write to a file the order of splits made in the current layout. This
2252 is useful to recreate the order of your regions used in your current
2253 layout. Only the current layout is recorded. While the order of the
2254 regions are recorded, the sizes of those regions and which windows
2255 correspond to which regions are not. If no filename is specified,
2256 the default is \fIlayout-dump\fP, saved in the directory that the
2257 \fIscreen\fP process was started in. If the file already exists,
2258 \fBlayout dump\fP will append to that file. As an example:
2261 C-a : layout dump /home/user/.screenrc
2264 will save or append the layout to the user's \fI.screenrc\fP file.
2269 Display the disclaimer page. This is done whenever
2271 is started without options, which should be often enough. See also
2272 the \*Qstartup_message\*U command.
2278 Call a screenlock program (/local/bin/lck or /usr/bin/lock or a builtin if no
2279 other is available). Screen does not accept any command keys until this program
2280 terminates. Meanwhile processes in the windows may continue, as the windows
2281 are in the `detached' state. The screenlock program may be changed through the
2282 environment variable $LOCKPRG (which must be set in the shell from which
2284 is started) and is executed with the user's uid and gid.
2287 When you leave other shells unlocked and you have no password set on
2289 the lock is void: One could easily re-attach from an unlocked
2290 shell. This feature should rather be called `lockterminal'.
2293 .BR "log " [ on | off ]
2295 Start/stop writing output of the current window to a file
2296 \*Qscreenlog.\fIn\fP\*U in the window's default directory, where \fIn\fP
2297 is the number of the current window. This filename can be changed with
2298 the `logfile' command. If no parameter is given, the state
2299 of logging is toggled. The session log is appended to the previous contents
2300 of the file if it already exists. The current contents and the contents
2301 of the scrollback history are not included in the session log.
2305 .BI "logfile " filename
2307 .BI "logfile flush " secs
2309 Defines the name the log files will get. The default is
2310 \*Qscreenlog.%n\*U. The second form changes the number of seconds
2312 will wait before flushing the logfile buffer to the file-system. The
2313 default value is 10 seconds.
2316 .BR "login " [ on | off ]
2318 Adds or removes the entry in the utmp database file for the current window.
2319 This controls if the window is `logged in'.
2320 When no parameter is given, the login state of the window is toggled.
2321 Additionally to that toggle, it is convenient having a `log in' and a `log out'
2322 key. E.\|g. `bind I login on' and `bind O login off' will map these
2323 keys to be C-a I and C-a O.
2324 The default setting (in config.h.in) should be \*Qon\*U for a
2326 that runs under suid-root.
2327 Use the \*Qdeflogin\*U command to change the default login state for new
2328 windows. Both commands are only present when
2330 has been compiled with utmp support.
2333 .BR "logtstamp " [ on | off ]
2335 .B "logtstamp after"
2338 .B "logtstamp string"
2341 This command controls logfile time-stamp mechanism of
2344 time-stamps are turned \*Qon\*U,
2346 adds a string containing
2347 the current time to the logfile after two minutes of inactivity.
2348 When output continues and more than another two minutes have passed,
2349 a second time-stamp is added to document the restart of the
2350 output. You can change this timeout with the second form
2351 of the command. The third form is used for customizing the time-stamp
2352 string (`-- %n:%t -- time-stamp -- %M/%d/%y %c:%s --\\n' by
2360 that the next input character should only be looked up
2361 in the default bindkey table. See also \*Qbindkey\*U.
2366 Like mapdefault, but don't even look in the default bindkey table.
2372 Set the inter-character timer for input sequence detection to a timeout
2375 ms. The default timeout is 300ms. Maptimeout with no arguments shows
2376 the current setting.
2377 See also \*Qbindkey\*U.
2380 .BI "markkeys " string
2382 This is a method of changing the keymap used for copy/history mode.
2383 The string is made up of \fIoldchar\fP=\fInewchar\fP pairs which are
2384 separated by `:'. Example: The string \*QB=^B:F=^F\*U will change the
2385 keys `C-b' and `C-f' to the vi style binding (scroll up/down fill page).
2386 This happens to be the default binding for `B' and `F'.
2387 The command \*Qmarkkeys h=^B:l=^F:$=^E\*U would set the mode for an emacs-style
2389 If your terminal sends characters, that cause you to abort copy mode,
2390 then this command may help by binding these characters to do nothing.
2391 The no-op character is `@' and is used like this: \*Qmarkkeys
2392 @=L=H\*U if you do not want to use the `H' or `L' commands any longer.
2393 As shown in this example, multiple keys can be assigned to one function in a
2399 Set the maximum window number screen will create. Doesn't affect
2400 already existing windows. The number can be increased only when there are no
2406 Insert the command character (C-a) in the current window's input stream.
2409 .BR "monitor " [ on | off ]
2411 Toggles activity monitoring of windows.
2412 When monitoring is turned on and an affected window is switched into the
2413 background, you will receive the activity notification message in the
2414 status line at the first sign of output and the window will also be marked
2415 with an `@' in the window-status display.
2416 Monitoring is initially off for all windows.
2419 .BR "mousetrack " [ on | off ]
2421 This command determines whether
2424 mouse clicks. When this command is enabled, regions that have
2425 been split in various ways can be selected by pointing to them
2426 with a mouse and left-clicking them. Without specifying \fBon\fP
2427 or \fBoff\fP, the current state is displayed. The default state
2428 is determined by the \*Qdefmousetrack\*U command.
2431 .BI "msgminwait " sec
2435 delays a new message when one message is currently displayed.
2436 The default is 1 second.
2441 Defines the time a message is displayed if
2443 is not disturbed by other activity. The default is 5 seconds.
2446 .BR "multiuser on" | off
2448 Switch between singleuser and multiuser mode. Standard
2450 operation is singleuser. In multiuser mode the commands `acladd',
2451 `aclchg', `aclgrp' and `acldel'
2452 can be used to enable (and disable) other users accessing this
2457 .BR "nethack on" | off
2459 Changes the kind of error messages used by
2461 When you are familiar with the game \*Qnethack\*U, you may enjoy the
2462 nethack-style messages which will often blur the facts a little, but are
2463 much funnier to read. Anyway, standard messages often tend to be unclear as
2469 was compiled with the NETHACK flag defined. The
2470 default setting is then determined by the presence of the environment
2471 variable $NETHACKOPTIONS and the file ~/.nethackrc - if either one is present,
2472 the default is \fBon\fP.
2477 Switch to the next window.
2478 This command can be used repeatedly to cycle through the list of windows.
2482 .RB [ on | off | \fInumsecs ]
2484 Tell screen how to deal with user interfaces (displays) that cease to
2485 accept output. This can happen if a user presses ^S or a TCP/modem
2486 connection gets cut but no hangup is received. If nonblock is
2487 \fBoff\fP (this is the default) screen waits until the display
2488 restarts to accept the output. If nonblock is \fBon\fP, screen
2489 waits until the timeout is reached (\fBon\fP is treated as 1s). If the
2490 display still doesn't receive characters, screen will consider
2491 it \*Qblocked\*U and stop sending characters to it. If at
2492 some time it restarts to accept characters, screen will unblock
2493 the display and redisplay the updated window contents.
2496 .BR "number " [[+|-] \fIn ]
2498 Change the current window's number. If the given number \fIn\fP is already
2499 used by another window, both windows exchange their numbers. If no argument is
2500 specified, the current window number (and title) is shown. Using `+' or `-'
2501 will change the window's number by the relative amount specified.
2504 .BR "obuflimit " [ \fIlimit ]
2506 If the output buffer contains more bytes than the specified limit, no
2508 read from the windows. The default value is 256. If you have a fast
2509 display (like xterm), you can set it to some higher value. If no
2510 argument is specified, the current setting is displayed.
2515 Kill all regions but the current one.
2520 Switch to the window displayed previously. If this window does no longer exist,
2521 \fIother\fP has the same effect as \fInext\fP.
2524 .BR "partial on" | off
2526 Defines whether the display should be refreshed (as with \fIredisplay\fP) after
2527 switching to the current window. This command only affects the current window.
2528 To immediately affect all windows use the \fIallpartial\fP command.
2529 Default is `off', of course. This default is fixed, as there is currently no
2530 \fIdefpartial\fP command.
2533 .BR "password " [ \fIcrypted_pw ]
2535 Present a crypted password in your \*Q.screenrc\*U file and
2538 for it, whenever someone attempts to resume a detached. This is useful
2539 if you have privileged programs running under
2541 and you want to protect your session from reattach attempts by another user
2542 masquerading as your uid (i.e. any superuser.)
2543 If no crypted password is specified,
2545 prompts twice for typing a
2546 password and places its encryption in the paste buffer.
2547 Default is `none', this disables password checking.
2551 .RI [ registers " [" dest_reg ]]
2553 Write the (concatenated) contents of the specified registers to the stdin queue
2554 of the current window. The register '.' is treated as the
2555 paste buffer. If no parameter is given the user is prompted for a single
2557 The paste buffer can be filled with the \fIcopy\fP, \fIhistory\fP and
2558 \fIreadbuf\fP commands.
2559 Other registers can be filled with the \fIregister\fP, \fIreadreg\fP and
2560 \fIpaste\fP commands.
2561 If \fIpaste\fP is called with a second argument, the contents of the specified
2562 registers is pasted into the named destination register rather than
2563 the window. If '.' is used as the second argument, the displays paste buffer is
2565 Note, that \*Qpaste\*U uses a wide variety of resources: Whenever a second
2566 argument is specified no current window is needed. When the source specification
2567 only contains registers (not the paste buffer) then there need not be a current
2568 display (terminal attached), as the registers are a global resource. The
2569 paste buffer exists once for every user.
2572 .BR "pastefont " [ on | off ]
2576 to include font information in the paste buffer. The
2577 default is not to do so. This command is especially useful for
2578 multi character fonts like kanji.
2583 Reopen the window's terminal line and send a break condition. See `break'.
2589 Mainly the same as \fIdetach\fP, but also sends a HANGUP signal to
2590 the parent process of
2592 CAUTION: This will result in a logout, when
2594 was started from your login shell.
2600 The \fImessage\fP specified here is output whenever a `Power detach' was
2601 performed. It may be used as a replacement for a logout message or to reset
2603 Without parameter, the current message is shown.
2608 Switch to the window with the next lower number.
2609 This command can be used repeatedly to cycle through the list of windows.
2617 is not an empty string,
2619 will not use the terminal capabilities
2620 \*Qpo/pf\*U if it detects an ansi print sequence
2622 but pipe the output into
2624 This should normally be a command like \*Qlpr\*U or
2625 \*Q'cat > /tmp/scrprint'\*U.
2627 without a command displays the current setting.
2630 ends printing and closes the pipe.
2632 Warning: Be careful with this command! If other user have write
2633 access to your terminal, they will be able to fire off print commands.
2636 .BR process " [" \fIkey ]
2638 Stuff the contents of the specified register into
2640 input queue. If no argument is given you are prompted for a
2641 register name. The text is parsed as if it had been typed in from the user's
2642 keyboard. This command can be used to bind multiple actions to a single key.
2647 Kill all windows and terminate
2649 Note that on VT100-style terminals the keys C-4 and C-\e are identical.
2650 This makes the default bindings dangerous:
2651 Be careful not to type C-a C-4 when selecting window no. 4.
2652 Use the empty bind command (as in \*Qbind '^\e'\*U) to remove a key binding.
2660 Reads the contents of the specified file into the paste buffer.
2661 You can tell screen the encoding of the file via the \fB-e\fP option.
2662 If no file is specified, the screen-exchange filename is used.
2663 See also \*Qbufferfile\*U command.
2669 .RI [ register " [" filename ]]
2671 Does one of two things, dependent on number of arguments: with zero or one
2672 arguments it it duplicates the paste buffer contents into the register specified
2673 or entered at the prompt. With two arguments it reads the contents of the named
2674 file into the register, just as \fIreadbuf\fP reads the screen-exchange file
2675 into the paste buffer.
2676 You can tell screen the encoding of the file via the \fB-e\fP option.
2677 The following example will paste the system's password file into
2680 window (using register p, where a copy remains):
2683 C-a : readreg p /etc/passwd
2690 Redisplay the current window. Needed to get a full redisplay when in
2691 partial redraw mode.
2699 Save the specified \fIstring\fP to the register \fIkey\fP.
2700 The encoding of the string can be specified via the \fB-e\fP option.
2701 See also the \*Qpaste\*U command.
2706 Kill the current region. This is a no-op if there is only one region.
2711 Unlinks the screen-exchange file used by the commands \*Qwritebuf\*U and
2715 .B "rendition bell" | monitor | so
2716 .RB "\fIattr\fR " [ \fIcolor ]
2720 renders the titles of windows that have monitor or bell flags set in caption or hardstatus or windowlist. See the \*QSTRING ESCAPES\*U chapter for the syntax of the modifiers.
2721 The default for monitor is currently \*Q=b \*U (bold, active colors) and for bell \*Q=ub \*U (underline, bold and active colors).
2726 Reset the virtual terminal to its \*Qpower-on\*U values. Useful when strange
2727 settings (like scroll regions or graphics character set) are left over from
2733 Resize the current region. The space will be removed from or added to
2734 the region below or if there's not enough space from the region above.
2736 resize +N increase current region height by N
2738 resize -N decrease current region height by N
2740 resize N set current region height to N
2742 resize = make all windows equally high
2744 resize max maximize current region height
2746 resize min minimize current region height
2750 .B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]|\fB//group\fP]"
2752 Establish a new window.
2753 The flow-control options (\fB\-f\fP, \fB\-fn\fP and \fB\-fa\fP),
2754 title (a.\|k.\|a.) option (\fB\-t\fP), login options (\fB-l\fP and \fB-ln\fP)
2755 , terminal type option (\fB-T\fP <term>), the all-capability-flag (\fB-a\fP)
2756 and scrollback option (\fB-h\fP <num>) may be specified with each command.
2757 The option (\fB-M\fP) turns monitoring on for this window.
2758 The option (\fB-L\fP) turns output logging on for this window.
2759 If an optional number \fIn\fP in the range 0..MAXWIN-1 is given,
2760 the window number \fIn\fP is assigned to the newly created window
2761 (or, if this number is already in-use, the next available number).
2762 If a command is specified after \*Qscreen\*U, this command (with the given
2763 arguments) is started in the window; otherwise, a shell is created.
2764 If \fB//group\fP is supplied, a container-type window is created in
2765 which other windows may be created inside it.
2767 Thus, if your \*Q.screenrc\*U contains the lines
2770 # example for .screenrc:
2772 screen -fn -t foobar -L 2 telnet foobar
2776 creates a shell window (in window #1) and a window with a TELNET connection
2777 to the machine foobar (with no flow-control using the title \*Qfoobar\*U
2778 in window #2) and will write a logfile (\*Qscreenlog.2\*U) of the telnet
2780 Note, that unlike previous versions of
2782 no additional default window is created when \*Qscreen\*U commands are
2783 included in your \*Q.screenrc\*U file. When the initialization is completed,
2785 switches to the last window specified in your .screenrc file or, if none,
2786 opens a default window #0.
2788 Screen has built in some functionality of \*Qcu\*U and \*Qtelnet\*U.
2789 See also chapter \*QWINDOW TYPES\*U.
2792 .B "scrollback \fP\fInum\fP"
2794 Set the size of the scrollback buffer for the current windows to \fInum\fP
2795 lines. The default scrollback is 100 lines.
2796 See also the \*Qdefscrollback\*U command and use \*QC-a i\*U to view the
2800 .BR "select " [ \fIWindowID ]
2802 Switch to the window identified by \fIWindowID\fP.
2803 This can be a prefix of a window title (alphanumeric window name) or a
2805 The parameter is optional and if omitted, you get prompted for an identifier.
2806 When a new window is established, the first available number
2807 is assigned to this window.
2808 Thus, the first window can be activated by \*Qselect 0\*U.
2809 The number of windows is limited at compile-time by the MAXWIN
2810 configuration parameter (which defaults to 40).
2811 There are two special WindowIDs, \*Q-\*U selects the
2812 internal blank window and \*Q.\*U selects the current window. The
2813 latter is useful if used with screen's \*Q-X\*U option.
2816 .BR "sessionname " [ \fIname ]
2818 Rename the current session. Note, that for \*Qscreen -list\*U the
2819 name shows up with the process-id prepended. If the argument \*Qname\*U
2820 is omitted, the name of this session is displayed. Caution: The $STY
2821 environment variables will still reflect the old name in pre-existing
2822 shells. This may result in confusion. Use of this command is generally
2823 discouraged. Use the \*Q-S\*U command-line option if you want to
2825 The default is constructed from the tty and host names.
2829 .RI [ var " [" string ]]
2831 Set the environment variable \fIvar\fP to value \fIstring\fP.
2832 If only \fIvar\fP is specified, the user will be prompted to enter a value.
2833 If no parameters are specified, the user will be prompted for both variable
2834 and value. The environment is inherited by all subsequently forked shells.
2837 .BR "setsid " [ on | off ]
2839 Normally screen uses different sessions and process groups for
2840 the windows. If setsid is turned \fIoff\fP, this is not done
2841 anymore and all windows will be in the same process group as the
2842 screen backend process. This also breaks job-control, so be careful.
2843 The default is \fIon\fP, of course. This command is probably useful
2844 only in rare circumstances.
2847 .B "shell \fIcommand\fP"
2849 Set the command to be used to create a new shell.
2850 This overrides the value of the environment variable $SHELL.
2851 This is useful if you'd like to run a tty-enhancer which is expecting to
2852 execute the program specified in $SHELL. If the command begins with
2853 a '-' character, the shell will be started as a login-shell.
2856 .B "shelltitle \fItitle\fP"
2858 Set the title for all shells created during startup or by
2859 the C-A C-c command.
2860 For details about what a title is, see the discussion
2861 entitled \*QTITLES (naming windows)\*U.
2864 .BR "silence " [ on | off "|\fIsec\fP]"
2866 Toggles silence monitoring of windows.
2867 When silence is turned on and an affected window is switched into the
2868 background, you will receive the silence notification message in the
2869 status line after a specified period of inactivity (silence). The default
2870 timeout can be changed with the `silencewait' command or by specifying a
2871 number of seconds instead of `on' or `off'.
2872 Silence is initially off for all windows.
2875 .BI "silencewait " sec
2877 Define the time that all windows monitored for silence should wait before
2878 displaying a message. Default 30 seconds.
2881 .B "sleep \fP\fInum\fP"
2883 This command will pause the execution of a .screenrc file for \fInum\fP seconds.
2884 Keyboard activity will end the sleep.
2885 It may be used to give users a chance to read the messages output by \*Qecho\*U.
2888 .B "slowpaste \fImsec\fP"
2890 Define the speed at which text is inserted into the current window by the
2891 paste ("C-a ]") command.
2892 If the slowpaste value is nonzero text is written character by character.
2894 will make a pause of \fImsec\fP milliseconds after each single character write
2895 to allow the application to process its input. Only use slowpaste if your
2896 underlying system exposes flow control problems while pasting large amounts of
2902 Read and execute commands from file \fIfile\fP. Source commands may
2903 be nested to a maximum recursion level of ten. If file is not an
2904 absolute path and screen is already processing a source command, the
2905 parent directory of the running source command file is used to search
2906 for the new command file before screen's current directory.
2908 Note that termcap/terminfo/termcapinfo commands only work at
2909 startup and reattach time, so they must be reached via the
2910 default screenrc files to have an effect.
2914 .RB [ "\fIattr\fR " [ \fIcolor ]]
2916 This command is deprecated. See "rendition so" instead.
2922 Split the current region into two new ones. All regions on the
2923 display are resized to make room for the new region. The blank
2924 window is displayed on the new region. Splits are made horizontally
2925 unless -v is used. Use the \*Qremove\*U or the \*Qonly\*U command
2926 to delete regions. Use \*Qfocus\*U to toggle between regions.
2929 .B "startup_message on\fP|\fBoff"
2931 Select whether you want to see the copyright notice during startup.
2932 Default is `on', as you probably noticed.
2940 in the input buffer of the current window.
2941 This is like the \*Qpaste\*U command but with much less overhead.
2943 large buffers with the \*Qstuff\*U command. It is most useful for key
2944 bindings. See also \*Qbindkey\*U.
2948 .RB [ username " [" password
2951 Substitute the user of a display. The command prompts for all parameters that
2952 are omitted. If passwords are specified as parameters, they have to be
2953 specified un-crypted. The first password is matched against the systems
2954 passwd database, the second password is matched against the
2956 password as set with the commands \*Qacladd\*U or \*Qpassword\*U.
2957 \*QSu\*U may be useful for the
2959 administrator to test multiuser setups.
2960 .\" XXX removed in 3.8.0 XXX
2961 .\" but it is mainly used implicitly
2962 .\" by the \*Qconnect\*U command to identify users that access a remote session.
2963 When the identification fails, the user has access to the commands available
2966 These are \*Qdetach\*U, \*Qlicense\*U, \*Qversion\*U, \*Qhelp\*U and
2974 The windows are in the `detached' state, while
2976 is suspended. This feature relies on the shell being able to do job control.
2979 .B "term \fIterm\fP"
2981 In each window's environment
2983 opens, the $TERM variable is set to \*Qscreen\*U by default.
2984 But when no description for \*Qscreen\*U is installed in the local termcap
2985 or terminfo data base, you set $TERM to \- say \-
2986 \*Qvt100\*U. This won't do much harm, as
2988 is VT100/ANSI compatible.
2989 The use of the \*Qterm\*U command is discouraged for non-default purpose.
2990 That is, one may want to specify special $TERM settings (e.g. vt100) for the
2991 next \*Qscreen rlogin othermachine\*U command. Use the command \*Qscreen -T vt100
2992 rlogin othermachine\*U rather than setting and resetting the default.
2995 .BI termcap " term terminal-tweaks"
2996 .RI [ window-tweaks ]
2998 .BI terminfo " term terminal-tweaks"
2999 .RI [ window-tweaks ]
3001 .BI termcapinfo " term terminal-tweaks"
3002 .RI [ window-tweaks ]
3004 Use this command to modify your terminal's termcap entry without going
3005 through all the hassles involved in creating a custom termcap entry.
3006 Plus, you can optionally customize the termcap generated for the windows.
3007 You have to place these commands in one of the screenrc startup files, as
3008 they are meaningless once the terminal emulator is booted.
3010 If your system works uses the terminfo database rather than termcap,
3012 will understand the `terminfo' command, which has the same effects as the
3013 `termcap' command. Two separate commands are provided, as there are subtle
3014 syntactic differences, e.g. when parameter interpolation (using `%') is
3015 required. Note that termcap names of the capabilities have to be used
3016 with the `terminfo' command.
3018 In many cases, where the arguments are valid in both terminfo and termcap
3019 syntax, you can use the command `termcapinfo', which is just a shorthand
3020 for a pair of `termcap' and `terminfo' commands with identical arguments.
3022 The first argument specifies which terminal(s) should be affected by this
3024 You can specify multiple terminal names by separating them with `|'s.
3025 Use `*' to match all terminals and `vt*' to match all terminals that begin
3028 Each \fItweak\fP argument contains one or more termcap defines (separated
3029 by `:'s) to be inserted at the start of the appropriate termcap entry,
3030 enhancing it or overriding existing values.
3031 The first tweak modifies your terminal's termcap, and contains definitions
3032 that your terminal uses to perform certain functions.
3033 Specify a null string to leave this unchanged (e.\|g. '').
3034 The second (optional) tweak modifies all the window termcaps, and should
3035 contain definitions that
3037 understands (see the \*QVIRTUAL TERMINAL\*U
3042 termcap xterm* LP:hs@
3046 that all terminals that begin with `xterm' have firm auto-margins that
3047 allow the last position on the screen to be updated (LP), but they don't
3048 really have a status line (no 'hs' \- append `@' to turn entries off).
3049 Note that we assume `LP' for all terminal names that start with \*Qvt\*U,
3050 but only if you don't specify a termcap command for that terminal.
3054 termcap vt102|vt220 Z0=\eE[?3h:Z1=\eE[?3l
3056 Specifies the firm-margined `LP' capability for all terminals that begin with
3057 `vt', and the second line will also add the escape-sequences to switch
3058 into (Z0) and back out of (Z1) 132-character-per-line mode if this is
3060 (You must specify Z0 and Z1 in your termcap to use the width-changing
3063 termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
3065 This leaves your vt100 termcap alone and adds the function key labels to
3066 each window's termcap entry.
3068 termcap h19|z19 am@:im=\eE@:ei=\eEO dc=\eE[P
3070 Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables the
3071 insert mode (im) and end-insert (ei) capabilities (the `@' in the `im'
3072 string is after the `=', so it is part of the string).
3073 Having the `im' and `ei' definitions put into your terminal's termcap will
3076 to automatically advertise the character-insert capability in
3077 each window's termcap.
3078 Each window will also get the delete-character capability (dc) added to its
3081 will translate into a line-update for the terminal
3082 (we're pretending it doesn't support character deletion).
3084 If you would like to fully specify each window's termcap entry, you should
3085 instead set the $SCREENCAP variable prior to running
3087 See the discussion on the \*QVIRTUAL TERMINAL\*U in this manual, and the termcap(5)
3088 man page for more information on termcap definitions.
3094 Uses the message line to display the time of day, the host name, and the load
3095 averages over 1, 5, and 15 minutes (if this is available on your system).
3096 For window specific information use \*Qinfo\*U.
3098 If a string is specified, it changes the format of the time report like it is
3099 described in the \*QSTRING ESCAPES\*U chapter. Screen uses a default of
3100 "%c:%s %M %d %H%? %l%?".
3103 .BR "title " [ \fIwindowtitle ]
3105 Set the name of the current window to \fIwindowtitle\fP. If no name is
3108 prompts for one. This command was known as `aka' in previous
3114 Unbind all the bindings. This can be useful when
3115 screen is used solely for its detaching abilities, such as when
3116 letting a console application run as a daemon. If, for some reason,
3117 it is necessary to bind commands after this, use 'screen -X'.
3122 Unset an environment variable.
3129 Change the encoding used in the current window. If utf8 is enabled, the
3130 strings sent to the window will be UTF-8 encoded and vice versa. Omitting the
3131 parameter toggles the setting. If a second parameter is given, the display's
3132 encoding is also changed (this should rather be done with screen's \*Q-U\*U
3134 See also \*Qdefutf8\*U, which changes the default setting of a new
3141 Sets the visual bell setting for this window. Omitting the parameter
3142 toggles the setting. If vbell is switched on, but your terminal does not
3143 support a visual bell, a `vbell-message' is displayed in the status line when
3144 the bell character (^G) is received.
3145 Visual bell support of a terminal is defined by the termcap variable `vb'
3146 (terminfo: 'flash').
3148 Per default, vbell is off, thus the audible bell is used.
3149 See also `bell_msg'.
3155 Sets the visual bell message. \fImessage\fP is printed to the status line if
3156 the window receives a bell character (^G), vbell is set to \*Qon\*U, but the
3157 terminal does not support a visual bell.
3158 The default message is \*QWuff, Wuff!!\*U.
3159 Without parameter, the current message is shown.
3162 .BI "vbellwait " sec
3164 Define a delay in seconds after each display of
3166 visual bell message. The default is 1 second.
3172 If verbose is switched on, the command name is echoed, whenever a window
3173 is created (or resurrected from zombie state). Default is off.
3174 Without parameter, the current setting is shown.
3179 Print the current version and the compile date in the status line.
3182 .BI "wall " "message"
3184 Write a message to all displays. The message will appear in the terminal's
3190 .RI [ cols " [" lines ]]
3192 Toggle the window width between 80 and 132 columns or set it to \fIcols\fP
3193 columns if an argument is specified.
3194 This requires a capable terminal and the termcap entries \*QZ0\*U and \*QZ1\*U.
3195 See the \*Qtermcap\*U command for more information. You can also specify
3196 a new height if you want to change both values.
3199 option tells screen to leave the display size unchanged and just set
3218 Display all windows in a table for visual window selection. The
3219 desired window can be selected via the standard movement keys (see
3220 the \*Qcopy\*U command) and activated via the return key.
3221 If screen was in a window group, screen will
3222 back out of the group and then display the windows in that group.
3225 option is given, screen will switch to the blank window before
3226 presenting the list, so that the current window is also selectable.
3229 option changes the order of the windows, instead of sorting by
3230 window numbers screen uses its internal most-recently-used list.
3233 option will show the windows inside any groups in that level
3236 The table format can be changed with the \fBstring\fP and
3237 \fBtitle\fP option, the title is displayed as table heading, while
3238 the lines are made by using the string setting. The default
3239 setting is \*QNum Name%=Flags\*U for the title and \*Q%3n %t%=%f\*U
3241 See the \*QSTRING ESCAPES\*U chapter for more codes (e.g. color
3247 Uses the message line to display a list of all the windows.
3248 Each window is listed by number with the name of process that has been
3249 started in the window (or its title);
3250 the current window is marked with a `*';
3251 the previous window is marked with a `-';
3252 all the windows that are \*Qlogged in\*U are marked with a `$';
3253 a background window that has received a bell is marked with a `!';
3254 a background window that is being monitored and has had activity occur
3255 is marked with an `@';
3256 a window which has output logging turned on is marked with `(L)';
3257 windows occupied by other users are marked with `&';
3258 windows in the zombie state are marked with `Z'.
3259 If this list is too long to fit on the terminal's status line only the
3260 portion around the current window is displayed.
3263 .BR "wrap " [ on | off ]
3265 Sets the line-wrap setting for the current window.
3266 When line-wrap is on, the second consecutive printable character output at
3267 the last column of a line will wrap to the start of the following line.
3268 As an added feature, backspace (^H) will also wrap through the left margin
3269 to the previous line.
3278 Writes the contents of the paste buffer to the specified file, or the public accessible screen-exchange
3279 file if no filename is given. This is thought of as a primitive means of communication between
3281 users on the same host. If an encoding is specified the paste buffer
3282 is recoded on the fly to match the encoding.
3283 The filename can be set with the \fIbufferfile\fP
3284 command and defaults to \*Q/tmp/screen-exchange\*U.
3287 .BR "writelock " [ on | "off\fR|\fBauto\fR]"
3289 In addition to access control lists, not all users may be able to write to
3290 the same window at once. Per default, writelock is in `auto' mode and
3291 grants exclusive input permission to the user who is the first to switch
3292 to the particular window. When he leaves the window, other users may obtain
3293 the writelock (automatically). The writelock of the current window is disabled
3294 by the command \*Qwritelock off\*U. If the user issues the command
3295 \*Qwritelock on\*U he keeps the exclusive write permission while switching
3303 Insert a CTRL-s / CTRL-q character to the stdin queue of the
3308 .RB [ off\fR|\fPauto\fR|\fPcatch\fR|\fPpass ]
3316 Define zmodem support for screen. Screen understands two different
3317 modes when it detects a zmodem request: \*Qpass\*U and \*Qcatch\*U.
3318 If the mode is set to \*Qpass\*U, screen will relay all data
3319 to the attacher until the end of the transmission is reached.
3320 In \*Qcatch\*U mode screen acts as a zmodem endpoint and starts
3321 the corresponding rz/sz commands. If the mode is set to \*Qauto\*U,
3322 screen will use \*Qcatch\*U if the window is a tty (e.g. a serial line),
3323 otherwise it will use \*Qpass\*U.
3325 You can define the templates screen uses in \*Qcatch\*U mode
3326 via the second and the third form.
3328 Note also that this is an experimental feature.
3331 .BR "zombie " [\fIkeys\fP [ onerror ] ]
3333 .BR "defzombie " [\fIkeys\fP]
3337 windows are removed from the window list as soon as
3338 the windows process (e.g. shell) exits. When a string of two keys is
3339 specified to the zombie command, `dead' windows will remain in the list.
3340 The \fBkill\fP command may be used to remove such a window. Pressing the
3341 first key in the dead window has the same effect. When pressing the second
3344 will attempt to resurrect the window. The process that was
3345 initially running in the window will be launched again. Calling \fBzombie\fP
3346 without parameters will clear the zombie setting, thus making windows disappear
3347 when their process exits.
3349 As the zombie-setting is manipulated globally for all windows, this command
3350 should only be called \fBdefzombie\fP. Until we need this as a per window
3351 setting, the commands \fBzombie\fP and \fBdefzombie\fP are synonymous.
3353 Optionally you can put the word \*Qonerror\*U after the keys. This will cause screen
3354 to monitor exit status of the process running in the window. If it exits normally ('0'),
3355 the window disappears. Any other exit value causes the window to become a zombie.
3357 .SH "THE MESSAGE LINE"
3359 displays informational messages and other diagnostics in a \fImessage line\fP.
3360 While this line is distributed to appear at the bottom of the screen,
3361 it can be defined to appear at the top of the screen during compilation.
3362 If your terminal has a status line defined in its termcap,
3364 will use this for displaying its messages, otherwise a line of the
3366 be temporarily overwritten and output will be momentarily interrupted. The
3367 message line is automatically removed after a few seconds delay, but it
3368 can also be removed early (on terminals without a status line) by beginning
3371 The message line facility can be used by an application running in
3372 the current window by means of the ANSI \fIPrivacy message\fP
3374 For instance, from within the shell, try something like:
3376 echo '<esc>^Hello world from window '$WINDOW'<esc>\e\e'
3378 where '<esc>' is an \fIescape\fP, '^' is a literal up-arrow,
3379 and '\e\e' turns into a single backslash.
3382 Screen provides three different window types. New windows are created with
3385 command (see also the entry in chapter \*QCUSTOMIZATION\*U). The first
3388 command defines which type of window is created. The different window types are
3389 all special cases of the normal type. They have been added in order
3392 to be used efficiently as a console multiplexer with 100 or more windows.
3395 The normal window contains a shell (default, if no parameter is given) or any
3396 other system command that could be executed from a shell (e.g.
3401 If a tty (character special device) name (e.g. \*Q/dev/ttya\*U)
3402 is specified as the first parameter, then the window is directly connected to
3404 This window type is similar to \*Qscreen cu -l /dev/ttya\*U.
3405 Read and write access is required on the device node, an exclusive open is
3406 attempted on the node to mark the connection line as busy.
3407 An optional parameter is allowed consisting of a comma separated list of flags
3408 in the notation used by stty(1):
3411 Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed.
3413 Specify the transmission of eight (or seven) bits per byte.
3415 Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data.
3416 .IP "ixoff or -ixon"
3417 Enables (or disables) software flow-control for receiving data.
3418 .IP "istrip or -istrip"
3419 Clear (or keep) the eight bit in each received byte.
3421 You may want to specify as many of these options as applicable. Unspecified
3422 options cause the terminal driver to make up the parameter values of the
3423 connection. These values are system dependent and may be in defaults or values
3424 saved from a previous connection.
3426 For tty windows, the
3428 command shows some of the modem control lines
3429 in the status line. These may include `RTS', `CTS', 'DTR', `DSR', `CD' and more.
3430 This depends on the available ioctl()'s and system header files as well as the
3431 on the physical capabilities of the serial board.
3432 Signals that are logical low (inactive) have their name preceded by
3433 an exclamation mark (!), otherwise the signal is logical high (active).
3434 Signals not supported by the hardware but available to the ioctl() interface
3435 are usually shown low.
3437 When the CLOCAL status bit is true, the whole set of modem signals is placed
3438 inside curly braces ({ and }).
3439 When the CRTSCTS or TIOCSOFTCAR bit is set, the signals `CTS' or `CD'
3440 are shown in parenthesis, respectively.
3443 For tty windows, the command
3445 causes the Data transmission line (TxD) to go low for a specified period of
3446 time. This is expected to be interpreted as break signal on the other side.
3447 No data is sent and no modem control line is changed when a
3452 If the first parameter is \*Q//telnet\*U, the second parameter is expected to
3453 be a host name, and an optional third parameter may specify a TCP port number
3454 (default decimal 23). Screen will connect to a server listening on the remote
3455 host and use the telnet protocol to communicate with that server.
3458 For telnet windows, the command
3460 shows details about the connection in square brackets ([ and ]) at the end of
3464 BINARY. The connection is in binary mode.
3466 ECHO. Local echo is disabled.
3468 SGA. The connection is in `character mode' (default: `line mode').
3470 TTYPE. The terminal type has been requested by the remote host.
3471 Screen sends the name \*Qscreen\*U unless instructed otherwise (see also
3472 the command `term').
3474 NAWS. The remote site is notified about window size changes.
3476 LFLOW. The remote host will send flow control information.
3477 (Ignored at the moment.)
3479 Additional flags for debugging are x, t and n (XDISPLOC, TSPEED and
3482 For telnet windows, the command
3484 sends the telnet code IAC BREAK (decimal 243) to the remote host.
3487 This window type is only available if
3489 was compiled with the BUILTIN_TELNET option defined.
3493 .SH "STRING ESCAPES"
3494 Screen provides an escape mechanism to insert information like the
3495 current time into messages or file names. The escape character
3496 is '%' with one exception: inside of a window's hardstatus '^%' ('^E')
3499 Here is the full list of supported escapes:
3501 the escape character itself
3507 current time HH:MM in 24h format
3509 current time HH:MM in 12h format
3517 sets %? to true if the window has the focus
3519 hardstatus of the window
3521 hostname of the system
3523 current load of the system
3531 sets %? to true if the current region is in copy/paste mode
3539 all other users on this window
3541 all window numbers and names. With '-' qualifier: up to the current
3542 window; with '+' qualifier: starting with the window after the current
3545 all window numbers and names except the current one
3547 last two digits of the year number
3551 the part to the next '%?' is displayed only if a '%' escape
3552 inside the part expands to a non-empty string
3556 pad the string to the display's width (like TeX's hfill). If a
3557 number is specified, pad to the percentage of the window's width.
3558 A '0' qualifier tells screen to treat the number as absolute position.
3559 You can specify to pad relative to the last absolute pad position
3560 by adding a '+' qualifier or to pad relative to the right margin
3561 by using '-'. The padding truncates the string if the specified
3562 position lies before the current position. Add the 'L' qualifier
3565 same as '%=' but just do truncation, do not fill with spaces
3567 mark the current text position for the next truncation. When
3568 screen needs to do truncation, it tries to do it in a way that
3569 the marked position gets moved to the specified percentage of
3570 the output area. (The area starts from the last absolute pad
3571 position and ends with the position specified by the truncation
3572 operator.) The 'L' qualifier tells screen to mark the truncated
3575 attribute/color modifier string terminated by the next \*Q}\*U
3577 Substitute with the output of a 'backtick' command. The length
3578 qualifier is misused to identify one of the commands.
3580 The 'c' and 'C' escape may be qualified with a '0' to make
3582 use zero instead of space as fill character. The '0' qualifier
3583 also makes the '=' escape use absolute positions. The 'n' and '='
3585 a length qualifier (e.g. '%3n'), 'D' and 'M' can be prefixed with 'L'
3586 to generate long names, 'w' and 'W' also show the window flags
3589 An attribute/color modifier is is used to change the attributes or the
3590 color settings. Its format
3591 is \*Q[attribute modifier] [color description]\*U. The attribute modifier
3592 must be prefixed by a change type indicator if it can be confused with
3593 a color description. The following change types are known:
3595 add the specified set to the current attributes
3597 remove the set from the current attributes
3599 invert the set in the current attributes
3601 change the current attributes to the specified set
3603 The attribute set can either be specified as a hexadecimal number or
3604 a combination of the following letters:
3620 Colors are coded either as a hexadecimal number or two letters specifying
3621 the desired background and foreground color (in that order). The following
3643 leave color unchanged
3646 The capitalized versions of the letter specify bright colors. You can also
3647 use the pseudo-color 'i' to set just the brightness and leave the color
3650 A one digit/letter color description is treated as foreground or
3651 background color dependent on the current attributes: if reverse mode is
3652 set, the background color is changed instead of the foreground color.
3653 If you don't like this, prefix the color with a \*Q.\*U. If you want
3654 the same behavior for two-letter color descriptions, also prefix them
3657 As a special case, \*Q%{-}\*U restores the attributes and colors that
3658 were set before the last change was made (i.e., pops one level of the
3659 color-change stack).
3663 set color to bright green
3667 clear all attributes, write in default color on yellow background.
3668 .IP "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
3669 The available windows centered at the current window and truncated to
3670 the available width. The current window is displayed white on blue.
3671 This can be used with \*Qhardstatus alwayslastline\*U.
3672 .IP "%?%F%{.R.}%?%3n %t%? [%h]%?"
3673 The window number and title and the window's hardstatus, if one is set.
3674 Also use a red background if this is the active focus. Useful for
3675 \*Qcaption string\*U.
3677 Each window has a flow-control setting that determines how
3680 the XON and XOFF characters (and perhaps the interrupt character).
3681 When flow-control is turned off,
3683 ignores the XON and XOFF characters,
3684 which allows the user to send them to the current program by simply typing
3685 them (useful for the \fIemacs\fP editor, for instance).
3686 The trade-off is that it will take longer for output from a \*Qnormal\*U
3687 program to pause in response to an XOFF.
3688 With flow-control turned on, XON and XOFF characters are used to immediately
3689 pause the output of the current window.
3690 You can still send these characters to the current program, but you must use
3691 the appropriate two-character
3693 commands (typically \*QC-a q\*U (xon)
3694 and \*QC-a s\*U (xoff)).
3695 The xon/xoff commands are also useful for typing C-s and C-q past a terminal
3696 that intercepts these characters.
3698 Each window has an initial flow-control value set with either the
3700 option or the \*Qdefflow\*U .screenrc command. Per default the windows
3701 are set to automatic flow-switching.
3702 It can then be toggled between the three states 'fixed on', 'fixed off'
3703 and 'automatic' interactively with the \*Qflow\*U command bound to "C-a f".
3705 The automatic flow-switching mode deals with
3706 flow control using the TIOCPKT mode (like \*Qrlogin\*U does). If
3707 the tty driver does not support TIOCPKT,
3710 the right mode based on the current setting of the application
3711 keypad \- when it is enabled, flow-control is turned off and visa versa.
3712 Of course, you can still manipulate flow-control manually when needed.
3714 If you're running with flow-control enabled and find that pressing the
3715 interrupt key (usually C-c) does not interrupt the display until another
3716 6-8 lines have scrolled by, try running
3718 with the \*Qinterrupt\*U
3719 option (add the \*Qinterrupt\*U flag to the \*Qflow\*U command in
3720 your .screenrc, or use the
3722 command-line option).
3723 This causes the output that
3725 has accumulated from the interrupted program to be flushed.
3726 One disadvantage is that the virtual terminal's memory contains the
3727 non-flushed version of the output, which in rare cases can cause
3728 minor inaccuracies in the output.
3729 For example, if you switch screens and return, or update the screen
3730 with \*QC-a l\*U you would see the version of the output you would
3731 have gotten without \*Qinterrupt\*U being on.
3732 Also, you might need to turn off flow-control (or use auto-flow mode to turn
3733 it off automatically) when running a program that expects you to type the
3734 interrupt character as input, as it is possible to interrupt
3735 the output of the virtual terminal to your physical terminal when flow-control
3737 If this happens, a simple refresh of the screen with \*QC-a l\*U will
3739 Give each mode a try, and use whichever mode you find more comfortable.
3742 .SH "TITLES (naming windows)"
3743 You can customize each window's name in the window display (viewed with the
3744 \*Qwindows\*U command (C-a w)) by setting it with one of
3746 Normally the name displayed is the actual command name of the program
3747 created in the window.
3748 However, it is sometimes useful to distinguish various programs of the same
3749 name or to change the name on-the-fly to reflect the current state of
3752 The default name for all shell windows can be set with the \*Qshelltitle\*U
3753 command in the .screenrc file, while all other windows are created with
3754 a \*Qscreen\*U command and thus can have their name set with the
3757 Interactively, there is the title-string escape-sequence
3758 (<esc>k\fIname\fP<esc>\e) and the \*Qtitle\*U command (C-a A).
3759 The former can be output from an application to control the window's name
3760 under software control, and the latter will prompt for a name when typed.
3761 You can also bind pre-defined names to keys with the \*Qtitle\*U command
3762 to set things quickly without prompting.
3766 has a shell-specific heuristic that is enabled by setting the window's name
3767 to \*Q\fIsearch|name\fP\*U and arranging to have a null title escape-sequence
3768 output as a part of your prompt.
3769 The \fIsearch\fP portion specifies an end-of-prompt search string, while
3770 the \fIname\fP portion specifies the default shell name for the window.
3771 If the \fIname\fP ends in a `:'
3773 will add what it believes to be the current command running in the window
3774 to the end of the window's shell name (e.\|g. \*Q\fIname:cmd\fP\*U).
3775 Otherwise the current command name supersedes the shell name while it is
3778 Here's how it works: you must modify your shell prompt to output a null
3779 title-escape-sequence (<esc>k<esc>\e) as a part of your prompt.
3780 The last part of your prompt must be the same as the string you specified
3781 for the \fIsearch\fP portion of the title.
3782 Once this is set up,
3784 will use the title-escape-sequence to clear the previous command name and
3785 get ready for the next command.
3786 Then, when a newline is received from the shell, a search is made for the
3788 If found, it will grab the first word after the matched string and use it
3789 as the command name.
3790 If the command name begins with either '!', '%', or '^'
3792 will use the first word on the following line (if found) in preference to
3793 the just-found name.
3794 This helps csh users get better command names when using job control or
3795 history recall commands.
3797 Here's some .screenrc examples:
3799 screen -t top 2 nice top
3801 Adding this line to your .screenrc would start a nice-d version of the
3802 \*Qtop\*U command in window 2 named \*Qtop\*U rather than \*Qnice\*U.
3809 These commands would start a shell with the given shelltitle.
3810 The title specified is an auto-title that would expect the prompt and
3811 the typed command to look something like the following:
3813 /usr/joe/src/dir> trn
3815 (it looks after the '> ' for the command name).
3816 The window status would show the name \*Qtrn\*U while the command was
3817 running, and revert to \*Qcsh\*U upon completion.
3819 bind R screen -t '% |root:' su
3821 Having this command in your .screenrc would bind the key
3822 sequence \*QC-a R\*U to the \*Qsu\*U command and give it an
3823 auto-title name of \*Qroot:\*U.
3824 For this auto-title to work, the screen could look something
3832 Here the user typed the csh history command \*Q!em\*U which ran the
3833 previously entered \*Qemacs\*U command.
3834 The window status would show \*Qroot:emacs\*U during the execution
3835 of the command, and revert to simply \*Qroot:\*U at its completion.
3840 bind u title (unknown)
3843 The first binding doesn't have any arguments, so it would prompt you
3844 for a title. when you type \*QC-a o\*U.
3845 The second binding would clear an auto-title's current setting (C-a E).
3846 The third binding would set the current window's title to \*Q(unknown)\*U
3849 One thing to keep in mind when adding a null title-escape-sequence to
3850 your prompt is that some shells (like the csh) count all the non-control
3851 characters as part of the prompt's length.
3852 If these invisible characters aren't a multiple of 8 then backspacing over
3853 a tab will result in an incorrect display.
3854 One way to get around this is to use a prompt like this:
3856 set prompt='^[[0000m^[k^[\e% '
3858 The escape-sequence \*Q<esc>[0000m\*U not only normalizes the character
3859 attributes, but all the zeros round the length of the invisible characters
3861 Bash users will probably want to echo the escape sequence in the
3864 PROMPT_COMMAND='printf "\e033k\e033\e134"'
3866 (I used \*Q\134\*U to output a `\e' because of a bug in bash v1.04).
3869 .SH "THE VIRTUAL TERMINAL"
3872 session emulates a VT100 terminal, with some extra functions added. The
3873 VT100 emulator is hard-coded, no other terminal types can be emulated.
3877 tries to emulate as much of the VT100/ANSI standard
3878 as possible. But if your terminal lacks certain capabilities,
3879 the emulation may not be complete. In these cases
3881 has to tell the applications that some of the features
3882 are missing. This is no problem on machines using termcap,
3885 can use the $TERMCAP variable to
3886 customize the standard
3891 rlogin on another machine or your machine supports only
3892 terminfo this method fails. Because of this,
3894 offers a way to deal with these cases.
3895 Here is how it works:
3899 tries to figure out a terminal name for itself,
3901 for an entry named \*Qscreen.<term>\*U, where <term> is
3902 the contents of your $TERM variable.
3903 If no such entry exists,
3905 tries \*Qscreen\*U (or \*Qscreen-w\*U if the terminal is wide
3906 (132 cols or more)).
3907 If even this entry cannot be found, \*Qvt100\*U is used as a
3910 The idea is that if you have a terminal which doesn't
3911 support an important feature (e.g. delete char or clear to EOS)
3912 you can build a new termcap/terminfo entry for
3914 (named \*Qscreen.<dumbterm>\*U) in which this capability
3915 has been disabled. If this entry is installed on your
3916 machines you are able to do
3917 a rlogin and still keep the correct termcap/terminfo entry.
3918 The terminal name is put in the $TERM variable
3921 also sets the $TERMCAP variable reflecting the capabilities
3922 of the virtual terminal emulated. Notice that, however, on machines
3923 using the terminfo database this variable has no effect.
3924 Furthermore, the variable $WINDOW is set to the window number
3927 The actual set of capabilities supported by the virtual terminal
3928 depends on the capabilities supported by the physical terminal.
3929 If, for instance, the physical terminal does not support underscore mode,
3931 does not put the `us' and `ue' capabilities into the window's $TERMCAP
3932 variable, accordingly.
3933 However, a minimum number of capabilities must be supported by a
3934 terminal in order to run
3936 namely scrolling, clear screen, and direct cursor addressing
3939 does not run on hardcopy terminals or on terminals that over-strike).
3941 Also, you can customize the $TERMCAP value used by
3943 by using the \*Qtermcap\*U .screenrc command, or
3944 by defining the variable $SCREENCAP prior to startup.
3945 When the is latter defined, its value will be copied verbatim into each
3946 window's $TERMCAP variable.
3947 This can either be the full terminal definition, or a filename where the
3948 terminal \*Qscreen\*U (and/or \*Qscreen-w\*U) is defined.
3952 honors the \*Qterminfo\*U .screenrc command if the system uses the
3953 terminfo database rather than termcap.
3955 When the boolean `G0' capability is present in the termcap entry
3956 for the terminal on which
3958 has been called, the terminal emulation of
3960 supports multiple character sets.
3961 This allows an application to make use of, for instance,
3962 the VT100 graphics character set or national character sets.
3963 The following control functions from ISO 2022 are supported:
3964 \fIlock shift G0\fP (\fISI\fP), \fIlock shift G1\fP (\fISO\fP),
3965 \fIlock shift G2\fP, \fIlock shift G3\fP, \fIsingle shift G2\fP,
3966 and \fIsingle shift G3\fP.
3967 When a virtual terminal is created or reset, the ASCII character
3968 set is designated as \fIG0\fP through \fIG3\fP.
3969 When the `G0' capability is present,
3971 evaluates the capabilities
3972 `S0', `E0', and `C0' if present. `S0' is the sequence the terminal uses
3973 to enable and start the graphics character set rather than \fISI\fP.
3974 `E0' is the corresponding replacement for \fISO\fP. `C0' gives a character
3975 by character translation string that is used during semi-graphics mode. This
3976 string is built like the `acsc' terminfo capability.
3978 When the `po' and `pf' capabilities are present in the terminal's
3979 termcap entry, applications running in a
3981 window can send output to the printer port of the terminal.
3982 This allows a user to have an application in one window
3983 sending output to a printer connected to the terminal, while all
3984 other windows are still active (the printer port is enabled
3985 and disabled again for each chunk of output).
3986 As a side-effect, programs running in different windows can
3987 send output to the printer simultaneously.
3988 Data sent to the printer is not displayed in the window. The
3990 command displays a line starting `PRIN' while the printer is active.
3993 maintains a hardstatus line for every window. If a window
3994 gets selected, the display's hardstatus will be updated to match
3995 the window's hardstatus line. If the display has no hardstatus
3996 the line will be displayed as a standard
3999 The hardstatus line can be changed with the ANSI Application
4000 Program Command (APC): \*QESC_<string>ESC\e\*U. As a convenience
4001 for xterm users the sequence \*QESC]0..2;<string>^G\*U is
4004 Some capabilities are only put into the $TERMCAP
4005 variable of the virtual terminal if they can be efficiently
4006 implemented by the physical terminal.
4007 For instance, `dl' (delete line) is only put into the $TERMCAP
4008 variable if the terminal supports either delete line itself or
4009 scrolling regions. Note that this may provoke confusion, when
4010 the session is reattached on a different terminal, as the value
4011 of $TERMCAP cannot be modified by parent processes.
4013 The "alternate screen" capability is not enabled by default.
4014 Set the \fBaltscreen\fP .screenrc command to enable it.
4016 The following is a list of control sequences recognized by
4018 \*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI- or
4019 ISO-specific functions, respectively.
4036 Send VT100 Identification String
4039 Save Cursor and Attributes
4042 Restore Cursor and Attributes
4045 Save Cursor and Attributes
4048 Restore Cursor and Attributes
4051 Reset to Initial State
4057 Cursor Visibility (97801)
4059 \h'\w'ESC 'u'Pn = \fB6\fP
4062 \h'\w'ESC Pn = 'u'\fB7\fP
4066 Application Keypad Mode
4071 .BR "ESC # 8" " (V)"
4072 Fill Screen with E's
4078 Privacy Message String (Message Line)
4081 Global Message String (Message Line)
4084 A.\|k.\|a. Definition String
4087 Device Control String.
4088 Outputs a string directly to the host
4089 terminal without interpretation.
4092 Application Program Command (Hardstatus)
4094 .BR "ESC ] 0 ; string ^G" " (A)"
4095 Operating System Command (Hardstatus, xterm title hack)
4097 .BR "ESC ] 83 ; cmd ^G" " (A)"
4098 Execute screen command. This only works if multi-user support is
4099 compiled into screen. The pseudo-user \*Q:window:\*U is used to
4100 check the access control list. Use \*Qaddacl :window: -rwx #?\*U to
4101 create a user with no rights and allow only the needed commands.
4103 .BR "Control-N" " (A)"
4106 .BR "Control-O" " (A)"
4121 .BR "ESC ( \fPPcs" " (A)"
4122 Designate character set as G0
4124 .BR "ESC ) \fPPcs" " (A)"
4125 Designate character set as G1
4127 .BR "ESC * \fPPcs" " (A)"
4128 Designate character set as G2
4130 .BR "ESC + \fPPcs" " (A)"
4131 Designate character set as G3
4133 .B "ESC [ \fPPn\fB ; \fPPn\fB H"
4134 Direct Cursor Addressing
4136 .B "ESC [ \fPPn\fB ; \fPPn\fB f"
4139 .B "ESC [ \fPPn\fB J"
4142 \h'\w'ESC [ 'u'Pn = None or \fB0\fP
4143 From Cursor to End of Screen
4145 \h'\w'ESC [ Pn = 'u'\fB1\fP
4146 From Beginning of Screen to Cursor
4148 \h'\w'ESC [ Pn = 'u'\fB2\fP
4151 .B "ESC [ \fPPn\fB K"
4154 \h'\w'ESC [ 'u'Pn = None or \fB0\fP
4155 From Cursor to End of Line
4157 \h'\w'ESC [ Pn = 'u'\fB1\fP
4158 From Beginning of Line to Cursor
4160 \h'\w'ESC [ Pn = 'u'\fB2\fP
4163 .B "ESC [ \fPPn\fB X"
4166 .B "ESC [ \fPPn\fB A"
4169 .B "ESC [ \fPPn\fB B"
4172 .B "ESC [ \fPPn\fB C"
4175 .B "ESC [ \fPPn\fB D"
4178 .B "ESC [ \fPPn\fB E"
4181 .B "ESC [ \fPPn\fB F"
4182 Cursor previous line
4184 .B "ESC [ \fPPn\fB G"
4185 Cursor horizontal position
4187 .B "ESC [ \fPPn\fB `"
4190 .B "ESC [ \fPPn\fB d"
4191 Cursor vertical position
4193 .B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB m"
4194 Select Graphic Rendition
4196 \h'\w'ESC [ 'u'Ps = None or \fB0\fP
4199 \h'\w'ESC [ Ps = 'u'\fB1\fP
4202 \h'\w'ESC [ Ps = 'u'\fB2\fP (A)
4205 \h'\w'ESC [ Ps = 'u'\fB3\fP (A)
4206 \fIStandout\fP Mode (ANSI: Italicized)
4208 \h'\w'ESC [ Ps = 'u'\fB4\fP
4211 \h'\w'ESC [ Ps = 'u'\fB5\fP
4214 \h'\w'ESC [ Ps = 'u'\fB7\fP
4217 \h'\w'ESC [ Ps = 'u'\fB22\fP (A)
4220 \h'\w'ESC [ Ps = 'u'\fB23\fP (A)
4221 \fIStandout\fP Mode off (ANSI: Italicized off)
4223 \h'\w'ESC [ Ps = 'u'\fB24\fP (A)
4226 \h'\w'ESC [ Ps = 'u'\fB25\fP (A)
4229 \h'\w'ESC [ Ps = 'u'\fB27\fP (A)
4232 \h'\w'ESC [ Ps = 'u'\fB30\fP (A)
4235 \h'\w'ESC [ Ps = 'u'\fB31\fP (A)
4238 \h'\w'ESC [ Ps = 'u'\fB32\fP (A)
4241 \h'\w'ESC [ Ps = 'u'\fB33\fP (A)
4244 \h'\w'ESC [ Ps = 'u'\fB34\fP (A)
4247 \h'\w'ESC [ Ps = 'u'\fB35\fP (A)
4250 \h'\w'ESC [ Ps = 'u'\fB36\fP (A)
4253 \h'\w'ESC [ Ps = 'u'\fB37\fP (A)
4256 \h'\w'ESC [ Ps = 'u'\fB39\fP (A)
4259 \h'\w'ESC [ Ps = 'u'\fB40\fP (A)
4262 \h'\w'ESC [ Ps = 'u'\fB...\fP
4265 \h'\w'ESC [ Ps = 'u'\fB49\fP (A)
4268 .B "ESC [ \fPPn\fB g"
4271 \h'\w'ESC [ 'u'Pn = None or \fB0\fP
4272 Clear Tab at Current Position
4274 \h'\w'ESC [ Ps = 'u'\fB3\fP
4277 .BR "ESC [ \fPPn\fB ; \fPPn\fB r" " (V)"
4278 Set Scrolling Region
4280 .BR "ESC [ \fPPn\fB I" " (A)"
4283 .BR "ESC [ \fPPn\fB Z" " (A)"
4286 .BR "ESC [ \fPPn\fB L" " (A)"
4289 .BR "ESC [ \fPPn\fB M" " (A)"
4292 .BR "ESC [ \fPPn\fB @" " (A)"
4295 .BR "ESC [ \fPPn\fB P" " (A)"
4298 .B "ESC [ \fPPn\fB S"
4299 Scroll Scrolling Region Up
4301 .B "ESC [ \fPPn\fB T"
4302 Scroll Scrolling Region Down
4304 .B "ESC [ \fPPn\fB ^"
4307 .B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB h"
4310 .B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB l"
4313 \h'\w'ESC [ 'u'Ps = \fB4\fP (A)
4316 \h'\w'ESC [ Ps = 'u'\fB20\fP (A)
4317 \fIAutomatic Linefeed\fP Mode
4319 \h'\w'ESC [ Ps = 'u'\fB34\fP
4320 Normal Cursor Visibility
4322 \h'\w'ESC [ Ps = 'u'\fB?1\fP (V)
4323 Application Cursor Keys
4325 \h'\w'ESC [ Ps = 'u'\fB?3\fP (V)
4326 Change Terminal Width to 132 columns
4328 \h'\w'ESC [ Ps = 'u'\fB?5\fP (V)
4331 \h'\w'ESC [ Ps = 'u'\fB?6\fP (V)
4334 \h'\w'ESC [ Ps = 'u'\fB?7\fP (V)
4337 \h'\w'ESC [ Ps = 'u'\fB?9\fP
4340 \h'\w'ESC [ Ps = 'u'\fB?25\fP (V)
4343 \h'\w'ESC [ Ps = 'u'\fB?47\fP
4344 Alternate Screen (old xterm code)
4346 \h'\w'ESC [ Ps = 'u'\fB?1000\fP (V)
4347 VT200 mouse tracking
4349 \h'\w'ESC [ Ps = 'u'\fB?1047\fP
4350 Alternate Screen (new xterm code)
4352 \h'\w'ESC [ Ps = 'u'\fB?1049\fP
4353 Alternate Screen (new xterm code)
4355 .BR "ESC [ 5 i" " (A)"
4356 Start relay to printer (ANSI Media Copy)
4358 .BR "ESC [ 4 i" " (A)"
4359 Stop relay to printer (ANSI Media Copy)
4361 .B "ESC [ 8 ; \fPPh\fB ; \fPPw\fB t"
4362 Resize the window to `Ph' lines and `Pw' columns (SunView special)
4365 Send VT100 Identification String
4368 Send Terminal Parameter Report
4371 Send VT220 Secondary Device Attributes String
4374 Send Cursor Position Report
4377 .SH "INPUT TRANSLATION"
4378 In order to do a full VT100 emulation
4381 that a sequence of characters in the input stream was generated
4382 by a keypress on the user's keyboard and insert the VT100
4383 style escape sequence. \fIScreen\fP has a very flexible way of doing
4384 this by making it possible to map arbitrary commands on arbitrary
4385 sequences of characters. For standard VT100 emulation the command
4386 will always insert a string in the input buffer of the window
4387 (see also command \fBstuff\fP in the command table).
4388 Because the sequences generated by a keypress can
4389 change after a reattach from a different terminal type, it is
4390 possible to bind commands to the termcap name of the keys.
4391 \fIScreen\fP will insert the correct binding after each
4392 reattach. See the \fBbindkey\fP command for further details on the
4393 syntax and examples.
4395 Here is the table of the default key bindings. (A) means that the
4396 command is executed if the keyboard is switched into application
4401 Key name Termcap name Command
4404 Cursor up ku stuff \e033[A
4406 Cursor down kd stuff \e033[B
4408 Cursor right kr stuff \e033[C
4410 Cursor left kl stuff \e033[D
4412 Function key 0 k0 stuff \e033[10~
4413 Function key 1 k1 stuff \e033OP
4414 Function key 2 k2 stuff \e033OQ
4415 Function key 3 k3 stuff \e033OR
4416 Function key 4 k4 stuff \e033OS
4417 Function key 5 k5 stuff \e033[15~
4418 Function key 6 k6 stuff \e033[17~
4419 Function key 7 k7 stuff \e033[18~
4420 Function key 8 k8 stuff \e033[19~
4421 Function key 9 k9 stuff \e033[20~
4422 Function key 10 k; stuff \e033[21~
4423 Function key 11 F1 stuff \e033[23~
4424 Function key 12 F2 stuff \e033[24~
4425 Home kh stuff \e033[1~
4426 End kH stuff \e033[4~
4427 Insert kI stuff \e033[2~
4428 Delete kD stuff \e033[3~
4429 Page up kP stuff \e033[5~
4430 Page down kN stuff \e033[6~
4465 Keypad enter fe stuff \e015
4470 .SH SPECIAL TERMINAL CAPABILITIES
4471 The following table describes all terminal capabilities
4472 that are recognized by
4474 and are not in the termcap(5) manual.
4475 You can place these capabilities in your termcap entries (in
4476 `/etc/termcap') or use them with the commands `termcap', `terminfo' and
4477 `termcapinfo' in your screenrc files. It is often not possible to place
4478 these capabilities in the terminfo database.
4483 Terminal has VT100 style margins (`magic margins'). Note that
4484 this capability is obsolete because
4486 uses the standard 'xn' instead.
4489 Change width to 132 columns.
4492 Change width to 80 columns.
4495 Resize display. This capability has the desired width and height as
4496 arguments. \fISunView(tm)\fP example: '\eE[8;%d;%dt'.
4499 Terminal doesn't need flow control. Send ^S and ^Q direct to
4500 the application. Same as 'flow off'. The opposite of this
4504 Terminal can deal with ISO 2022 font selection sequences.
4507 Switch charset 'G0' to the specified charset. Default
4511 Switch charset 'G0' back to standard charset. Default
4515 Use the string as a conversion table for font '0'. See
4516 the 'ac' capability for more details.
4519 Switch cursor-keys to application mode.
4522 Switch cursor-keys back to normal mode.
4525 Turn on autonuke. See the 'autonuke' command for more details.
4528 Set the output buffer limit. See the 'obuflimit' command for more details.
4531 Set the encoding of the terminal. See the 'encoding' command for
4535 Change character foreground color in an ANSI conform way. This
4536 capability will almost always be set to '\eE[3%dm' ('\eE[3%p1%dm'
4537 on terminfo machines).
4540 Same as 'AF', but change background color.
4543 Does understand ANSI set default fg/bg color (\eE[39m / \eE[49m).
4546 Describe a translation of characters to strings depending on the
4547 current font. More details follow in the next section.
4550 Terminal understands special xterm sequences (OSC, mouse tracking).
4553 Terminal needs bold to display high-intensity colors (e.g. Eterm).
4556 Add missing capabilities to the termcap/info entry. (Set by default).
4558 .SH CHARACTER TRANSLATION
4559 \fIScreen\fP has a powerful mechanism to translate characters to arbitrary
4560 strings depending on the current font and terminal type.
4561 Use this feature if you want to work with a common standard character
4562 set (say ISO8851-latin1) even on terminals that scatter the more
4563 unusual characters over several national language font pages.
4567 \fBXC=\fP\fI<charset-mapping>\fP{\fB,,\fP\fI<charset-mapping>\fP}
4568 \fI<charset-mapping>\fP := \fI<designator><template>\fP{\fB,\fP\fI<mapping>\fP}
4569 \fI<mapping>\fP := \fI<char-to-be-mapped><template-arg>\fP
4572 The things in braces may be repeated any number of times.
4574 A \fI<charset-mapping>\fP tells
4576 how to map characters
4577 in font \fI<designator>\fP ('B': Ascii, 'A': UK, 'K': German, etc.)
4578 to strings. Every \fI<mapping>\fP describes to what string a single
4579 character will be translated. A template mechanism is used, as
4580 most of the time the codes have a lot in common (for example
4581 strings to switch to and from another charset). Each occurrence
4582 of '%' in \fI<template>\fP gets substituted with the \fI<template-arg>\fP
4583 specified together with the character. If your strings are not
4584 similar at all, then use '%' as a template and place the full
4585 string in \fI<template-arg>\fP. A quoting mechanism was added to make
4586 it possible to use a real '%'. The '\e' character quotes the
4587 special characters '\e', '%', and ','.
4591 termcap hp700 'XC=B\eE(K%\eE(B,\e304[,\e326\e\e\e\e,\e334]'
4595 how to translate ISOlatin1 (charset 'B')
4596 upper case umlaut characters on a hp700 terminal that has a
4597 German charset. '\e304' gets translated to '\eE(K[\eE(B' and so on.
4598 Note that this line gets parsed *three* times before the internal
4599 lookup table is built, therefore a lot of quoting is needed to
4600 create a single '\e'.
4602 Another extension was added to allow more emulation: If a mapping
4603 translates the unquoted '%' char, it will be sent to the terminal
4606 switches to the corresponding \fI<designator>\fP. In this
4607 special case the template is assumed to be just '%' because
4608 the charset switch sequence and the character mappings normally
4609 haven't much in common.
4611 This example shows one use of the extension:
4613 termcap xterm 'XC=K%,%\eE(B,[\e304,\e\e\e\e\e326,]\e334'
4615 Here, a part of the German ('K') charset is emulated on an xterm.
4618 has to change to the 'K' charset, '\eE(B' will be sent
4619 to the terminal, i.e. the ASCII charset is used instead. The
4620 template is just '%', so the mapping is straightforward: '['
4621 to '\e304', '\e' to '\e326', and ']' to '\e334'.
4626 Number of columns on the terminal (overrides termcap entry).
4628 Directory in which to look for .screenrc.
4630 Number of lines on the terminal (overrides termcap entry).
4632 Screen lock program.
4634 Turns on nethack option.
4636 Used for locating programs to run.
4638 For customizing a terminal's TERMCAP value.
4640 Alternate socket directory.
4642 Alternate user screenrc file.
4644 Default shell program for opening windows (default \*Q/bin/sh\*U).
4646 Alternate socket name.
4648 Alternate system screenrc file.
4652 Terminal description.
4654 Window number of a window (at creation time).
4658 .IP .../screen-4.?.??/etc/screenrc 34
4659 .IP .../screen-4.?.??/etc/etcscreenrc
4662 distribution package for private and global initialization files.
4664 .IP /usr/local/etc/screenrc
4666 initialization commands
4669 Read in after /usr/local/etc/screenrc
4670 .IP $SCREENDIR/S-<login>
4671 .IP /local/screens/S-<login>
4672 Socket directories (default)
4673 .IP /usr/tmp/screens/S-<login>
4674 Alternate socket directories.
4675 .IP "<socket directory>/.termcap"
4676 Written by the "termcap" output function
4677 .IP /usr/tmp/screens/screen-exchange
4679 .IP /tmp/screen-exchange
4681 `interprocess communication buffer'
4683 Screen images created by the hardcopy function
4685 Output log files created by the log function
4686 .IP /usr/lib/terminfo/?/*
4689 Terminal capability databases
4693 Program that locks a terminal.
4697 termcap(5), utmp(5), vi(1), captoinfo(1), tic(1)
4701 Originally created by Oliver Laumann, this latest version was
4702 produced by Wayne Davison, Juergen Weigert and Michael Schroeder.
4706 Copyright (C) 1993-2003
4707 Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
4708 Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
4709 Copyright (C) 1987 Oliver Laumann
4712 This program is free software; you can redistribute it and/or modify
4713 it under the terms of the GNU General Public License as published by
4714 the Free Software Foundation; either version 2, or (at your option)
4717 This program is distributed in the hope that it will be useful,
4718 but WITHOUT ANY WARRANTY; without even the implied warranty of
4719 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4720 GNU General Public License for more details.
4722 You should have received a copy of the GNU General Public License
4723 along with this program (see the file COPYING); if not, write to the
4724 Free Software Foundation, Inc.,
4725 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
4729 Ken Beal (kbeal@amber.ssd.csd.harris.com),
4730 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de),
4731 Toerless Eckert (eckert@immd4.informatik.uni-erlangen.de),
4732 Wayne Davison (davison@borland.com),
4733 Patrick Wolfe (pat@kai.com, kailand!pat),
4734 Bart Schaefer (schaefer@cse.ogi.edu),
4735 Nathan Glasser (nathan@brokaw.lcs.mit.edu),
4736 Larry W. Virden (lvirden@cas.org),
4737 Howard Chu (hyc@hanauma.jpl.nasa.gov),
4738 Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
4739 Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
4740 Marc Boucher (marc@CAM.ORG),
4741 Doug Siebert (dsiebert@isca.uiowa.edu),
4742 Ken Stillson (stillson@tsfsrv.mitre.org),
4743 Ian Frechett (frechett@spot.Colorado.EDU),
4744 Brian Koehmstedt (bpk@gnu.ai.mit.edu),
4745 Don Smith (djs6015@ultb.isc.rit.edu),
4746 Frank van der Linden (vdlinden@fwi.uva.nl),
4747 Martin Schweikert (schweik@cpp.ob.open.de),
4748 David Vrona (dave@sashimi.lcu.com),
4749 E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
4750 Matthew Green (mrg@eterna.com.au),
4751 Christopher Williams (cgw@pobox.com),
4752 Matt Mosley (mattm@access.digex.net),
4753 Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
4754 Johannes Zellner (johannes@zellner.org),
4755 Pablo Averbuj (pablo@averbuj.com).
4760 This is version 4.0.2. Its roots are a merge of a custom version
4761 2.3PR7 by Wayne Davison
4762 and several enhancements to Oliver Laumann's version 2.0. Note that all versions
4763 numbered 2.x are copyright by Oliver Laumann.
4766 The latest official release of
4768 available via anonymous ftp from gnudist.gnu.org, nic.funet.fi or any other
4770 distribution site. The home site of
4772 is ftp.uni-erlangen.de, in the directory
4773 pub/utilities/screen. The subdirectory `private' contains the latest beta
4774 testing release. If you want to help, send a note to
4775 screen@uni-erlangen.de.
4780 `dm' (delete mode) and `xs' are not handled
4781 correctly (they are ignored). `xn' is treated as a magic-margin
4785 has no clue about double-high or double-wide characters.
4786 But this is the only area where
4790 It is not possible to change the environment variable $TERMCAP when
4791 reattaching under a different terminal type.
4793 The support of terminfo based systems is very limited. Adding extra
4794 capabilities to $TERMCAP may not have any effects.
4797 does not make use of hardware tabs.
4800 must be installed as set-uid with owner root on most systems in order
4801 to be able to correctly change the owner of the tty device file for
4803 Special permission may also be required to write the file \*Q/etc/utmp\*U.
4805 Entries in \*Q/etc/utmp\*U are not removed when
4807 is killed with SIGKILL.
4808 This will cause some programs (like "w" or "rwho")
4809 to advertise that a user is logged on who really isn't.
4812 may give a strange warning when your tty has no utmp entry.
4814 When the modem line was hung up,
4816 may not automatically detach (or quit)
4817 unless the device driver is configured to send a HANGUP signal.
4820 session use the -D or -d command line option.
4822 If a password is set, the command line options -d and -D still detach a
4823 session without asking.
4825 Both \*Qbreaktype\*U and \*Qdefbreaktype\*U change the break generating
4826 method used by all terminal devices. The first should change a window
4827 specific setting, where the latter should change only the default for new
4830 When attaching to a multiuser session, the user's .screenrc file is not
4831 sourced. Each user's personal settings have to be included in the .screenrc
4832 file from which the session is booted, or have to be changed manually.
4834 A weird imagination is most useful to gain full advantage of all the features.
4836 Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza to
4837 .BR screen@uni-erlangen.de .