1SCREEN(1)                   General Commands Manual                  SCREEN(1)
2
3
4

NAME

6       screen - screen manager with VT100/ANSI terminal emulation
7
8
9

SYNOPSIS

11       screen [ -options ] [ cmd [ args ] ]
12       screen -r [[pid.]tty[.host]]
13       screen -r sessionowner/[[pid.]tty[.host]]
14
15
16

DESCRIPTION

18       Screen is a full-screen window manager that multiplexes a physical ter‐
19       minal between several processes (typically interactive  shells).   Each
20       virtual terminal provides the functions of a DEC VT100 terminal and, in
21       addition, several control functions from the ISO 6429  (ECMA  48,  ANSI
22       X3.64)  and ISO 2022 standards (e.g. insert/delete line and support for
23       multiple character sets).  There is a  scrollback  history  buffer  for
24       each virtual terminal and a copy-and-paste mechanism that allows moving
25       text regions between windows.
26
27       When screen is called, it creates a single window with a  shell  in  it
28       (or  the  specified  command) and then gets out of your way so that you
29       can use the program as you normally would.  Then, at any time, you  can
30       create new (full-screen) windows with other programs in them (including
31       more shells), kill existing windows, view a list of windows, turn  out‐
32       put  logging  on and off, copy-and-paste text between windows, view the
33       scrollback history, switch between windows in whatever manner you wish,
34       etc.  All  windows  run  their  programs completely independent of each
35       other. Programs continue to run when their window is currently not vis‐
36       ible and even when the whole screen session is detached from the user's
37       terminal.  When a program terminates, screen (per  default)  kills  the
38       window  that  contained  it.  If this window was in the foreground, the
39       display switches to the previous  window;  if  none  are  left,  screen
40       exits.
41
42       Everything  you type is sent to the program running in the current win‐
43       dow.  The only exception to this is the one keystroke that is  used  to
44       initiate  a  command  to  the window manager.  By default, each command
45       begins with a control-a (abbreviated C-a from now on), and is  followed
46       by one other keystroke.  The command character and all the key bindings
47       can be fully customized to be anything you like, though they are always
48       two characters in length.
49
50       Screen does not understand the prefix "C-" to mean control.  Please use
51       the caret notation ("^A" instead of "C-a") as  arguments  to  e.g.  the
52       escape  command  or  the -e option.  Screen will also print out control
53       characters in caret notation.
54
55       The standard way to create a new window is to type "C-a c".  This  cre‐
56       ates  a  new window running a shell and switches to that window immedi‐
57       ately, regardless of the state of the process running  in  the  current
58       window.   Similarly,  you can create a new window with a custom command
59       in it by first binding the command to a keystroke  (in  your  .screenrc
60       file  or  at  the "C-a :" command line) and then using it just like the
61       "C-a c" command.  In addition, new windows can be created by running  a
62       command like:
63
64              screen emacs prog.c
65
66       from  a shell prompt within a previously created window.  This will not
67       run another copy of screen, but will instead supply  the  command  name
68       and its arguments to the window manager (specified in the $STY environ‐
69       ment variable) who will use it to create the  new  window.   The  above
70       example would start the emacs editor (editing prog.c) and switch to its
71       window.
72
73       If "/etc/utmp" is writable by screen, an  appropriate  record  will  be
74       written  to  this  file for each window, and removed when the window is
75       terminated.  This is useful for working with "talk",  "script",  "shut‐
76       down",  "rsend",  "sccs"  and  other similar programs that use the utmp
77       file to determine who you are. As long as screen is active on your ter‐
78       minal,  the  terminal's  own  record is removed from the utmp file. See
79       also "C-a L".
80
81
82

GETTING STARTED

84       Before you begin to use screen you'll need to make sure you  have  cor‐
85       rectly  selected  your  terminal  type, just as you would for any other
86       termcap/terminfo program.  (You can do this by using tset for example.)
87
88       If you're impatient and want to get started without doing  a  lot  more
89       reading,  you should remember this one command:  "C-a ?".  Typing these
90       two characters will display a list of the available screen commands and
91       their bindings. Each keystroke is discussed in the section "DEFAULT KEY
92       BINDINGS". The manual section "CUSTOMIZATION" deals with  the  contents
93       of your .screenrc.
94
95       If your terminal is a "true" auto-margin terminal (it doesn't allow the
96       last position on the screen to be updated without scrolling the screen)
97       consider  using a version of your terminal's termcap that has automatic
98       margins turned off. This will ensure an accurate and optimal update  of
99       the  screen  in all circumstances. Most terminals nowadays have "magic"
100       margins (automatic margins plus usable last column). This is the  VT100
101       style  type  and  perfectly  suited for screen.  If all you've got is a
102       "true" auto-margin terminal screen will  be  content  to  use  it,  but
103       updating  a  character put into the last position on the screen may not
104       be possible until the screen scrolls or the character is moved  into  a
105       safe position in some other way. This delay can be shortened by using a
106       terminal with insert-character capability.
107
108
109

COMMAND-LINE OPTIONS

111       Screen has the following command-line options:
112
113       -a   include all capabilities (with some minor exceptions) in each win‐
114            dow's  termcap, even if screen must redraw parts of the display in
115            order to implement a function.
116
117       -A   Adapt the sizes of all windows to the size of the  current  termi‐
118            nal.   By  default,  screen  tries to restore its old window sizes
119            when attaching to resizable terminals  (those  with  "WS"  in  its
120            description, e.g. suncmd or some xterm).
121
122       -c file
123            override  the default configuration file from "$HOME/.screenrc" to
124            file.
125
126       -d|-D [pid.tty.host]
127            does not start screen, but detaches the elsewhere  running  screen
128            session.  It  has  the same effect as typing "C-a d" from screen's
129            controlling terminal. -D is the equivalent  to  the  power  detach
130            key.   If  no  session can be detached, this option is ignored. In
131            combination with the -r/-R option more  powerful  effects  can  be
132            achieved:
133
134       -d -r   Reattach a session and if necessary detach it first.
135
136       -d -R   Reattach  a  session  and if necessary detach or even create it
137               first.
138
139       -d -RR  Reattach a session and if necessary detach or  create  it.  Use
140               the first session if more than one session is available.
141
142       -D -r   Reattach  a  session.  If  necessary detach and logout remotely
143               first.
144
145       -D -R   Attach here and now. In detail this means: If a session is run‐
146               ning,  then  reattach.  If necessary detach and logout remotely
147               first.  If it was not running create it and  notify  the  user.
148               This is the author's favorite.
149
150       -D -RR  Attach here and now. Whatever that means, just do it.
151
152            Note:  It  is  always a good idea to check the status of your ses‐
153            sions by means of "screen -list".
154
155       -e xy
156            specifies the command character to be x and the character generat‐
157            ing a literal command character to y (when typed after the command
158            character).  The default is "C-a" and `a', which can be  specified
159            as  "-e^Aa".  When creating a screen session, this option sets the
160            default command character. In a multiuser session all users  added
161            will  start off with this command character. But when attaching to
162            an already running session, this option changes only  the  command
163            character  of  the  attaching  user.  This option is equivalent to
164            either the commands "defescape" or "escape" respectively.
165
166       -f, -fn, and -fa
167            turns flow-control on, off, or "automatic switching  mode".   This
168            can also be defined through the "defflow" .screenrc command.
169
170       -h num
171            Specifies the history scrollback buffer to be num lines high.
172
173       -i   will  cause  the interrupt key (usually C-c) to interrupt the dis‐
174            play immediately when  flow-control  is  on.   See  the  "defflow"
175            .screenrc command for details.  The use of this option is discour‐
176            aged.
177
178       -l and -ln
179            turns login mode on or off (for  /etc/utmp  updating).   This  can
180            also be defined through the "deflogin" .screenrc command.
181
182       -ls and -list
183            does  not  start screen, but prints a list of pid.tty.host strings
184            identifying your screen sessions.  Sessions marked `detached'  can
185            be  resumed  with "screen -r". Those marked `attached' are running
186            and have a controlling terminal. If the session runs in  multiuser
187            mode,  it  is  marked  `multi'.  Sessions  marked as `unreachable'
188            either live on a different host or  are  `dead'.   An  unreachable
189            session  is considered dead, when its name matches either the name
190            of the local host, or the specified parameter, if any.  See the -r
191            flag  for a description how to construct matches.  Sessions marked
192            as `dead' should be thoroughly checked and removed.  Ask your sys‐
193            tem  administrator  if  you are not sure. Remove sessions with the
194            -wipe option.
195
196       -L   tells screen to turn on automatic output logging for the windows.
197
198       -m   causes screen  to  ignore  the  $STY  environment  variable.  With
199            "screen  -m"  creation  of  a  new session is enforced, regardless
200            whether screen is called from within  another  screen  session  or
201            not.  This  flag has a special meaning in connection with the `-d'
202            option:
203
204       -d -m   Start screen in "detached" mode. This creates a new session but
205               doesn't  attach  to  it.  This  is  useful  for  system startup
206               scripts.
207
208       -D -m   This also starts screen in "detached" mode, but doesn't fork  a
209               new process. The command exits if the session terminates.
210
211       -O   selects  a  more optimal output mode for your terminal rather than
212            true VT100 emulation (only affects auto-margin  terminals  without
213            `LP').   This can also be set in your .screenrc by specifying `OP'
214            in a "termcap" command.
215
216       -p number_or_name
217            Preselect a window. This is usefull when you want to reattach to a
218            specific  windor or you want to send a command via the "-X" option
219            to a specific window. As with screen's select commant, "-" selects
220            the  blank  window.  As a special case for reattach, "=" brings up
221            the windowlist on the blank window.
222
223       -q   Suppress printing of error messages. In combination with "-ls" the
224            exit  value  is  as  follows: 9 indicates a directory without ses‐
225            sions. 10 indicates a directory with running  but  not  attachable
226            sessions.  11 (or more) indicates 1 (or more) usable sessions.  In
227            combination with "-r" the exit value is as follows:  10  indicates
228            that  there  is  no session to resume. 12 (or more) indicates that
229            there are 2 (or more) sessions to resume and  you  should  specify
230            which one to choose.  In all other cases "-q" has no effect.
231
232       -r [pid.tty.host]
233       -r sessionowner/[pid.tty.host]
234            resumes  a detached screen session.  No other options (except com‐
235            binations with -d/-D) may be specified, though an optional  prefix
236            of  [pid.]tty.host  may  be needed to distinguish between multiple
237            detached screen sessions.  The second form is used to  connect  to
238            another  user's  screen session which runs in multiuser mode. This
239            indicates that screen should look for sessions in  another  user's
240            directory. This requires setuid-root.
241
242       -R   attempts to resume the first detached screen session it finds.  If
243            successful, all other command-line options  are  ignored.   If  no
244            detached  session exists, starts a new session using the specified
245            options, just as if -R had not been specified. The option  is  set
246            by default if screen is run as a login-shell (actually screen uses
247            "-xRR" in that case).  For combinations with the -d/-D option  see
248            there.
249
250       -s   sets  the  default  shell to the program specified, instead of the
251            value in the environment variable  $SHELL  (or  "/bin/sh"  if  not
252            defined).   This can also be defined through the "shell" .screenrc
253            command.
254
255       -S sessionname
256            When creating a new session, this option can be used to specify  a
257            meaningful  name for the session. This name identifies the session
258            for "screen -list" and "screen -r"  actions.  It  substitutes  the
259            default [tty.host] suffix.
260
261       -t name
262            sets  the  title  (a.k.a.) for the default shell or specified pro‐
263            gram.  See also the "shelltitle" .screenrc command.
264
265       -U   Run screen in UTF-8 mode. This option tells screen that your  ter‐
266            minal sends and understands UTF-8 encoded characters. It also sets
267            the default encoding for new windows to `utf8'.
268
269       -v   Print version number.
270
271       -wipe [match]
272            does the same as "screen  -ls",  but  removes  destroyed  sessions
273            instead of marking them as `dead'.  An unreachable session is con‐
274            sidered dead, when its name matches either the name of  the  local
275            host,  or the explicitly given parameter, if any.  See the -r flag
276            for a description how to construct matches.
277
278       -x   Attach to a not detached screen session. (Multi display mode).
279
280       -X   Send the specified command to a running screen  session.  You  can
281            use  the  -d or -r option to tell screen to look only for attached
282            or detached screen sessions. Note that this command  doesn't  work
283            if the session is password protected.
284
285
286

DEFAULT KEY BINDINGS

288       As  mentioned,  each screen command consists of a "C-a" followed by one
289       other character.  For your convenience, all commands that are bound  to
290       lower-case  letters  are also bound to their control character counter‐
291       parts (with the exception of "C-a a"; see below), thus, "C-a c" as well
292       as  "C-a  C-c"  can be used to create a window. See section "CUSTOMIZA‐
293       TION" for a description of the command.
294
295       The following table shows the default key bindings:
296
297       C-a '       (select)      Prompt for a window name or number to  switch
298                                 to.
299
300       C-a "       (windowlist -b)
301                                 Present a list of all windows for selection.
302
303       C-a 0       (select 0)
304        ...           ...
305       C-a 9       (select 9)
306       C-a -       (select -)    Switch  to  window  number  0  - 9, or to the
307                                 blank window.
308
309       C-a tab     (focus)       Switch the input focus to the next region.
310
311       C-a C-a     (other)       Toggle to the  window  displayed  previously.
312                                 Note  that  this binding defaults to the com‐
313                                 mand character typed twice,  unless  overrid‐
314                                 den.   For  instance,  if  you use the option
315                                 "-e]x", this command becomes "]]".
316
317       C-a a       (meta)        Send the command character (C-a)  to  window.
318                                 See escape command.
319
320       C-a A       (title)       Allow  the  user to enter a name for the cur‐
321                                 rent window.
322
323       C-a b
324       C-a C-b     (break)       Send a break to window.
325
326       C-a B       (pow_break)   Reopen the terminal line and send a break.
327
328       C-a c
329       C-a C-c     (screen)      Create a new window with a shell  and  switch
330                                 to that window.
331
332       C-a C       (clear)       Clear the screen.
333
334       C-a d
335       C-a C-d     (detach)      Detach screen from this terminal.
336
337       C-a D D     (pow_detach)  Detach and logout.
338
339       C-a f
340       C-a C-f     (flow)        Toggle flow on, off or auto.
341
342       C-a F       (fit)         Resize the window to the current region size.
343
344       C-a C-g     (vbell)       Toggles screen's visual bell mode.
345
346       C-a h       (hardcopy)    Write a hardcopy of the current window to the
347                                 file "hardcopy.n".
348
349       C-a H       (log)         Begins/ends logging of the current window  to
350                                 the file "screenlog.n".
351
352       C-a i
353       C-a C-i     (info)        Show info about this window.
354
355       C-a k
356       C-a C-k     (kill)        Destroy current window.
357
358       C-a l
359       C-a C-l     (redisplay)   Fully refresh current window.
360
361       C-a L       (login)       Toggle  this  windows  login  slot. Available
362                                 only if screen is configured  to  update  the
363                                 utmp database.
364
365       C-a m
366       C-a C-m     (lastmsg)     Repeat the last message displayed in the mes‐
367                                 sage line.
368
369       C-a M       (monitor)     Toggles monitoring of the current window.
370
371       C-a space
372       C-a n
373       C-a C-n     (next)        Switch to the next window.
374
375       C-a N       (number)      Show the number (and title)  of  the  current
376                                 window.
377
378       C-a backspace
379       C-a h
380       C-a p
381       C-a C-p     (prev)        Switch to the previous window (opposite of C-
382                                 a n).
383
384       C-a q
385       C-a C-q     (xon)         Send a control-q to the current window.
386
387       C-a Q       (only)        Delete all regions but the current one.
388
389       C-a r
390       C-a C-r     (wrap)        Toggle the current window's line-wrap setting
391                                 (turn  the current window's automatic margins
392                                 on and off).
393
394       C-a s
395       C-a C-s     (xoff)        Send a control-s to the current window.
396
397       C-a S       (split)       Split the current region into two new ones.
398
399       C-a t
400       C-a C-t     (time)        Show system information.
401
402       C-a v       (version)     Display the version and compilation date.
403
404       C-a C-v     (digraph)     Enter digraph.
405
406       C-a w
407       C-a C-w     (windows)     Show a list of window.
408
409       C-a W       (width)       Toggle 80/132 columns.
410
411       C-a x
412       C-a C-x     (lockscreen)  Lock this terminal.
413
414       C-a X       (remove)      Kill the current region.
415
416       C-a z
417       C-a C-z     (suspend)     Suspend screen.   Your  system  must  support
418                                 BSD-style job-control.
419
420       C-a Z       (reset)       Reset  the virtual terminal to its "power-on"
421                                 values.
422
423       C-a .       (dumptermcap) Write out a ".termcap" file.
424
425       C-a ?       (help)        Show key bindings.
426
427       C-a C-\     (quit)        Kill all windows and terminate screen.
428
429       C-a :       (colon)       Enter command line mode.
430
431       C-a [
432       C-a C-[
433       C-a esc     (copy)        Enter copy/scrollback mode.
434
435       C-a ]       (paste .)     Write the contents of the paste buffer to the
436                                 stdin queue of the current window.
437
438       C-a {
439       C-a }       (history)     Copy and paste a previous (command) line.
440
441       C-a >       (writebuf)    Write paste buffer to a file.
442
443       C-a <       (readbuf)     Reads the screen-exchange file into the paste
444                                 buffer.
445
446       C-a =       (removebuf)   Removes the file used by C-a < and C-a >.
447
448       C-a ,       (license)     Shows where screen comes from, where it  went
449                                 to and why you can use it.
450
451       C-a _       (silence)     Start/stop  monitoring the current window for
452                                 inactivity.
453
454       C-a *       (displays)    Show a listing of all currently attached dis‐
455                                 plays.
456
457
458

CUSTOMIZATION

460       The  "socket  directory"  defaults either to $HOME/.screen or simply to
461       /tmp/screens or preferably to  /usr/local/screens  chosen  at  compile-
462       time. If screen is installed setuid-root, then the administrator should
463       compile screen with an adequate (not NFS mounted) socket directory.  If
464       screen  is  not  running setuid-root, the user can specify any mode 700
465       directory in the environment variable $SCREENDIR.
466
467       When screen is invoked, it executes initialization  commands  from  the
468       files  "/etc/screenrc"  and  ".screenrc"  in the user's home directory.
469       These are the "programmer's defaults" that can  be  overridden  in  the
470       following  ways:  for  the global screenrc file screen searches for the
471       environment variable $SYSSCREENRC (this override feature  may  be  dis‐
472       abled  at compile-time). The user specific screenrc file is searched in
473       $SCREENRC, then $HOME/.screenrc.  The  command  line  option  -c  takes
474       precedence over the above user screenrc files.
475
476       Commands  in  these  files  are  used to set options, bind functions to
477       keys, and to automatically establish one or more windows at the  begin‐
478       ning  of  your  screen session.  Commands are listed one per line, with
479       empty lines being ignored.  A command's arguments are separated by tabs
480       or  spaces,  and  may  be surrounded by single or double quotes.  A `#'
481       turns the rest of the line into a comment, except in quotes.   Unintel‐
482       ligible  lines are warned about and ignored.  Commands may contain ref‐
483       erences to environment variables. The syntax is the shell-like "$VAR  "
484       or "${VAR}". Note that this causes incompatibility with previous screen
485       versions, as now the '$'-character has to be protected with '\'  if  no
486       variable  substitution shall be performed. A string in single-quotes is
487       also protected from variable substitution.
488
489       Two configuration files are shipped as examples with your  screen  dis‐
490       tribution:  "etc/screenrc" and "etc/etcscreenrc". They contain a number
491       of useful examples for various commands.
492
493       Customization can also be done 'on-line'. To  enter  the  command  mode
494       type  `C-a  :'.  Note  that commands starting with "def" change default
495       values, while others change current settings.
496
497       The following commands are available:
498
499       acladd usernames [crypted-pw]
500       addacl usernames
501
502       Enable users to fully access this screen session. Usernames can be  one
503       user or a comma separated list of users. This command enables to attach
504       to the screen session and performs the equivalent of `aclchg  usernames
505       +rwx  "#?"'.   executed.  To add a user with restricted access, use the
506       `aclchg' command below.  If an optional second parameter  is  supplied,
507       it  should  be  a crypted password for the named user(s). `Addacl' is a
508       synonym to `acladd'.  Multi user mode only.
509
510       aclchg usernames permbits list
511       chacl usernames permbits list
512
513       Change permissions for a comma separated list of users. Permission bits
514       are  represented  as `r', `w' and `x'. Prefixing `+' grants the permis‐
515       sion, `-' removes it. The third parameter is a comma separated list  of
516       commands and/or windows (specified either by number or title). The spe‐
517       cial list `#' refers to all windows, `?' to all commands. if  usernames
518       consists  of a single `*', all known users are affected.  A command can
519       be executed when the user has the `x' bit for it.  The  user  can  type
520       input to a window when he has its `w' bit set and no other user obtains
521       a writelock for this window.  Other bits  are  currently  ignored.   To
522       withdraw  the writelock from another user in window 2: `aclchg username
523       -w+w 2'.  To allow read-only access to the session: `aclchg username -w
524       "#"'.  As soon as a user's name is known to screen he can attach to the
525       session and (per default) has full permissions for all command and win‐
526       dows. Execution permission for the acl commands, `at' and others should
527       also be removed or the user may be able  to  regain  write  permission.
528       Rights  of  the special username nobody cannot be changed (see the "su"
529       command).  `Chacl' is a synonym to `aclchg'.  Multi user mode only.
530
531       acldel username
532
533       Remove a user from screen's access control list. If currently attached,
534       all the user's displays are detached from the session. He cannot attach
535       again.  Multi user mode only.
536
537       aclgrp username [groupname]
538
539       Creates groups of users that share common access rights.  The  name  of
540       the group is the username of the group leader. Each member of the group
541       inherits the permissions that are granted to  the  group  leader.  That
542       means,  if  a user fails an access check, another check is made for the
543       group leader.  A user is removed from  all  groups  the  special  value
544       "none"  is  used for groupname.  If the second parameter is omitted all
545       groups the user is in are listed.
546
547       aclumask [[users]+bits |[users]-bits .... ]
548       umask [[users]+bits |[users]-bits .... ]
549
550       This specifies the access other users have to windows that will be cre‐
551       ated  by  the  caller  of the command.  Users may be no, one or a comma
552       separated list of known usernames. If no users are specified, a list of
553       all  currently  known  users  is  assumed.   Bits is any combination of
554       access control bits allowed defined with the "aclchg" command. The spe‐
555       cial  username  "?" predefines the access that not yet known users will
556       be granted to any window initially.  The special username  "??"  prede‐
557       fines  the  access that not yet known users are granted to any command.
558       Rights of the special username nobody cannot be changed (see  the  "su"
559       command).  `Umask' is a synonym to `aclumask'.
560
561       activity message
562
563       When  any  activity  occurs  in a background window that is being moni‐
564       tored, screen displays a notification in the message line.  The notifi‐
565       cation  message  can  be re-defined by means of the "activity" command.
566       Each occurrence of `%' in message is replaced by the number of the win‐
567       dow  in  which  activity  has  occurred, and each occurrence of `^G' is
568       replaced by the definition for bell in your termcap (usually an audible
569       bell).  The default message is
570
571                   'Activity in window %n'
572
573       Note  that  monitoring  is  off  for all windows by default, but can be
574       altered by use of the "monitor" command (C-a M).
575
576       allpartial on|off
577
578       If set to on, only the current  cursor  line  is  refreshed  on  window
579       change.   This  affects  all  windows  and  is useful for slow terminal
580       lines. The previous setting of full/partial refresh for each window  is
581       restored with "allpartial off".  This is a global flag that immediately
582       takes effect on all windows overriding the "partial" settings. It  does
583       not change the default redraw behavior of newly created windows.
584
585       altscreen on|off
586
587       If  set  to on, "alternate screen" support is enabled in virtual termi‐
588       nals, just like in xterm.  Initial setting is `off'.
589
590       at [identifier][#|*|%] command [args ... ]
591
592       Execute a command at other displays  or  windows  as  if  it  had  been
593       entered there.  "At" changes the context (the `current window' or `cur‐
594       rent display' setting) of the command. If the first parameter describes
595       a  non-unique  context, the command will be executed multiple times. If
596       the first parameter is of the form  `identifier*'  then  identifier  is
597       matched against user names.  The command is executed once for each dis‐
598       play of the selected user(s). If the first parameter  is  of  the  form
599       `identifier%'  identifier  is  matched  against  displays. Displays are
600       named after the ttys they attach. The prefix `/dev/' or `/dev/tty'  may
601       be  omitted  from  the  identifier.  If identifier has a `#' or nothing
602       appended it is matched against window numbers and titles.  Omitting  an
603       identifier in front of the `#', `*' or `%'-character selects all users,
604       displays or windows because a prefix-match is performed. Note  that  on
605       the  affected  display(s)  a short message will describe what happened.
606       Permission is checked for initiator of the "at" command,  not  for  the
607       owners  of  the affected display(s).  Note that the '#' character works
608       as a comment introducer when it is preceded by whitespace. This can  be
609       escaped by prefixing a '\'.  Permission is checked for the initiator of
610       the "at" command, not for the owners of the affected display(s).
611       Caveat: When matching against windows, the command is executed at least
612       once  per window. Commands that change the internal arrangement of win‐
613       dows (like "other") may be called again. In shared windows the  command
614       will be repeated for each attached display. Beware, when issuing toggle
615       commands like "login"!  Some commands (e.g. "process") require  that  a
616       display  is associated with the target windows.  These commands may not
617       work correctly under "at" looping over windows.
618
619       attrcolor attrib [attribute/color-modifier]
620
621       This command can be used to highlight attributes by changing the  color
622       of  the  text.  If  the  attribute  attrib  is  in  use,  the specified
623       attribute/color modifier is also applied. If no modifier is given,  the
624       current one is deleted. See the "STRING ESCAPES" chapter for the syntax
625       of the modifier. Screen understands two pseudo-attributes,  "i"  stands
626       for  high-intensity  foreground  color and "I" for high-intensity back‐
627       ground color.
628
629       Examples:
630
631              attrcolor b "R"
632
633       Change the color to bright red if bold text is to be printed.
634
635              attrcolor u "-u b"
636
637       Use blue text instead of underline.
638
639              attrcolor b ".I"
640
641       Use bright colors for  bold  text.  Most  terminal  emulators  do  this
642       already.
643
644              attrcolor i "+b"
645
646       Make bright colored text also bold.
647
648       autodetach on|off
649
650       Sets  whether screen will automatically detach upon hangup, which saves
651       all your running programs until they are resumed with a screen -r  com‐
652       mand.   When  turned off, a hangup signal will terminate screen and all
653       the processes it contains. Autodetach is on by default.
654
655       autonuke on|off
656
657       Sets whether a clear screen sequence should nuke all  the  output  that
658       has not been written to the terminal. See also "obuflimit".
659
660       backtick id lifespan autorefresh cmd args...
661       backtick id
662
663       Program  the  backtick command with the numerical id id.  The output of
664       such a command is used for substitution of the "%`" string escape.  The
665       specified  lifespan  is  the number of seconds the output is considered
666       valid. After this time, the command is run  again  if  a  corresponding
667       string  escape  is  encountered.  The autorefresh parameter triggers an
668       automatic refresh for caption and hardstatus strings after  the  speci‐
669       fied  number  of seconds. Only the last line of output is used for sub‐
670       stitution.
671       If both the lifespan and the autorefresh parameters are zero, the back‐
672       tick  program is expected to stay in the background and generate output
673       once in a while.  In this case, the command is executed right away  and
674       screen  stores  the  last  line  of  output. If a new line gets printed
675       screen will automatically refresh the hardstatus or the captions.
676       The second form of the command deletes the backtick  command  with  the
677       numerical id id.
678
679       bce [on|off]
680
681       Change background-color-erase setting. If "bce" is set to on, all char‐
682       acters cleared by an erase/insert/scroll/clear operation will  be  dis‐
683       played  in  the  current  background color. Otherwise the default back‐
684       ground color is used.
685
686       bell_msg [message]
687
688       When a bell character is sent to a background window, screen displays a
689       notification  in the message line.  The notification message can be re-
690       defined by this command.  Each occurrence of `%' in message is replaced
691       by  the  number  of  the window to which a bell has been sent, and each
692       occurrence of `^G' is replaced by the definition for bell in your term‐
693       cap (usually an audible bell).  The default message is
694
695                   'Bell in window %n'
696
697       An  empty message can be supplied to the "bell_msg" command to suppress
698       output of a message line (bell_msg "").  Without parameter, the current
699       message is shown.
700
701       bind [-c class] key [command [args]]
702
703       Bind  a command to a key.  By default, most of the commands provided by
704       screen are bound to one or more keys as indicated in the  "DEFAULT  KEY
705       BINDINGS"  section, e.g. the command to create a new window is bound to
706       "C-c" and "c".  The "bind" command can be  used  to  redefine  the  key
707       bindings and to define new bindings.  The key argument is either a sin‐
708       gle character, a two-character sequence of the form "^x"  (meaning  "C-
709       x"), a backslash followed by an octal number (specifying the ASCII code
710       of the character), or a backslash followed by a second character,  such
711       as  "\^" or "\\".  The argument can also be quoted, if you like.  If no
712       further argument is given, any previously established binding for  this
713       key is removed.  The command argument can be any command listed in this
714       section.
715
716       If a command class is specified via the "-c" option, the key  is  bound
717       for the specified class. Use the "command" command to activate a class.
718       Command classes can be used to create multiple command keys  or  multi-
719       character bindings.
720
721       Some examples:
722
723                   bind ' ' windows
724                   bind ^k
725                   bind k
726                   bind K kill
727                   bind ^f screen telnet foobar
728                   bind \033 screen -ln -t root -h 1000 9 su
729
730       would bind the space key to the command that displays a list of windows
731       (so that the command usually invoked by "C-a C-w" would also be  avail‐
732       able  as  "C-a  space").  The  next three lines remove the default kill
733       binding from "C-a C-k" and "C-a k".  "C-a K" is then bound to the  kill
734       command.  Then  it  binds  "C-f" to the command "create a window with a
735       TELNET connection to foobar", and bind "escape"  to  the  command  that
736       creates an non-login window with a.k.a. "root" in slot #9, with a supe‐
737       ruser shell and a scrollback buffer of 1000 lines.
738
739                   bind -c demo1 0 select 10
740                   bind -c demo1 1 select 11
741                   bind -c demo1 2 select 12
742                   bindkey "^B" command -c demo1
743
744       makes "C-b 0" select window 10, "C-b 1" window 11, etc.
745
746                   bind -c demo2 0 select 10
747                   bind -c demo2 1 select 11
748                   bind -c demo2 2 select 12
749                   bind - command -c demo2
750
751       makes "C-a - 0" select window 10, "C-a - 1" window 11, etc.
752
753       bindkey [-d] [-m] [-a] [[-k|-t] string [cmd args]]
754
755       This command manages screen's input translation tables. Every entry  in
756       one  of  the  tables tells screen how to react if a certain sequence of
757       characters is encountered. There are three tables: one that should con‐
758       tain  actions  programmed by the user, one for the default actions used
759       for terminal emulation and one for screen's  copy  mode  to  do  cursor
760       movement.  See  section  "INPUT  TRANSLATION" for a list of default key
761       bindings.
762       If the -d option is given,  bindkey  modifies  the  default  table,  -m
763       changes  the  copy mode table and with neither option the user table is
764       selected.  The argument string is the sequence of characters  to  which
765       an action is bound. This can either be a fixed string or a termcap key‐
766       board capability name (selectable with the -k option).
767       Some keys on a VT100 terminal can send a different string  if  applica‐
768       tion  mode  is  turned  on  (e.g  the cursor keys).  Such keys have two
769       entries in the translation table. You can select the  application  mode
770       entry by specifying the -a option.
771       The -t option tells screen not to do inter-character timing. One cannot
772       turn off the timing if a termcap capability is used.
773       Cmd can be any of screen's commands with an arbitrary number  of  args.
774       If cmd is omitted the key-binding is removed from the table.
775       Here are some examples of keyboard bindings:
776
777               bindkey -d
778       Show  all of the default key bindings. The application mode entries are
779       marked with [A].
780
781               bindkey -k k1 select 1
782       Make the "F1" key switch to window one.
783
784               bindkey -t foo stuff barfoo
785       Make "foo" an abbreviation of the word "barfoo". Timeout is disabled so
786       that users can type slowly.
787
788               bindkey "\024" mapdefault
789       This  key-binding  makes  "^T" an escape character for key-bindings. If
790       you did the above "stuff barfoo" binding, you can enter the word  "foo"
791       by  typing  "^Tfoo". If you want to insert a "^T" you have to press the
792       key twice (i.e. escape the escape binding).
793
794               bindkey -k F1 command
795       Make the F11 (not F1!) key an alternative screen escape (besides ^A).
796
797       break [duration]
798
799       Send a break signal for duration*0.25 seconds to this window.  For non-
800       Posix  systems  the  time  interval  may be rounded up to full seconds.
801       Most useful if a character device is attached to the window rather than
802       a shell process (See also chapter "WINDOW TYPES"). The maximum duration
803       of a break signal is limited to 15 seconds.
804
805       blanker
806
807       Activate the screen blanker. First the screen is cleared. If no blanker
808       program is defined, the cursor is turned off, otherwise, the program is
809       started and it's output is written to the screen.  The  screen  blanker
810       is killed with the first keypress, the read key is discarded.
811       This command is normally used together with the "idle" command.
812
813       blankerprg [program args]
814
815       Defines a blanker program. Disables the blanker program if no arguments
816       are given.
817
818       breaktype [tcsendbreak|TIOCSBRK |TCSBRK]
819
820       Choose one of the available methods of generating a  break  signal  for
821       terminal  devices.  This command should affect the current window only.
822       But it still behaves identical to "defbreaktype". This will be  changed
823       in  the  future.   Calling  "breaktype"  with no parameter displays the
824       break method for the current window.
825
826       bufferfile [exchange-file]
827
828       Change the filename used for reading and writing with the paste buffer.
829       If  the  optional  argument to the "bufferfile" command is omitted, the
830       default setting ("/tmp/screen-exchange") is reactivated.  The following
831       example  will  paste  the system's password file into the screen window
832       (using the paste buffer, where a copy remains):
833
834                   C-a : bufferfile /etc/passwd
835                   C-a < C-a ]
836                   C-a : bufferfile
837
838       c1 [on|off]
839
840       Change c1 code processing. "C1 on" tells  screen  to  treat  the  input
841       characters  between  128  and  159 as control functions.  Such an 8-bit
842       code is normally the same as ESC followed by  the  corresponding  7-bit
843       code.  The  default  setting  is to process c1 codes and can be changed
844       with the "defc1" command.  Users with fonts that have usable characters
845       in the c1 positions may want to turn this off.
846
847       caption always|splitonly [string]
848       caption string [string]
849
850       This  command  controls  the display of the window captions. Normally a
851       caption is only used if more than one window is shown  on  the  display
852       (split  screen  mode).  But if the type is set to always screen shows a
853       caption even if only one window is displayed. The default is splitonly.
854
855       The second form changes the text used for the caption. You can use  all
856       escapes  from  the  "STRING  ESCAPES" chapter. Screen uses a default of
857       `%3n %t'.
858
859       You can mix both forms by providing a string as an additional argument.
860
861       charset set
862
863       Change the current character set slot designation and charset  mapping.
864       The  first  four  character  of  set are treated as charset designators
865       while the fifth and sixth character must be in range '0' to '3' and set
866       the GL/GR charset mapping. On every position a '.' may be used to indi‐
867       cate that the corresponding charset/mapping should not be changed  (set
868       is  padded  to  six characters internally by appending '.'  chars). New
869       windows have "BBBB02" as default charset, unless a  "encoding"  command
870       is active.
871       The current setting can be viewed with the "info" command.
872
873       chdir [directory]
874
875       Change  the  current directory of screen to the specified directory or,
876       if called without an argument, to your home directory (the value of the
877       environment  variable $HOME).  All windows that are created by means of
878       the "screen" command from within ".screenrc" or  by  means  of  "C-a  :
879       screen  ..." or "C-a c" use this as their default directory.  Without a
880       chdir command, this would  be  the  directory  from  which  screen  was
881       invoked.   Hardcopy  and  log  files are always written to the window's
882       default directory, not the current directory of the process running  in
883       the  window.  You can use this command multiple times in your .screenrc
884       to start various windows in different default directories, but the last
885       chdir value will affect all the windows you create interactively.
886
887       clear
888
889       Clears the current window and saves its image to the scrollback buffer.
890
891       colon [prefix]
892
893       Allows  you  to  enter ".screenrc" command lines. Useful for on-the-fly
894       modification of key bindings, specific  window  creation  and  changing
895       settings.  Note  that  the "set" keyword no longer exists! Usually com‐
896       mands affect the current window rather than default settings for future
897       windows. Change defaults with commands starting with 'def...'.
898
899       If you consider this as the `Ex command mode' of screen, you may regard
900       "C-a esc" (copy mode) as its `Vi command mode'.
901
902       command [-c class]
903
904       This command has the same effect as typing the screen escape  character
905       (^A).  It is probably only useful for key bindings.  If the "-c" option
906       is given, select the specified command  class.   See  also  "bind"  and
907       "bindkey".
908
909       compacthist [on|off]
910
911       This  tells  screen  whether  to  suppress  trailing  blank  lines when
912       scrolling up text into the history buffer.
913
914       console [on|off]
915
916       Grabs or un-grabs the machines console output to a window.  Note:  Only
917       the owner of /dev/console can grab the console output.  This command is
918       only available if the machine supports the ioctl TIOCCONS.
919
920       copy
921
922       Enter copy/scrollback mode. This allows you to copy text from the  cur‐
923       rent  window  and its history into the paste buffer. In this mode a vi-
924       like `full screen editor' is active:
925       Movement keys:
926         h, j, k, l move the cursor line by line or column by column.
927         0, ^ and $ move to the leftmost column, to the  first  or  last  non-
928           whitespace character on the line.
929         H,  M and L move the cursor to the leftmost column of the top, center
930           or bottom line of the window.
931         + and - positions one line up and down.
932         G moves to the specified absolute line (default: end of buffer).
933         | moves to the specified absolute column.
934         w, b, e move the cursor word by word.
935         B, E move the cursor WORD by WORD (as in vi).
936         C-u and C-d scroll the display up/down by  the  specified  amount  of
937           lines  while preserving the cursor position. (Default: half screen-
938           full).
939         C-b and C-f scroll the display up/down a full screen.
940         g moves to the beginning of the buffer.
941         % jumps to the specified percentage of the buffer.
942
943       Note:
944           Emacs style movement keys can be customized by a .screenrc command.
945           (E.g.  markkeys  "h=^B:l=^F:$=^E")  There is no simple method for a
946           full emacs-style keymap, as this involves multi-character codes.
947
948       Marking:
949           The copy range is specified by setting two marks. The text  between
950           these marks will be highlighted. Press
951         space to set the first or second mark respectively.
952         Y and y used to mark one whole line or to mark from start of line.
953         W marks exactly one word.
954       Repeat count:
955           Any of these commands can be prefixed with a repeat count number by
956           pressing digits
957         0..9 which is taken as a repeat count.
958           Example: "C-a C-[ H 10 j 5 Y" will copy lines 11  to  15  into  the
959           paste buffer.
960       Searching:
961         / Vi-like search forward.
962         ? Vi-like search backward.
963         C-a s Emacs style incremental search forward.
964         C-r Emacs style reverse i-search.
965       Specials:
966           There  are  however  some keys that act differently than in vi.  Vi
967           does not allow one to yank rectangular blocks of text,  but  screen
968           does. Press
969         c  or  C  to  set the left or right margin respectively. If no repeat
970           count is given, both default to the current cursor position.
971           Example: Try this on a rather full text screen: "C-a [ M 20 l SPACE
972           c 10 l 5 j C SPACE".
973
974           This  moves  one to the middle line of the screen, moves in 20 col‐
975           umns left, marks the beginning of the paste buffer, sets  the  left
976           column, moves 5 columns down, sets the right column, and then marks
977           the end of the paste buffer. Now try:
978           "C-a [ M 20 l SPACE 10 l 5 j SPACE"
979
980           and notice the difference in the amount of text copied.
981         J joins lines. It toggles between 4 modes: lines separated by a  new‐
982           line  character  (012),  lines glued seamless, lines separated by a
983           single whitespace and comma separated  lines.  Note  that  you  can
984           prepend  the newline character with a carriage return character, by
985           issuing a "crlf on".
986         v is for all the vi users with ":set numbers" - it toggles  the  left
987           margin between column 9 and 1. Press
988         a  before the final space key to toggle in append mode. Thus the con‐
989           tents of the paste buffer will not be overwritten, but is  appended
990           to.
991         A toggles in append mode and sets a (second) mark.
992         >  sets the (second) mark and writes the contents of the paste buffer
993           to the screen-exchange file (/tmp/screen-exchange per default) once
994           copy-mode is finished.
995           This  example  demonstrates how to dump the whole scrollback buffer
996           to that file: "C-A [ g SPACE G $ >".
997         C-g gives information about the current line and column.
998         x exchanges the first mark and the current cursor position.  You  can
999           use this to adjust an already placed mark.
1000         @ does nothing. Does not even exit copy mode.
1001         All keys not described here exit copy mode.
1002
1003       copy_reg [key]
1004
1005       No longer exists, use "readreg" instead.
1006
1007       crlf [on|off]
1008
1009       This  affects  the copying of text regions with the `C-a [' command. If
1010       it is set to `on',  lines  will  be  separated  by  the  two  character
1011       sequence  `CR' - `LF'.  Otherwise (default) only `LF' is used.  When no
1012       parameter is given, the state is toggled.
1013
1014       debug on|off
1015
1016       Turns runtime debugging on or off. If screen  has  been  compiled  with
1017       option  -DDEBUG  debugging available and is turned on per default. Note
1018       that this command only affects debugging output from the main  "SCREEN"
1019       process  correctly.  Debug  output  from attacher processes can only be
1020       turned off once and forever.
1021
1022       defc1 on|off
1023
1024       Same as the c1 command except that the default setting for new  windows
1025       is changed. Initial setting is `on'.
1026
1027       defautonuke on|off
1028
1029       Same  as  the  autonuke command except that the default setting for new
1030       displays is changed. Initial setting is `off'.  Note that you  can  use
1031       the  special  `AN' terminal capability if you want to have a dependency
1032       on the terminal type.
1033
1034       defbce on|off
1035
1036       Same as the bce command except that the default setting for new windows
1037       is changed. Initial setting is `off'.
1038
1039       defbreaktype [tcsendbreak|TIOCSBRK |TCSBRK]
1040
1041       Choose  one  of  the available methods of generating a break signal for
1042       terminal devices. The preferred methods are tcsendbreak  and  TIOCSBRK.
1043       The  third, TCSBRK, blocks the complete screen session for the duration
1044       of the break, but it may be the  only  way  to  generate  long  breaks.
1045       Tcsendbreak and TIOCSBRK may or may not produce long breaks with spikes
1046       (e.g. 4 per second). This is not only system dependant, this also  dif‐
1047       fers  between  serial  board  drivers.   Calling "defbreaktype" with no
1048       parameter displays the current setting.
1049
1050       defcharset [set]
1051
1052       Like the charset command except that the default setting for  new  win‐
1053       dows is changed. Shows current default if called without argument.
1054
1055       defescape xy
1056
1057       Set  the default command characters. This is equivalent to the "escape"
1058       except that it is useful multiuser sessions only. In a  multiuser  ses‐
1059       sion  "escape" changes the command character of the calling user, where
1060       "defescape" changes the default command characters for users that  will
1061       be added later.
1062
1063       defflow on|off|auto [interrupt]
1064
1065       Same  as  the flow command except that the default setting for new win‐
1066       dows is changed. Initial setting is `auto'.  Specifying  "defflow  auto
1067       interrupt" is the same as the command-line options -fa and -i.
1068
1069       defgr on|off
1070
1071       Same  as the gr command except that the default setting for new windows
1072       is changed. Initial setting is `off'.
1073
1074       defhstatus [status]
1075
1076       The hardstatus line that all new windows will get  is  set  to  status.
1077       This  command  is useful to make the hardstatus of every window display
1078       the window number or title or the like.  Status may  contain  the  same
1079       directives  as in the window messages, but the directive escape charac‐
1080       ter is '^E' (octal 005) instead of '%'.  This was done to make a misin‐
1081       terpretation  of program generated hardstatus lines impossible.  If the
1082       parameter status is omitted, the current default string  is  displayed.
1083       Per default the hardstatus line of new windows is empty.
1084
1085       defencoding enc
1086
1087       Same  as  the  encoding command except that the default setting for new
1088       windows is changed. Initial setting is the encoding taken from the ter‐
1089       minal.
1090
1091       deflog on|off
1092
1093       Same as the log command except that the default setting for new windows
1094       is changed. Initial setting is `off'.
1095
1096       deflogin on|off
1097
1098       Same as the login command except that the default setting for new  win‐
1099       dows is changed. This is initialized with `on' as distributed (see con‐
1100       fig.h.in).
1101
1102       defmode mode
1103
1104       The mode of each newly allocated pseudo-tty is set to mode.  Mode is an
1105       octal number.  When no "defmode" command is given, mode 0622 is used.
1106
1107       defmonitor on|off
1108
1109       Same  as  the  monitor  command except that the default setting for new
1110       windows is changed. Initial setting is `off'.
1111
1112       defnonblock on|off|numsecs
1113
1114       Same as the nonblock command except that the default setting  for  dis‐
1115       plays is changed. Initial setting is `off'.
1116
1117       defobuflimit limit
1118
1119       Same  as  the obuflimit command except that the default setting for new
1120       displays is changed. Initial setting is 256 bytes.  Note that  you  can
1121       use  the  special 'OL' terminal capability if you want to have a depen‐
1122       dency on the terminal type.
1123
1124       defscrollback num
1125
1126       Same as the scrollback command except that the default setting for  new
1127       windows is changed. Initial setting is 100.
1128
1129       defshell command
1130
1131       Synonym to the shell command. See there.
1132
1133       defsilence on|off
1134
1135       Same  as  the  silence  command except that the default setting for new
1136       windows is changed. Initial setting is `off'.
1137
1138       defslowpaste msec"
1139
1140       Same as the slowpaste command except that the default setting  for  new
1141       windows is changed. Initial setting is 0 milliseconds, meaning `off'.
1142
1143       defutf8 on|off
1144
1145       Same  as  the utf8 command except that the default setting for new win‐
1146       dows is changed. Initial setting is `on' if  screen  was  started  with
1147       "-U", otherwise `off'.
1148
1149       defwrap on|off
1150
1151       Same  as  the wrap command except that the default setting for new win‐
1152       dows is changed. Initially line-wrap is on and can be toggled with  the
1153       "wrap" command ("C-a r") or by means of "C-a : wrap on|off".
1154
1155       defwritelock on|off|auto
1156
1157       Same  as  the writelock command except that the default setting for new
1158       windows is changed. Initially writelocks will off.
1159
1160       defzombie [keys]
1161
1162       Synonym to the zombie command. Both currently change the default.   See
1163       there.
1164
1165       detach [-h]
1166
1167       Detach  the  screen session (disconnect it from the terminal and put it
1168       into the background).  This returns you to the shell where you  invoked
1169       screen.   A  detached screen can be resumed by invoking screen with the
1170       -r option (see also section  "COMMAND-LINE  OPTIONS").  The  -h  option
1171       tells  screen  to  immediately  close  the  connection  to the terminal
1172       ("hangup").
1173
1174       dinfo
1175
1176       Show what screen thinks about your terminal. Useful if you want to know
1177       why features like color or the alternate charset don't work.
1178
1179       displays
1180
1181       Shows  a  tabular  listing  of  all currently connected user front-ends
1182       (displays).  This is most useful for multiuser sessions.
1183
1184       digraph [preset]
1185
1186       This command prompts the user for a  digraph  sequence.  The  next  two
1187       characters  typed  are  looked  up in a builtin table and the resulting
1188       character is inserted in the input stream. For  example,  if  the  user
1189       enters  'a"',  an  a-umlaut  will  be  inserted. If the first character
1190       entered is a 0 (zero), screen will treat the following  characters  (up
1191       to  three) as an octal number instead.  The optional argument preset is
1192       treated as user input, thus one can create an "umlaut" key.  For  exam‐
1193       ple  the  command "bindkey ^K digraph '"'" enables the user to generate
1194       an a-umlaut by typing CTRL-K a.
1195
1196       dumptermcap
1197
1198       Write the termcap entry for the virtual terminal optimized for the cur‐
1199       rently   active   window   to   the   file  ".termcap"  in  the  user's
1200       "$HOME/.screen" directory (or wherever screen stores its  sockets.  See
1201       the  "FILES"  section  below).   This termcap entry is identical to the
1202       value of the environment variable $TERMCAP that is set up by screen for
1203       each  window.  For  terminfo  based systems you will need to run a con‐
1204       verter like captoinfo and then compile the entry with tic.
1205
1206       echo [-n] message
1207
1208       The echo command may be used to annoy screen users with a  'message  of
1209       the  day'.  Typically  installed in a global /etc/screenrc.  The option
1210       "-n" may be used to suppress the line feed.  See also "sleep".  Echo is
1211       also useful for online checking of environment variables.
1212
1213       encoding enc [enc]
1214
1215       Tell  screen how to interpret the input/output. The first argument sets
1216       the encoding of the current window. Each window can emulate a different
1217       encoding.  The optional second parameter overwrites the encoding of the
1218       connected terminal. It should never be needed as screen uses the locale
1219       setting to detect the encoding.  There is also a way to select a termi‐
1220       nal encoding depending on the terminal type by using the  "KJ"  termcap
1221       entry.
1222
1223       Supported  encodings  are eucJP, SJIS, eucKR, eucCN, Big5, GBK, KOI8-R,
1224       CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4,  ISO8859-5,  ISO8859-6,
1225       ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis.
1226
1227       See also "defencoding", which changes the default setting of a new win‐
1228       dow.
1229
1230       escape xy
1231
1232       Set the command character to x and the character generating  a  literal
1233       command  character  (by triggering the "meta" command) to y (similar to
1234       the -e option).  Each argument is either a  single  character,  a  two-
1235       character  sequence  of the form "^x" (meaning "C-x"), a backslash fol‐
1236       lowed by an octal number (specifying the ASCII code of the  character),
1237       or  a  backslash  followed by a second character, such as "\^" or "\\".
1238       The default is "^Aa".
1239
1240       eval command1 [command2 ...]
1241
1242       Parses and executes each argument as separate command.
1243
1244       exec [[fdpat] newcommand [args ...]]
1245
1246       Run a unix subprocess (specified by an executable path  newcommand  and
1247       its optional arguments) in the current window. The flow of data between
1248       newcommands stdin/stdout/stderr, the process originally started in  the
1249       window  (let  us call it "application-process") and screen itself (win‐
1250       dow) is controlled by the filedescriptor pattern fdpat.   This  pattern
1251       is  basically a three character sequence representing stdin, stdout and
1252       stderr of newcommand. A dot (.) connects the file descriptor to screen.
1253       An  exclamation  mark (!) causes the file descriptor to be connected to
1254       the application-process. A colon (:) combines both.  User input will go
1255       to  newcommand unless newcommand receives the application-process' out‐
1256       put (fdpats first character is `!' or `:') or  a  pipe  symbol  (|)  is
1257       added (as a fourth character) to the end of fdpat.
1258       Invoking  `exec' without arguments shows name and arguments of the cur‐
1259       rently running subprocess in this window. Only one  subprocess  a  time
1260       can be running in each window.
1261       When  a subprocess is running the `kill' command will affect it instead
1262       of the windows process.
1263       Refer to the postscript file `doc/fdpat.ps' for a  confusing  illustra‐
1264       tion  of  all  21  possible combinations. Each drawing shows the digits
1265       2,1,0 representing the three file descriptors of  newcommand.  The  box
1266       marked  `W'  is  the  usual pty that has the application-process on its
1267       slave side.  The box marked `P' is  the  secondary  pty  that  now  has
1268       screen at its master side.
1269
1270       Abbreviations:
1271       Whitespace  between  the  word  `exec' and fdpat and the command can be
1272       omitted. Trailing dots and a fdpat consisting only of dots can be omit‐
1273       ted.  A  simple `|' is synonymous for the pattern `!..|'; the word exec
1274       can be omitted here and can always be replaced by `!'.
1275
1276       Examples:
1277
1278              exec ... /bin/sh
1279              exec /bin/sh
1280              !/bin/sh
1281
1282       Creates another shell in the same window, while the original  shell  is
1283       still  running.  Output  of  both shells is displayed and user input is
1284       sent to the new /bin/sh.
1285
1286              exec !.. stty 19200
1287              exec ! stty 19200
1288              !!stty 19200
1289
1290       Set the speed of the window's tty. If your  stty  command  operates  on
1291       stdout, then add another `!'.
1292
1293              exec !..| less
1294              |less
1295
1296       This  adds  a  pager to the window output. The special character `|' is
1297       needed to give the user control over the pager  although  it  gets  its
1298       input  from  the  window's process. This works, because less listens on
1299       stderr (a behavior that screen would not expect without the  `|')  when
1300       its  stdin  is  not a tty.  Less versions newer than 177 fail miserably
1301       here; good old pg still works.
1302
1303              !:sed -n s/.*Error.*/\007/p
1304
1305       Sends window output to both, the user and  the  sed  command.  The  sed
1306       inserts  an  additional  bell character (oct. 007) to the window output
1307       seen by screen.  This will cause "Bell in window x" messages,  whenever
1308       the string "Error" appears in the window.
1309
1310       fit
1311
1312       Change  the window size to the size of the current region. This command
1313       is needed because screen doesn't adapt the window size automatically if
1314       the window is displayed more than once.
1315
1316       flow [on|off|auto]
1317
1318       Sets  the  flow-control  mode  for  this window.  Without parameters it
1319       cycles the current window's flow-control setting  from  "automatic"  to
1320       "on"  to  "off".  See the discussion on "FLOW-CONTROL" later on in this
1321       document for full details and note, that this is subject to  change  in
1322       future releases.  Default is set by `defflow'.
1323
1324       focus [up|down|top|bottom]
1325
1326       Move  the  input focus to the next region. This is done in a cyclic way
1327       so that the top region is selected after the bottom one. If no  subcom‐
1328       mand is given it defaults to `down'. `up' cycles in the opposite order,
1329       `top' and `bottom' go to the top and bottom region respectively. Useful
1330       bindings are (j and k as in vi)
1331           bind j focus down
1332           bind k focus up
1333           bind t focus top
1334           bind b focus bottom
1335
1336       gr [on|off]
1337
1338       Turn GR charset switching on/off. Whenever screen sees an input charac‐
1339       ter with the 8th bit set, it will use the charset stored in the GR slot
1340       and  print  the  character  with the 8th bit stripped. The default (see
1341       also "defgr") is not to process  GR  switching  because  otherwise  the
1342       ISO88591 charset would not work.
1343
1344       hardcopy [-h] [file]
1345
1346       Writes  out  the  currently displayed image to the file file, or, if no
1347       filename is specified, to hardcopy.n in the default directory, where  n
1348       is the number of the current window.  This either appends or overwrites
1349       the file if it exists. See below.  If the option -h is specified,  dump
1350       also the contents of the scrollback buffer.
1351
1352       hardcopy_append on|off
1353
1354       If set to "on", screen will append to the "hardcopy.n" files created by
1355       the command "C-a h", otherwise these files are overwritten  each  time.
1356       Default is `off'.
1357
1358       hardcopydir directory
1359
1360       Defines  a  directory  where  hardcopy  files will be placed. If unset,
1361       hardcopys are dumped in screen's current working directory.
1362
1363       hardstatus [on|off]
1364       hardstatus [always]lastline|message|ignore [string]
1365       hardstatus string [string]
1366
1367       This command configures the use and emulation of the  terminal's  hard‐
1368       status  line.  The first form toggles whether screen will use the hard‐
1369       ware status line to display messages. If the  flag  is  set  to  `off',
1370       these  messages are overlaid in reverse video mode at the display line.
1371       The default setting is `on'.
1372
1373       The second form tells screen what to do if the terminal doesn't have  a
1374       hardstatus  line  (i.e.  the  termcap/terminfo capabilities "hs", "ts",
1375       "fs" and "ds" are not set). If the type "lastline" is used, screen will
1376       reserve the last line of the display for the hardstatus. "message" uses
1377       screen's message mechanism and "ignore" tells screen never  to  display
1378       the  hardstatus.   If  you prepend the word "always" to the type (e.g.,
1379       "alwayslastline"), screen will use the type even if the  terminal  sup‐
1380       ports a hardstatus.
1381
1382       The  third form specifies the contents of the hardstatus line.  '%h' is
1383       used as default string, i.e. the stored hardstatus of the current  win‐
1384       dow  (settable  via  "ESC]0;<string>^G"  or "ESC_<string>ESC\") is dis‐
1385       played.  You can customize this to any string you  like  including  the
1386       escapes  from  the "STRING ESCAPES" chapter. If you leave out the argu‐
1387       ment string, the current string is displayed.
1388
1389       You can mix the second and third form by providing the string as  addi‐
1390       tional argument.
1391
1392       height [-w|-d] [lines [cols]]
1393
1394       Set the display height to a specified number of lines. When no argument
1395       is given it toggles between 24 and 42 lines display. You can also spec‐
1396       ify  a  width  if  you want to change both values.  The -w option tells
1397       screen to leave the display size unchanged  and  just  set  the  window
1398       size, -d vice versa.
1399
1400       help [-c class]
1401
1402       Not  really  a  online help, but displays a help screen showing you all
1403       the key bindings.  The first pages list all the internal commands  fol‐
1404       lowed  by  their  current  bindings.  Subsequent pages will display the
1405       custom commands, one command per key.  Press  space  when  you're  done
1406       reading  each  page, or return to exit early.  All other characters are
1407       ignored. If the "-c" option is given, display all  bound  commands  for
1408       the specified command class.  See also "DEFAULT KEY BINDINGS" section.
1409
1410       history
1411
1412       Usually  users  work  with  a shell that allows easy access to previous
1413       commands.  For example csh has the command "!!" to repeat the last com‐
1414       mand executed.  Screen allows you to have a primitive way of re-calling
1415       "the command that started ...": You just type the first letter of  that
1416       command, then hit `C-a {' and screen tries to find a previous line that
1417       matches with the `prompt character' to the left  of  the  cursor.  This
1418       line  is  pasted into this window's input queue.  Thus you have a crude
1419       command history (made up by the visible window and its scrollback  buf‐
1420       fer).
1421
1422       hstatus status
1423
1424       Change the window's hardstatus line to the string status.
1425
1426       idle [timeout [cmd args]]
1427
1428       Sets  a command that is run after the specified number of seconds inac‐
1429       tivity is reached. This command will normally be the "blanker"  command
1430       to  create  a  screen blanker, but it can be any screen command.  If no
1431       command is specified, only the timeout is set. A timeout  of  zero  (ot
1432       the  special  timeout  off)  disables  the  timer.  If no arguments are
1433       given, the current settings are displayed.
1434
1435       ignorecase [on|off]
1436
1437       Tell screen to ignore the case of characters in  searches.  Default  is
1438       `off'.
1439
1440       info
1441
1442       Uses  the  message  line  to display some information about the current
1443       window: the cursor position in the form  "(column,row)"  starting  with
1444       "(1,1)",  the terminal width and height plus the size of the scrollback
1445       buffer in lines, like in "(80,24)+50",  the  current  state  of  window
1446       XON/XOFF  flow  control  is shown like this (See also section FLOW CON‐
1447       TROL):
1448
1449         +flow     automatic flow control, currently on.
1450         -flow     automatic flow control, currently off.
1451         +(+)flow  flow control enabled. Agrees with automatic control.
1452         -(+)flow  flow control disabled. Disagrees with automatic control.
1453         +(-)flow  flow control enabled. Disagrees with automatic control.
1454         -(-)flow  flow control disabled. Agrees with automatic control.
1455
1456       The current line wrap setting (`+wrap' indicates enabled, `-wrap'  not)
1457       is  also  shown. The flags `ins', `org', `app', `log', `mon' or `nored'
1458       are displayed when the window is in insert mode, origin mode,  applica‐
1459       tion-keypad  mode,  has  output logging, activity monitoring or partial
1460       redraw enabled.
1461
1462       The currently active character set (G0, G1, G2, or G3)  and  in  square
1463       brackets  the  terminal character sets that are currently designated as
1464       G0 through G3 is shown. If the window is  in  UTF-8  mode,  the  string
1465       "UTF-8" is shown instead.
1466
1467       Additional  modes  depending on the type of the window are displayed at
1468       the end of the status line (See also chapter "WINDOW TYPES").
1469       If the state machine of the  terminal  emulator  is  in  a  non-default
1470       state,  the  info line is started with a string identifying the current
1471       state.
1472       For system information use the "time" command.
1473
1474       ins_reg [key]
1475
1476       No longer exists, use "paste" instead.
1477
1478       kill
1479
1480       Kill current window.
1481       If there is an `exec' command running then it is killed. Otherwise  the
1482       process  (shell) running in the window receives a HANGUP condition, the
1483       window structure is removed  and  screen  (your  display)  switches  to
1484       another  window.   When  the  last  window  is destroyed, screen exits.
1485       After a kill screen switches to the previously displayed window.
1486       Note: Emacs users should keep this command  in  mind,  when  killing  a
1487       line.   It  is recommended not to use "C-a" as the screen escape key or
1488       to rebind kill to "C-a K".
1489
1490       lastmsg
1491
1492       Redisplay the last contents of  the  message/status  line.   Useful  if
1493       you're  typing  when  a message appears, because  the message goes away
1494       when you press a key (unless your terminal has a hardware status line).
1495       Refer to the commands "msgwait" and "msgminwait" for fine tuning.
1496
1497       license
1498
1499       Display  the  disclaimer  page. This is done whenever screen is started
1500       without  options,  which  should  be  often  enough.   See   also   the
1501       "startup_message" command.
1502
1503       lockscreen
1504
1505       Lock  this  display.   Call  a  screenlock  program  (/local/bin/lck or
1506       /usr/bin/lock or a builtin if no other is available). Screen  does  not
1507       accept  any  command keys until this program terminates. Meanwhile pro‐
1508       cesses in  the  windows  may  continue,  as  the  windows  are  in  the
1509       `detached'  state.  The  screenlock  program may be changed through the
1510       environment variable $LOCKPRG (which must be  set  in  the  shell  from
1511       which screen is started) and is executed with the user's uid and gid.
1512       Warning:  When you leave other shells unlocked and you have no password
1513       set on screen, the lock is void: One could  easily  re-attach  from  an
1514       unlocked shell. This feature should rather be called `lockterminal'.
1515
1516       log [on|off]
1517
1518       Start/stop writing output of the current window to a file "screenlog.n"
1519       in the window's default directory, where n is the number of the current
1520       window.  This filename can be changed with the `logfile' command. If no
1521       parameter is given, the state of logging is toggled. The session log is
1522       appended to the previous contents of the file if it already exists. The
1523       current contents and the contents of the  scrollback  history  are  not
1524       included in the session log.  Default is `off'.
1525
1526       logfile filename
1527       logfile flush secs
1528
1529       Defines  the name the logfiles will get. The default is "screenlog.%n".
1530       The second form changes the number of seconds screen will  wait  before
1531       flushing the logfile buffer to the file-system. The default value is 10
1532       seconds.
1533
1534       login [on|off]
1535
1536       Adds or removes the entry in the utmp database  file  for  the  current
1537       window.  This controls if the window is `logged in'.  When no parameter
1538       is given, the login state of the window is  toggled.   Additionally  to
1539       that  toggle,  it  is convenient having a `log in' and a `log out' key.
1540       E.g. `bind I login on' and `bind O login off' will map these keys to be
1541       C-a  I  and C-a O.  The default setting (in config.h.in) should be "on"
1542       for a screen that runs under suid-root.  Use the "deflogin" command  to
1543       change  the default login state for new windows. Both commands are only
1544       present when screen has been compiled with utmp support.
1545
1546       logtstamp [on|off]
1547       logtstamp after [secs]
1548       logtstamp string [string]
1549
1550       This command controls logfile time-stamp mechanism of screen.  If time-
1551       stamps  are  turned  "on",  screen adds a string containing the current
1552       time to the logfile after two minutes of inactivity.  When output  con‐
1553       tinues  and  more  than another two minutes have passed, a second time-
1554       stamp is added to document the restart of the output.  You  can  change
1555       this  timeout  with  the  second form of the command. The third form is
1556       used for customizing the time-stamp string (`-- %n:%t -- time-stamp  --
1557       %M/%d/%y %c:%s --\n' by default).
1558
1559       mapdefault
1560
1561       Tell  screen  that the next input character should only be looked up in
1562       the default bindkey table. See also "bindkey".
1563
1564       mapnotnext
1565
1566       Like mapdefault, but don't even look in the default bindkey table.
1567
1568       maptimeout [timo]
1569
1570       Set the inter-character timer for input sequence detection to a timeout
1571       of  timo ms. The default timeout is 300ms. Maptimeout with no arguments
1572       shows the current setting.  See also "bindkey".
1573
1574       markkeys string
1575
1576       This is a method of changing the keymap  used  for  copy/history  mode.
1577       The  string  is made up of oldchar=newchar pairs which are separated by
1578       `:'. Example: The string "B=^B:F=^F" will change the keys `C-b' and `C-
1579       f' to the vi style binding (scroll up/down fill page).  This happens to
1580       be the  default  binding  for  `B'  and  `F'.   The  command  "markkeys
1581       h=^B:l=^F:$=^E" would set the mode for an emacs-style binding.  If your
1582       terminal sends characters, that cause you to abort copy mode, then this
1583       command  may help by binding these characters to do nothing.  The no-op
1584       character is `@' and is used like this: "markkeys @=L=H" if you do  not
1585       want to use the `H' or `L' commands any longer.  As shown in this exam‐
1586       ple, multiple keys can be assigned to one function in a  single  state‐
1587       ment.
1588
1589       maxwin num
1590
1591       Set  the  maximum  window  number  screen  will  create. Doesn't affect
1592       already existing windows. The number may only be decreased.
1593
1594       meta
1595
1596       Insert the command  character  (C-a)  in  the  current  window's  input
1597       stream.
1598
1599       monitor [on|off]
1600
1601       Toggles  activity  monitoring of windows.  When monitoring is turned on
1602       and an affected window  is  switched  into  the  background,  you  will
1603       receive  the  activity  notification  message in the status line at the
1604       first sign of output and the window will also be marked with an `@'  in
1605       the  window-status  display.   Monitoring is initially off for all win‐
1606       dows.
1607
1608       msgminwait sec
1609
1610       Defines the time screen delays a new message when one message  is  cur‐
1611       rently displayed.  The default is 1 second.
1612
1613       msgwait sec
1614
1615       Defines  the  time a message is displayed if screen is not disturbed by
1616       other activity. The default is 5 seconds.
1617
1618       multiuser on|off
1619
1620       Switch between singleuser and multiuser mode. Standard screen operation
1621       is  singleuser.  In  multiuser  mode  the  commands `acladd', `aclchg',
1622       `aclgrp' and `acldel' can be used to enable (and disable)  other  users
1623       accessing this screen session.
1624
1625       nethack on|off
1626
1627       Changes the kind of error messages used by screen.  When you are famil‐
1628       iar with the game "nethack", you may enjoy the  nethack-style  messages
1629       which will often blur the facts a little, but are much funnier to read.
1630       Anyway, standard messages often tend to be unclear as well.
1631       This option is only available if screen was compiled with  the  NETHACK
1632       flag defined. The default setting is then determined by the presence of
1633       the environment variable $NETHACKOPTIONS.
1634
1635       next
1636
1637       Switch to the next window.  This command  can  be  used  repeatedly  to
1638       cycle through the list of windows.
1639
1640       nonblock [on|off|numsecs]
1641
1642       Tell  screen  how to deal with user interfaces (displays) that cease to
1643       accept output. This can happen if a user presses ^S or a TCP/modem con‐
1644       nection gets cut but no hangup is received. If nonblock is off (this is
1645       the default) screen waits until the display restarts to accept the out‐
1646       put.  If  nonblock is on, screen waits until the timeout is reached (on
1647       is treated as 1s). If the display  still  doesn't  receive  characters,
1648       screen will consider it "blocked" and stop sending characters to it. If
1649       at some time it restarts to accept characters, screen will unblock  the
1650       display and redisplay the updated window contents.
1651
1652       number [n]
1653
1654       Change  the  current  windows  number. If the given number n is already
1655       used by another window, both windows  exchange  their  numbers.  If  no
1656       argument is specified, the current window number (and title) is shown.
1657
1658       obuflimit [limit]
1659
1660       If  the  output buffer contains more bytes than the specified limit, no
1661       more data will be read from the windows. The default value is  256.  If
1662       you  have  a  fast  display (like xterm), you can set it to some higher
1663       value. If no argument is specified, the current setting is displayed.
1664
1665       only
1666
1667       Kill all regions but the current one.
1668
1669       other
1670
1671       Switch to the window displayed  previously.  If  this  window  does  no
1672       longer exist, other has the same effect as next.
1673
1674       partial on|off
1675
1676       Defines  whether  the  display  should be refreshed (as with redisplay)
1677       after switching to the current window. This command  only  affects  the
1678       current  window.   To immediately affect all windows use the allpartial
1679       command.  Default is `off', of course.  This default is fixed, as there
1680       is currently no defpartial command.
1681
1682       password [crypted_pw]
1683
1684       Present a crypted password in your ".screenrc" file and screen will ask
1685       for it, whenever someone attempts to resume a detached. This is  useful
1686       if  you  have  privileged programs running under screen and you want to
1687       protect your session from reattach attempts by another user  masquerad‐
1688       ing as your uid (i.e. any superuser.)  If no crypted password is speci‐
1689       fied, screen prompts twice for typing a password and places its encryp‐
1690       tion  in  the  paste buffer.  Default is `none', this disables password
1691       checking.
1692
1693       paste [registers [dest_reg]]
1694
1695       Write the (concatenated) contents of the  specified  registers  to  the
1696       stdin  queue  of the current window. The register '.' is treated as the
1697       paste buffer. If no parameter is given the user is prompted for a  sin‐
1698       gle  register  to paste.  The paste buffer can be filled with the copy,
1699       history and readbuf commands.  Other registers can be filled  with  the
1700       register, readreg and paste commands.  If paste is called with a second
1701       argument, the contents of the specified registers is  pasted  into  the
1702       named  destination  register  rather than the window. If '.' is used as
1703       the second argument, the displays  paste  buffer  is  the  destination.
1704       Note,  that "paste" uses a wide variety of resources: Whenever a second
1705       argument is specified no current window  is  needed.  When  the  source
1706       specification only contains registers (not the paste buffer) then there
1707       need not be a current display (terminal attached), as the registers are
1708       a global resource. The paste buffer exists once for every user.
1709
1710       pastefont [on|off]
1711
1712       Tell  screen  to  include  font  information  in  the paste buffer. The
1713       default is not to do so. This command is especially  useful  for  multi
1714       character fonts like kanji.
1715
1716       pow_break
1717
1718       Reopen  the  window's  terminal  line  and  send a break condition. See
1719       `break'.
1720
1721       pow_detach
1722
1723       Power detach.  Mainly the same as detach, but also sends a HANGUP  sig‐
1724       nal  to  the  parent process of screen.  CAUTION: This will result in a
1725       logout, when screen was started from your login shell.
1726
1727       pow_detach_msg [message]
1728
1729       The message specified here is output whenever a `Power detach' was per‐
1730       formed.  It  may  be  used  as a replacement for a logout message or to
1731       reset baud rate, etc.  Without parameter, the current message is shown.
1732
1733       prev
1734
1735       Switch to the window with the next lower number.  This command  can  be
1736       used repeatedly to cycle through the list of windows.
1737
1738       printcmd [cmd]
1739
1740       If  cmd  is not an empty string, screen will not use the terminal capa‐
1741       bilities "po/pf" if it detects an ansi print sequence ESC [  5  i,  but
1742       pipe the output into cmd.  This should normally be a command like "lpr"
1743       or "'cat > /tmp/scrprint'".  printcmd without a  command  displays  the
1744       current  setting.  The ansi sequence ESC \ ends printing and closes the
1745       pipe.
1746       Warning: Be careful with this command! If other user have write  access
1747       to your terminal, they will be able to fire off print commands.
1748
1749       process [key]
1750
1751       Stuff the contents of the specified register into screen's input queue.
1752       If no argument is given you are prompted for a register name. The  text
1753       is  parsed  as  if  it had been typed in from the user's keyboard. This
1754       command can be used to bind multiple actions to a single key.
1755
1756       quit
1757
1758       Kill all windows and terminate screen.  Note that on VT100-style termi‐
1759       nals  the keys C-4 and C-\ are identical.  This makes the default bind‐
1760       ings dangerous: Be careful not to type C-a C-4  when  selecting  window
1761       no.  4.  Use the empty bind command (as in "bind '^\'") to remove a key
1762       binding.
1763
1764       readbuf [-e encoding] [filename]
1765
1766       Reads the contents of the specified file into the  paste  buffer.   You
1767       can tell screen the encoding of the file via the -e option.  If no file
1768       is specified, the screen-exchange filename is used.  See also  "buffer‐
1769       file" command.
1770
1771       readreg [-e encoding] [register [filename]]
1772
1773       Does  one of two things, dependent on number of arguments: with zero or
1774       one arguments it it duplicates the paste buffer contents into the  reg‐
1775       ister  specified  or entered at the prompt. With two arguments it reads
1776       the contents of the named file into the register, just as readbuf reads
1777       the  screen-exchange  file  into the paste buffer.  You can tell screen
1778       the encoding of the file via the -e option.  The following example will
1779       paste the system's password file into the screen window (using register
1780       p, where a copy remains):
1781
1782                   C-a : readreg p /etc/passwd
1783                   C-a : paste p
1784
1785       redisplay
1786
1787       Redisplay the current window. Needed to get a full  redisplay  when  in
1788       partial redraw mode.
1789
1790       register [-e encoding] key string
1791
1792       Save  the  specified  string  to the register key.  The encoding of the
1793       string can be specified via the -e option.  See also the  "paste"  com‐
1794       mand.
1795
1796       remove
1797
1798       Kill the current region. This is a no-op if there is only one region.
1799
1800       removebuf
1801
1802       Unlinks  the  screen-exchange  file used by the commands "writebuf" and
1803       "readbuf".
1804
1805       reset
1806
1807       Reset the virtual  terminal  to  its  "power-on"  values.  Useful  when
1808       strange  settings  (like  scroll regions or graphics character set) are
1809       left over from an application.
1810
1811       resize
1812
1813       Resize the current region. The space will be removed from or  added  to
1814       the region below or if there's not enough space from the region above.
1815
1816              resize +N   increase current region height by N
1817
1818              resize -N   decrease current region height by N
1819
1820              resize  N   set current region height to N
1821
1822              resize  =   make all windows equally high
1823
1824              resize  max maximize current region height
1825
1826              resize  min minimize current region height
1827
1828       screen [-opts] [n] [cmd [args]]
1829
1830       Establish  a  new  window.  The flow-control options (-f, -fn and -fa),
1831       title (a.k.a.) option (-t), login options (-l and -ln) , terminal  type
1832       option  (-T <term>), the all-capability-flag (-a) and scrollback option
1833       (-h <num>) may be specified with each command.  The option  (-M)  turns
1834       monitoring on for this window.  The option (-L) turns output logging on
1835       for this window.  If an optional number n in the range 0..9  is  given,
1836       the  window  number  n  is assigned to the newly created window (or, if
1837       this number is already in-use, the next available number).  If  a  com‐
1838       mand  is  specified  after "screen", this command (with the given argu‐
1839       ments) is started in the window; otherwise, a shell is created.   Thus,
1840       if your ".screenrc" contains the lines
1841
1842                   # example for .screenrc:
1843                   screen 1
1844                   screen -fn -t foobar -L 2 telnet foobar
1845
1846       screen creates a shell window (in window #1) and a window with a TELNET
1847       connection to the machine foobar (with no flow-control using the  title
1848       "foobar"  in window #2) and will write a logfile ("screenlog.2") of the
1849       telnet session.  Note, that unlike previous versions of screen no addi‐
1850       tional default window is created when "screen" commands are included in
1851       your ".screenrc" file. When the  initialization  is  completed,  screen
1852       switches  to  the  last  window specified in your .screenrc file or, if
1853       none, opens a default window #0.
1854       Screen has built in some functionality of "cu" and "telnet".  See  also
1855       chapter "WINDOW TYPES".
1856
1857       scrollback num
1858
1859       Set  the  size  of the scrollback buffer for the current windows to num
1860       lines. The default scrollback is 100 lines.  See also  the  "defscroll‐
1861       back" command and use "C-a i" to view the current setting.
1862
1863       select [WindowID]
1864
1865       Switch to the window identified by WindowID.  This can be a prefix of a
1866       window title (alphanumeric window name) or a window number.  The param‐
1867       eter  is  optional  and if omitted, you get prompted for an identifier.
1868       When a new  window  is  established,  the  first  available  number  is
1869       assigned  to  this  window.  Thus, the first window can be activated by
1870       "select 0".  The number of windows is limited at  compile-time  by  the
1871       MAXWIN  configuration  parameter.  There are two special WindowIDs, "-"
1872       selects the internal blank window and "." selects the  current  window.
1873       The latter is useful if used with screen's "-X" option.
1874
1875       sessionname [name]
1876
1877       Rename  the  current  session.  Note,  that for "screen -list" the name
1878       shows up with the process-id prepended. If the argument "name" is omit‐
1879       ted,  the name of this session is displayed. Caution: The $STY environ‐
1880       ment variables still reflects the old name. This may result  in  confu‐
1881       sion.  The default is constructed from the tty and host names.
1882
1883       setenv [var [string]]
1884
1885       Set the environment variable var to value string.  If only var is spec‐
1886       ified, the user will be prompted to enter a value.   If  no  parameters
1887       are  specified,  the user will be prompted for both variable and value.
1888       The environment is inherited by all subsequently forked shells.
1889
1890       setsid [on|off]
1891
1892       Normally screen uses different sessions and process groups for the win‐
1893       dows. If setsid is turned off, this is not done anymore and all windows
1894       will be in the same process group as the screen backend  process.  This
1895       also  breaks job-control, so be careful.  The default is on, of course.
1896       This command is probably useful only in rare circumstances.
1897
1898       shell command
1899
1900       Set the command to be used to create a new shell.  This  overrides  the
1901       value of the environment variable $SHELL.  This is useful if you'd like
1902       to run a tty-enhancer which is expecting to execute the program  speci‐
1903       fied  in  $SHELL. If the command begins with a '-' character, the shell
1904       will be started as a login-shell.
1905
1906       shelltitle title
1907
1908       Set the title for all shells created during startup or by the  C-A  C-c
1909       command.   For  details about what a title is, see the discussion enti‐
1910       tled "TITLES (naming windows)".
1911
1912       silence [on|off|sec]
1913
1914       Toggles silence monitoring of windows.  When silence is turned  on  and
1915       an  affected  window  is switched into the background, you will receive
1916       the silence notification message in the status line after  a  specified
1917       period of inactivity (silence). The default timeout can be changed with
1918       the `silencewait' command or by specifying a number of seconds  instead
1919       of `on' or `off'.  Silence is initially off for all windows.
1920
1921       silencewait sec
1922
1923       Define  the  time  that  all  windows monitored for silence should wait
1924       before displaying a message. Default 30 seconds.
1925
1926       sleep num
1927
1928       This command will pause the execution of a .screenrc file for num  sec‐
1929       onds.   Keyboard  activity  will end the sleep.  It may be used to give
1930       users a chance to read the messages output by "echo".
1931
1932       slowpaste msec
1933
1934       Define the speed at which text is inserted into the current  window  by
1935       the paste ("C-a ]") command.  If the slowpaste value is nonzero text is
1936       written character by character.  screen will make a pause of msec  mil‐
1937       liseconds after each single character write to allow the application to
1938       process its input. Only use slowpaste if your underlying system exposes
1939       flow control problems while pasting large amounts of text.
1940
1941       source file
1942
1943       Read and execute commands from file file. Source commands may be nested
1944       to a maximum recursion level of ten. If file is not  an  absolute  path
1945       and screen is already processing a source command, the parent directory
1946       of the running source command file is used to search for the  new  com‐
1947       mand file before screen's current directory.
1948
1949       Note  that  termcap/terminfo/termcapinfo  commands only work at startup
1950       and reattach time, so they must be reached  via  the  default  screenrc
1951       files to have an effect.
1952
1953       sorendition [attr [color]]
1954
1955       Change  the  way screen does highlighting for text marking and printing
1956       messages.  See the "STRING ESCAPES" chapter for the syntax of the modi‐
1957       fiers.  The default is currently "=s dd" (standout, default colors).
1958
1959       split
1960
1961       Split  the current region into two new ones. All regions on the display
1962       are resized to make room for the new region. The blank window  is  dis‐
1963       played  on  the  new  region. Use the "remove" or the "only" command to
1964       delete regions.
1965
1966       startup_message on|off
1967
1968       Select whether you want to see the  copyright  notice  during  startup.
1969       Default is `on', as you probably noticed.
1970
1971       stuff string
1972
1973       Stuff  the  string  string  in  the input buffer of the current window.
1974       This is like the "paste" command but with much less overhead.  You can‐
1975       not paste large buffers with the "stuff" command. It is most useful for
1976       key bindings. See also "bindkey".
1977
1978       su [username [password [password2]]
1979
1980       Substitute the user of a display. The command prompts for  all  parame‐
1981       ters  that  are omitted. If passwords are specified as parameters, they
1982       have to be specified un-crypted. The first password is matched  against
1983       the systems passwd database, the second password is matched against the
1984       screen password as set with the commands "acladd" or "password".   "Su"
1985       may  be  useful  for the screen administrator to test multiuser setups.
1986       When the identification fails, the user  has  access  to  the  commands
1987       available  for  user nobody.  These are "detach", "license", "version",
1988       "help" and "displays".
1989
1990       suspend
1991
1992       Suspend screen.  The windows are in the `detached' state, while  screen
1993       is  suspended.  This  feature  relies on the shell being able to do job
1994       control.
1995
1996       term term
1997
1998       In each window's environment screen opens, the $TERM variable is set to
1999       "screen" by default.  But when no description for "screen" is installed
2000       in the local termcap or terminfo data base, you set $TERM to  -  say  -
2001       "vt100".  This  won't do much harm, as screen is VT100/ANSI compatible.
2002       The use of the "term" command is discouraged for  non-default  purpose.
2003       That  is,  one  may want to specify special $TERM settings (e.g. vt100)
2004       for the next "screen rlogin  othermachine"  command.  Use  the  command
2005       "screen -T vt100 rlogin othermachine" rather than setting and resetting
2006       the default.
2007
2008       termcap term terminal-tweaks [window-tweaks]
2009       terminfo term terminal-tweaks [window-tweaks]
2010       termcapinfo term terminal-tweaks [window-tweaks]
2011
2012       Use this command to modify your terminal's termcap entry without  going
2013       through  all  the  hassles involved in creating a custom termcap entry.
2014       Plus, you can optionally customize the termcap generated for  the  win‐
2015       dows.   You have to place these commands in one of the screenrc startup
2016       files, as they are meaningless once the terminal emulator is booted.
2017       If your system works uses the terminfo database  rather  than  termcap,
2018       screen  will  understand  the  `terminfo'  command,  which has the same
2019       effects as the `termcap' command.  Two separate commands are  provided,
2020       as there are subtle syntactic differences, e.g. when parameter interpo‐
2021       lation (using `%') is required. Note that termcap names of the capabil‐
2022       ities have to be used with the `terminfo' command.
2023       In many cases, where the arguments are valid in both terminfo and term‐
2024       cap syntax, you can use the command  `termcapinfo',  which  is  just  a
2025       shorthand  for a pair of `termcap' and `terminfo' commands with identi‐
2026       cal arguments.
2027
2028       The first argument specifies which terminal(s) should  be  affected  by
2029       this definition.  You can specify multiple terminal names by separating
2030       them with `|'s.  Use `*' to match all terminals and `vt*' to match  all
2031       terminals that begin with "vt".
2032
2033       Each  tweak argument contains one or more termcap defines (separated by
2034       `:'s) to be inserted at the start of  the  appropriate  termcap  entry,
2035       enhancing  it  or overriding existing values.  The first tweak modifies
2036       your terminal's termcap, and contains definitions  that  your  terminal
2037       uses to perform certain functions.  Specify a null string to leave this
2038       unchanged (e.g. '').  The second (optional) tweak modifies all the win‐
2039       dow  termcaps,  and  should contain definitions that screen understands
2040       (see the "VIRTUAL TERMINAL" section).
2041
2042       Some examples:
2043
2044              termcap xterm*  LP:hs@
2045
2046       Informs screen that all terminals that begin  with  `xterm'  have  firm
2047       auto-margins  that  allow the last position on the screen to be updated
2048       (LP), but they don't really have a status line (no 'hs' - append `@' to
2049       turn  entries  off).   Note  that we assume `LP' for all terminal names
2050       that start with "vt", but only if you don't specify a  termcap  command
2051       for that terminal.
2052
2053              termcap vt*  LP
2054              termcap vt102|vt220  Z0=\E[?3h:Z1=\E[?3l
2055
2056       Specifies  the  firm-margined  `LP'  capability  for all terminals that
2057       begin with `vt', and the second line will also add the escape-sequences
2058       to switch into (Z0) and back out of (Z1) 132-character-per-line mode if
2059       this is a VT102 or VT220.  (You must specify Z0 and Z1 in your  termcap
2060       to use the width-changing commands.)
2061
2062              termcap vt100  ""  l0=PF1:l1=PF2:l2=PF3:l3=PF4
2063
2064       This  leaves  your vt100 termcap alone and adds the function key labels
2065       to each window's termcap entry.
2066
2067              termcap h19|z19  am@:im=\E@:ei=\EO  dc=\E[P
2068
2069       Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables
2070       the  insert  mode (im) and end-insert (ei) capabilities (the `@' in the
2071       `im' string is after the `=', so it is part of the string).  Having the
2072       `im'  and  `ei' definitions put into your terminal's termcap will cause
2073       screen to automatically advertise the  character-insert  capability  in
2074       each  window's termcap.  Each window will also get the delete-character
2075       capability (dc) added to its termcap, which screen will translate  into
2076       a  line-update  for  the  terminal (we're pretending it doesn't support
2077       character deletion).
2078
2079       If you would like to fully specify each  window's  termcap  entry,  you
2080       should  instead  set  the  $SCREENCAP variable prior to running screen.
2081       See the discussion on the "VIRTUAL TERMINAL" in this  manual,  and  the
2082       termcap(5) man page for more information on termcap definitions.
2083
2084       time [string]
2085
2086       Uses  the  message  line to display the time of day, the host name, and
2087       the load averages over 1, 5, and 15 minutes (if this  is  available  on
2088       your system).  For window specific information use "info".
2089
2090       If a string is specified, it changes the format of the time report like
2091       it is described in the "STRING ESCAPES" chapter. Screen uses a  default
2092       of "%c:%s %M %d %H%? %l%?".
2093
2094       title [windowtitle]
2095
2096       Set the name of the current window to windowtitle. If no name is speci‐
2097       fied, screen prompts for one. This command was known as `aka' in previ‐
2098       ous releases.
2099
2100       unsetenv var
2101
2102       Unset an environment variable.
2103
2104       utf8 [on|off [on|off]]
2105
2106       Change the encoding used in the current window. If utf8 is enabled, the
2107       strings sent to the window will be UTF-8 encoded and vice versa.  Omit‐
2108       ting the parameter toggles the setting. If a second parameter is given,
2109       the display's encoding is also changed (this should rather be done with
2110       screen's  "-U"  option).  See also "defutf8", which changes the default
2111       setting of a new window.
2112
2113       vbell [on|off]
2114
2115       Sets the visual bell setting for this window.  Omitting  the  parameter
2116       toggles  the  setting.  If vbell is switched on, but your terminal does
2117       not support a visual bell, a `vbell-message' is displayed in the status
2118       line  when the bell character (^G) is received.  Visual bell support of
2119       a terminal is defined by the termcap variable `vb' (terminfo: 'flash').
2120       Per default, vbell is off, thus the audible bell  is  used.   See  also
2121       `bell_msg'.
2122
2123       vbell_msg [message]
2124
2125       Sets  the visual bell message. message is printed to the status line if
2126       the window receives a bell character (^G), vbell is set  to  "on",  but
2127       the  terminal  does  not support a visual bell.  The default message is
2128       "Wuff, Wuff!!".  Without parameter, the current message is shown.
2129
2130       vbellwait sec
2131
2132       Define a delay in seconds after each display of  screen's  visual  bell
2133       message. The default is 1 second.
2134
2135       verbose [on|off]
2136
2137       If  verbose is switched on, the command name is echoed, whenever a win‐
2138       dow is created (or resurrected from  zombie  state).  Default  is  off.
2139       Without parameter, the current setting is shown.
2140
2141       version
2142
2143       Print the current version and the compile date in the status line.
2144
2145       wall message
2146
2147       Write  a message to all displays. The message will appear in the termi‐
2148       nal's status line.
2149
2150       width [-w|-d] [cols [lines]]
2151
2152       Toggle the window width between 80 and 132 columns or set  it  to  cols
2153       columns  if an argument is specified.  This requires a capable terminal
2154       and the termcap entries "Z0" and "Z1".  See the "termcap"  command  for
2155       more  information.  You  can  also  specify a new height if you want to
2156       change both values.  The -w option tells screen to  leave  the  display
2157       size unchanged and just set the window size, -d vice versa.
2158
2159       windowlist [-b] [-m]
2160       windowlist string [string]
2161       windowlist title [title]
2162
2163       Display all windows in a table for visual window selection. The desired
2164       window can be selected via the standard movement keys (see  the  "copy"
2165       command)  and activated via the return key.  If the -b option is given,
2166       screen will switch to the blank window before presenting the  list,  so
2167       that  the current window is also selectable.  The -m option changes the
2168       order of the windows, instead of sorting by window numbers screen  uses
2169       its internal most-recently-used list.
2170
2171       The  table  format can be changed with the string and title option, the
2172       title is displayed as table heading, while the lines are made by  using
2173       the  string  setting.  The default setting is "Num Name%=Flags" for the
2174       title and "%3n %t%=%f" for the lines.  See the "STRING ESCAPES" chapter
2175       for more codes (e.g. color settings).
2176
2177       windows
2178
2179       Uses  the message line to display a list of all the windows.  Each win‐
2180       dow is listed by number with the name of process that has been  started
2181       in  the window (or its title); the current window is marked with a `*';
2182       the previous window is marked with a `-';  all  the  windows  that  are
2183       "logged  in"  are  marked  with  a  `$';  a  background window that has
2184       received a bell is marked with a `!'; a background window that is being
2185       monitored  and  has  had activity occur is marked with an `@'; a window
2186       which has output logging turned on is marked with `(L)'; windows  occu‐
2187       pied  by  other  users are marked with `&'; windows in the zombie state
2188       are marked with `Z'.  If this list is too long to fit on the terminal's
2189       status line only the portion around the current window is displayed.
2190
2191       wrap [on|off]
2192
2193       Sets  the  line-wrap setting for the current window.  When line-wrap is
2194       on, the second consecutive printable character output at the last  col‐
2195       umn  of  a  line  will  wrap to the start of the following line.  As an
2196       added feature, backspace (^H) will also wrap through the left margin to
2197       the previous line.  Default is `on'.
2198
2199       writebuf [-e encoding] [filename]
2200
2201       Writes  the  contents of the paste buffer to the specified file, or the
2202       public accessible screen-exchange file if no filename is given. This is
2203       thought  of  as a primitive means of communication between screen users
2204       on the same host. If an encoding  is  specified  the  paste  buffer  is
2205       recoded on the fly to match the encoding.  The filename can be set with
2206       the bufferfile command and defaults to "/tmp/screen-exchange".
2207
2208       writelock [on|off|auto]
2209
2210       In addition to access control lists, not all users may be able to write
2211       to  the  same  window at once. Per default, writelock is in `auto' mode
2212       and grants exclusive input permission to the user who is the  first  to
2213       switch to the particular window. When he leaves the window, other users
2214       may obtain the writelock (automatically). The writelock of the  current
2215       window  is  disabled by the command "writelock off". If the user issues
2216       the command "writelock on" he  keeps  the  exclusive  write  permission
2217       while switching to other windows.
2218
2219       xoff
2220       xon
2221
2222       Insert  a  CTRL-s  / CTRL-q character to the stdin queue of the current
2223       window.
2224
2225       zmodem [off|auto|catch|pass]
2226       zmodem sendcmd [string]
2227       zmodem recvcmd [string]
2228
2229       Define zmodem support for  screen.  Screen  understands  two  different
2230       modes  when  it  detects  a zmodem request: "pass" and "catch".  If the
2231       mode is set to "pass", screen will relay all data to the attacher until
2232       the end of the transmission is reached.  In "catch" mode screen acts as
2233       a zmodem endpoint and starts the corresponding rz/sz commands.  If  the
2234       mode  is  set to "auto", screen will use "catch" if the window is a tty
2235       (e.g. a serial line), otherwise it will use "pass".
2236       You can define the templates screen uses in "catch" mode via the second
2237       and the third form.
2238       Note also that this is an experimental feature.
2239
2240       zombie [keys]
2241       defzombie [keys]
2242
2243       Per  default screen windows are removed from the window list as soon as
2244       the windows process (e.g. shell) exits. When a string of  two  keys  is
2245       specified  to  the  zombie  command,  `dead' windows will remain in the
2246       list.  The kill command may be used to remove such a  window.  Pressing
2247       the first key in the dead window has the same effect. When pressing the
2248       second key, screen will attempt to resurrect the  window.  The  process
2249       that  was initially running in the window will be launched again. Call‐
2250       ing zombie without parameters will clear the zombie setting, thus  mak‐
2251       ing windows disappear when their process exits.
2252
2253       As  the  zombie-setting  is  manipulated globally for all windows, this
2254       command should only be called defzombie. Until we need this  as  a  per
2255       window setting, the commands zombie and defzombie are synonymous.
2256
2257

THE MESSAGE LINE

2259       Screen  displays informational messages and other diagnostics in a mes‐
2260       sage line.  While this line is distributed to appear at the  bottom  of
2261       the screen, it can be defined to appear at the top of the screen during
2262       compilation.  If your terminal has a status line defined in  its  term‐
2263       cap, screen will use this for displaying its messages, otherwise a line
2264       of the current screen will be temporarily overwritten and  output  will
2265       be  momentarily  interrupted. The message line is automatically removed
2266       after a few seconds delay, but it can also be removed early (on  termi‐
2267       nals without a status line) by beginning to type.
2268
2269       The  message line facility can be used by an application running in the
2270       current window by means of the ANSI Privacy message  control  sequence.
2271       For instance, from within the shell, try something like:
2272
2273              echo '<esc>^Hello world from window '$WINDOW'<esc>\\'
2274
2275       where  '<esc>'  is an escape, '^' is a literal up-arrow, and '\\' turns
2276       into a single backslash.
2277
2278

WINDOW TYPES

2280       Screen provides three different window types. New windows  are  created
2281       with screen's screen command (see also the entry in chapter "CUSTOMIZA‐
2282       TION"). The first parameter to the screen command defines which type of
2283       window  is created. The different window types are all special cases of
2284       the normal type. They have been added in order to allow  screen  to  be
2285       used efficiently as a console multiplexer with 100 or more windows.
2286
2287
2288       ·  The  normal  window  contains  a  shell (default, if no parameter is
2289          given) or any other system command that could  be  executed  from  a
2290          shell (e.g.  slogin, etc...)
2291
2292
2293       ·  If a tty (character special device) name (e.g. "/dev/ttya") is spec‐
2294          ified as the first parameter, then the window is directly  connected
2295          to  this  device.   This  window  type  is  similar to "screen cu -l
2296          /dev/ttya".  Read and write access is required on the  device  node,
2297          an  exclusive  open  is attempted on the node to mark the connection
2298          line as busy.  An optional parameter  is  allowed  consisting  of  a
2299          comma separated list of flags in the notation used by stty(1):
2300
2301          <baud_rate>
2302                 Usually  300,  1200, 9600 or 19200. This affects transmission
2303                 as well as receive speed.
2304
2305          cs8 or cs7
2306                 Specify the transmission of eight (or seven) bits per byte.
2307
2308          ixon or -ixon
2309                 Enables (or disables) software  flow-control  (CTRL-S/CTRL-Q)
2310                 for sending data.
2311
2312          ixoff or -ixon
2313                 Enables  (or  disables)  software  flow-control for receiving
2314                 data.
2315
2316          istrip or -istrip
2317                 Clear (or keep) the eight bit in each received byte.
2318
2319          You may want to specify as many  of  these  options  as  applicable.
2320          Unspecified options cause the terminal driver to make up the parame‐
2321          ter values of the connection.  These values are system dependant and
2322          may be in defaults or values saved from a previous connection.
2323
2324          For  tty  windows,  the info command shows some of the modem control
2325          lines in the status line. These may  include  `RTS',  `CTS',  'DTR',
2326          `DSR',  `CD'  and more.  This depends on the available ioctl()'s and
2327          system header files as well as the on the physical  capabilities  of
2328          the  serial  board.   Signals  that  are logical low (inactive) have
2329          their name preceded by an exclamation mark (!), otherwise the signal
2330          is logical high (active).  Signals not supported by the hardware but
2331          available to the ioctl() interface are usually shown low.
2332          When the CLOCAL status bit is true, the whole set of  modem  signals
2333          is  placed inside curly braces ({ and }).  When the CRTSCTS or TIOC‐
2334          SOFTCAR bit is set, the signals `CTS' or `CD' are shown in parenthe‐
2335          sis, respectively.
2336
2337
2338          For tty windows, the command break causes the Data transmission line
2339          (TxD) to go low for a specified period of time. This is expected  to
2340          be  interpreted  as break signal on the other side.  No data is sent
2341          and no modem control line is changed when a break is issued.
2342
2343       ·  If the first  parameter  is  "//telnet",  the  second  parameter  is
2344          expected  to  be  a  host  name, and an optional third parameter may
2345          specify a TCP port number (default decimal 23).  Screen will connect
2346          to a server listening on the remote host and use the telnet protocol
2347          to communicate with that server.
2348          For telnet windows, the command info shows details about the connec‐
2349          tion in square brackets ([ and ]) at the end of the status line.
2350
2351          b      BINARY. The connection is in binary mode.
2352
2353          e      ECHO. Local echo is disabled.
2354
2355          c      SGA.  The  connection  is in `character mode' (default: `line
2356                 mode').
2357
2358          t      TTYPE. The terminal type has been  requested  by  the  remote
2359                 host.   Screen sends the name "screen" unless instructed oth‐
2360                 erwise (see also the command `term').
2361
2362          w      NAWS. The remote site is notified about window size changes.
2363
2364          f      LFLOW. The remote host will send  flow  control  information.
2365                 (Ignored at the moment.)
2366
2367          Additional  flags for debugging are x, t and n (XDISPLOC, TSPEED and
2368          NEWENV).
2369
2370          For telnet windows, the command break  sends  the  telnet  code  IAC
2371          BREAK (decimal 243) to the remote host.
2372
2373
2374          This  window  type is only available if screen was compiled with the
2375          BUILTIN_TELNET option defined.
2376
2377
2378

STRING ESCAPES

2380       Screen provides an escape mechanism to insert information like the cur‐
2381       rent time into messages or file names. The escape character is '%' with
2382       one exception: inside of a window's  hardstatus  '^%'  ('^E')  is  used
2383       instead.
2384
2385       Here is the full list of supported escapes:
2386
2387       %      the escape character itself
2388
2389       a      either 'am' or 'pm'
2390
2391       A      either 'AM' or 'PM'
2392
2393       c      current time HH:MM in 24h format
2394
2395       C      current time HH:MM in 12h format
2396
2397       d      day number
2398
2399       D      weekday name
2400
2401       f      flags of the window
2402
2403       F      sets %? to true if the window has the focus
2404
2405       h      hardstatus of the window
2406
2407       H      hostname of the system
2408
2409       l      current load of the system
2410
2411       m      month number
2412
2413       M      month name
2414
2415       n      window number
2416
2417       s      seconds
2418
2419       t      window title
2420
2421       u      all other users on this window
2422
2423       w      all  window  numbers  and  names. With '-' quailifier: up to the
2424              current window; with '+' qualifier:  starting  with  the  window
2425              after the current one.
2426
2427       W      all window numbers and names except the current one
2428
2429       y      last two digits of the year number
2430
2431       Y      full year number
2432
2433       ?      the  part  to  the  next  '%?' is displayed only if a '%' escape
2434              inside the part expands to a non-empty string
2435
2436       :      else part of '%?'
2437
2438       =      pad the string to the display's width (like TeX's hfill).  If  a
2439              number  is  specified,  pad  to  the  percentage of the window's
2440              width.  A '0' qualifier tells screen  to  treat  the  number  as
2441              absolute  position.  You can specify to pad relative to the last
2442              absolute pad position by adding a '+' qualifier or to pad  rela‐
2443              tive to the right margin by using '-'. The padding truncates the
2444              string if the specified position lies before the  current  posi‐
2445              tion. Add the 'L' qualifier to change this.
2446
2447       <      same as '%=' but just do truncation, do not fill with spaces
2448
2449       >      mark  the  current  text  position for the next truncation. When
2450              screen needs to do truncation, it tries to do it in a  way  that
2451              the  marked  position  gets moved to the specified percentage of
2452              the output area. (The area starts from  the  last  absolute  pad
2453              position  and ends with the position specified by the truncation
2454              operator.) The 'L' qualifier tells screen to mark the  truncated
2455              parts with '...'.
2456
2457       {      attribute/color modifier string terminated by the next "}"
2458
2459       `      Substitute  with  the output of a 'backtick' command. The length
2460              qualifier is misused to identify one of the commands.
2461
2462       The 'c' and 'C' escape may be qualified with a '0' to make  screen  use
2463       zero  instead  of space as fill character. The '0' qualifier also makes
2464       the '=' escape use absolute positions. The 'n' and '='  escapes  under‐
2465       stand a length qualifier (e.g. '%3n'), 'D' and 'M' can be prefixed with
2466       'L' to generate long names, 'w' and 'W' also show the window  flags  if
2467       'L' is given.
2468
2469       An  attribute/color modifier is is used to change the attributes or the
2470       color settings. Its format is  "[attribute  modifier]  [color  descrip‐
2471       tion]".  The attribute modifier must be prefixed by a change type indi‐
2472       cator if it can be confused with  a  color  desciption.  The  following
2473       change types are known:
2474
2475       +      add the specified set to the current attributes
2476
2477       -      remove the set from the current attributes
2478
2479       !      invert the set in the current attributes
2480
2481       =      change the current attributes to the specified set
2482
2483       The  attribute set can either be specified as a hexadecimal number or a
2484       combination of the following letters:
2485
2486       d      dim
2487       u      underline
2488       b      bold
2489       r      reverse
2490       s      standout
2491       B      blinking
2492
2493       Colors are coded either as a hexadecimal number or two letters specify‐
2494       ing  the  desired  background and foreground color (in that order). The
2495       following colors are known:
2496
2497       k      black
2498       r      red
2499       g      green
2500       y      yellow
2501       b      blue
2502       m      magenta
2503       c      cyan
2504       w      white
2505       d      default color
2506       .      leave color unchanged
2507
2508       The capitalized versions of the letter specify bright colors.  You  can
2509       also  use the pseudo-color 'i' to set just the brightness and leave the
2510       color unchanged.
2511       A one digit/letter color description is treated as foreground or  back‐
2512       ground  color  dependant  on the current attributes: if reverse mode is
2513       set, the background color is changed instead of the  foreground  color.
2514       If  you  don't  like this, prefix the color with a ".". If you want the
2515       same behaviour for two-letter color descriptions, also prefix them with
2516       a ".".
2517       As  a special case, "%{-}" restores the attributes and colors that were
2518       set before the last change was made (i.e. pops one level of the  color-
2519       change stack).
2520
2521       Examples:
2522
2523       "G"    set color to bright green
2524
2525       "+b r" use bold red
2526
2527       "= yd" clear  all  attributes,  write  in default color on yellow back‐
2528              ground.
2529
2530       %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<
2531              The available windows centered at the current window  and  trun‐
2532              cated  to  the  available width. The current window is displayed
2533              white on blue.  This can be used  with  "hardstatus  alwayslast‐
2534              line".
2535
2536       %?%F%{.R.}%?%3n %t%? [%h]%?
2537              The  window number and title and the window's hardstatus, if one
2538              is set.  Also use a red background if this is the active  focus.
2539              Useful for "caption string".
2540

FLOW-CONTROL

2542       Each window has a flow-control setting that determines how screen deals
2543       with the XON and XOFF characters (and perhaps the interrupt character).
2544       When  flow-control is turned off, screen ignores the XON and XOFF char‐
2545       acters, which allows the user to send them to the  current  program  by
2546       simply  typing  them  (useful for the emacs editor, for instance).  The
2547       trade-off is that it will take longer for output from a  "normal"  pro‐
2548       gram to pause in response to an XOFF.  With flow-control turned on, XON
2549       and XOFF characters are used to immediately pause  the  output  of  the
2550       current  window.   You  can  still send these characters to the current
2551       program, but you must use the appropriate two-character screen commands
2552       (typically  "C-a  q"  (xon) and "C-a s" (xoff)).  The xon/xoff commands
2553       are also useful for typing C-s and C-q past a terminal that  intercepts
2554       these characters.
2555
2556       Each  window  has  an initial flow-control value set with either the -f
2557       option or the "defflow" .screenrc command. Per default the windows  are
2558       set  to  automatic  flow-switching.  It can then be toggled between the
2559       three states 'fixed on', 'fixed off' and 'automatic' interactively with
2560       the "flow" command bound to "C-a f".
2561
2562       The  automatic  flow-switching  mode  deals with flow control using the
2563       TIOCPKT mode (like "rlogin" does). If the tty driver does  not  support
2564       TIOCPKT,  screen  tries to find out the right mode based on the current
2565       setting of the application keypad - when it is enabled, flow-control is
2566       turned  off  and visa versa.  Of course, you can still manipulate flow-
2567       control manually when needed.
2568
2569       If you're running with flow-control enabled and find that pressing  the
2570       interrupt  key  (usually  C-c)  does  not  interrupt  the display until
2571       another 6-8 lines have scrolled by, try running screen with the "inter‐
2572       rupt"  option  (add  the "interrupt" flag to the "flow" command in your
2573       .screenrc, or use the -i command-line option).  This causes the  output
2574       that screen has accumulated from the interrupted program to be flushed.
2575       One disadvantage is that the virtual  terminal's  memory  contains  the
2576       non-flushed  version of the output, which in rare cases can cause minor
2577       inaccuracies in the output.  For example, if  you  switch  screens  and
2578       return,  or update the screen with "C-a l" you would see the version of
2579       the output you would have gotten without "interrupt" being  on.   Also,
2580       you  might need to turn off flow-control (or use auto-flow mode to turn
2581       it off automatically) when running a program that expects you  to  type
2582       the  interrupt  character  as input, as it is possible to interrupt the
2583       output of the virtual terminal to your physical terminal when flow-con‐
2584       trol  is enabled.  If this happens, a simple refresh of the screen with
2585       "C-a l" will restore it.  Give each mode a try, and use whichever  mode
2586       you find more comfortable.
2587
2588
2589

TITLES (naming windows)

2591       You can customize each window's name in the window display (viewed with
2592       the "windows" command (C-a w)) by setting it with one of the title com‐
2593       mands.   Normally  the name displayed is the actual command name of the
2594       program created in the window.  However, it is sometimes useful to dis‐
2595       tinguish  various  programs  of the same name or to change the name on-
2596       the-fly to reflect the current state of the window.
2597
2598       The default name for all shell windows can be set with the "shelltitle"
2599       command in the .screenrc file, while all other windows are created with
2600       a "screen" command and thus can have their name set with the -t option.
2601       Interactively,    there    is    the    title-string    escape-sequence
2602       (<esc>kname<esc>\) and the "title" command (C-a A).  The former can  be
2603       output  from an application to control the window's name under software
2604       control, and the latter will prompt for a name  when  typed.   You  can
2605       also  bind  pre-defined  names  to keys with the "title" command to set
2606       things quickly without prompting.
2607
2608       Finally, screen has a shell-specific heuristic that is enabled by  set‐
2609       ting  the  window's  name to "search|name" and arranging to have a null
2610       title escape-sequence output as a part of your prompt.  The search por‐
2611       tion  specifies  an end-of-prompt search string, while the name portion
2612       specifies the default shell name for the window.  If the name ends in a
2613       `:'  screen will add what it believes to be the current command running
2614       in the window to the end of the window's shell name (e.g.  "name:cmd").
2615       Otherwise  the  current command name supersedes the shell name while it
2616       is running.
2617
2618       Here's how it works:  you must modify your shell  prompt  to  output  a
2619       null  title-escape-sequence  (<esc>k<esc>\)  as  a part of your prompt.
2620       The last part of your prompt must be the same as the string you  speci‐
2621       fied  for the search portion of the title.  Once this is set up, screen
2622       will use the title-escape-sequence to clear the previous  command  name
2623       and  get  ready for the next command.  Then, when a newline is received
2624       from the shell, a search is made for the end of the prompt.  If  found,
2625       it  will grab the first word after the matched string and use it as the
2626       command name.  If the command name begins with either '!', '%', or  '^'
2627       screen  will  use  the  first  word on the following line (if found) in
2628       preference to the just-found name.  This helps  csh  users  get  better
2629       command names when using job control or history recall commands.
2630
2631       Here's some .screenrc examples:
2632
2633              screen -t top 2 nice top
2634
2635       Adding  this line to your .screenrc would start a nice-d version of the
2636       "top" command in window 2 named "top" rather than "nice".
2637
2638                   shelltitle '> |csh'
2639                   screen 1
2640
2641       These commands would start a shell  with  the  given  shelltitle.   The
2642       title  specified  is an auto-title that would expect the prompt and the
2643       typed command to look something like the following:
2644
2645              /usr/joe/src/dir> trn
2646
2647       (it looks after the '> ' for the  command  name).   The  window  status
2648       would  show the name "trn" while the command was running, and revert to
2649       "csh" upon completion.
2650
2651              bind R screen -t '% |root:' su
2652
2653       Having this command in your .screenrc would bind the key sequence  "C-a
2654       R"  to the "su" command and give it an auto-title name of "root:".  For
2655       this auto-title to work, the screen could look something like this:
2656
2657                   % !em
2658                   emacs file.c
2659
2660       Here the user typed the csh history command "!em" which ran the  previ‐
2661       ously   entered   "emacs"   command.   The  window  status  would  show
2662       "root:emacs" during the execution of the command, and revert to  simply
2663       "root:" at its completion.
2664
2665                   bind o title
2666                   bind E title ""
2667                   bind u title (unknown)
2668
2669       The  first  binding  doesn't have any arguments, so it would prompt you
2670       for a title. when you type "C-a o".  The second binding would clear  an
2671       auto-title's  current setting (C-a E).  The third binding would set the
2672       current window's title to "(unknown)" (C-a u).
2673
2674       One thing to keep in mind when adding a null  title-escape-sequence  to
2675       your  prompt  is that some shells (like the csh) count all the non-con‐
2676       trol characters as part of the prompt's  length.   If  these  invisible
2677       characters  aren't  a  multiple  of  8 then backspacing over a tab will
2678       result in an incorrect display.  One way to get around this is to use a
2679       prompt like this:
2680
2681              set prompt='^[[0000m^[k^[\% '
2682
2683       The  escape-sequence  "<esc>[0000m"  not  only normalizes the character
2684       attributes, but all the zeros round the length of the invisible charac‐
2685       ters  up  to  8.   Bash  users  will  probably  want to echo the escape
2686       sequence in the PROMPT_COMMAND:
2687
2688              PROMPT_COMMAND='echo -n -e "\033k\033\134"'
2689
2690       (I used "134" to output a `\' because of a bug in bash v1.04).
2691
2692
2693

THE VIRTUAL TERMINAL

2695       Each window in a screen session emulates a VT100  terminal,  with  some
2696       extra  functions added. The VT100 emulator is hard-coded, no other ter‐
2697       minal types can be emulated.
2698       Usually screen tries to emulate as much of the VT100/ANSI  standard  as
2699       possible.  But  if your terminal lacks certain capabilities, the emula‐
2700       tion may not be complete. In these cases screen has to tell the  appli‐
2701       cations  that  some  of the features are missing. This is no problem on
2702       machines using termcap, because screen can use the $TERMCAP variable to
2703       customize the standard screen termcap.
2704
2705       But if you do a rlogin on another machine or your machine supports only
2706       terminfo this method fails. Because of this, screen  offers  a  way  to
2707       deal with these cases.  Here is how it works:
2708
2709       When  screen  tries  to figure out a terminal name for itself, it first
2710       looks for an entry named "screen.<term>", where <term> is the  contents
2711       of your $TERM variable.  If no such entry exists, screen tries "screen"
2712       (or "screen-w" if the terminal is wide (132 cols or  more)).   If  even
2713       this entry cannot be found, "vt100" is used as a substitute.
2714
2715       The idea is that if you have a terminal which doesn't support an impor‐
2716       tant feature (e.g. delete char or clear to EOS) you  can  build  a  new
2717       termcap/terminfo  entry for screen (named "screen.<dumbterm>") in which
2718       this capability has been disabled. If this entry is installed  on  your
2719       machines  you  are able to do a rlogin and still keep the correct term‐
2720       cap/terminfo entry.  The terminal name is put in the $TERM variable  of
2721       all new windows.  Screen also sets the $TERMCAP variable reflecting the
2722       capabilities of the virtual terminal emulated. Notice that, however, on
2723       machines using the terminfo database this variable has no effect.  Fur‐
2724       thermore, the variable $WINDOW is set to the window number of each win‐
2725       dow.
2726
2727       The  actual  set  of  capabilities  supported  by  the virtual terminal
2728       depends on the capabilities supported by the  physical  terminal.   If,
2729       for  instance,  the physical terminal does not support underscore mode,
2730       screen does not put the `us' and `ue' capabilities  into  the  window's
2731       $TERMCAP variable, accordingly.  However, a minimum number of capabili‐
2732       ties must be supported by a terminal in order  to  run  screen;  namely
2733       scrolling,  clear  screen,  and  direct cursor addressing (in addition,
2734       screen does not run on hardcopy terminals or on  terminals  that  over-
2735       strike).
2736
2737       Also,  you can customize the $TERMCAP value used by screen by using the
2738       "termcap" .screenrc command, or by  defining  the  variable  $SCREENCAP
2739       prior to startup.  When the is latter defined, its value will be copied
2740       verbatim into each window's $TERMCAP variable.  This can either be  the
2741       full  terminal  definition,  or  a filename where the terminal "screen"
2742       (and/or "screen-w") is defined.
2743
2744       Note that screen honors the "terminfo" .screenrc command if the  system
2745       uses the terminfo database rather than termcap.
2746
2747       When  the  boolean  `G0' capability is present in the termcap entry for
2748       the terminal on which screen has been called, the terminal emulation of
2749       screen supports multiple character sets.  This allows an application to
2750       make use of, for instance, the VT100 graphics character set or national
2751       character sets.  The following control functions from ISO 2022 are sup‐
2752       ported: lock shift G0 (SI), lock shift G1 (SO),  lock  shift  G2,  lock
2753       shift  G3, single shift G2, and single shift G3.  When a virtual termi‐
2754       nal is created or reset, the ASCII character set is  designated  as  G0
2755       through  G3.  When the `G0' capability is present, screen evaluates the
2756       capabilities `S0', `E0', and `C0' if present. `S0' is the sequence  the
2757       terminal  uses  to  enable  and start the graphics character set rather
2758       than SI.  `E0' is the corresponding replacement for SO.  `C0'  gives  a
2759       character  by  character  translation  string that is used during semi-
2760       graphics mode. This string is built like the `acsc'  terminfo  capabil‐
2761       ity.
2762
2763       When the `po' and `pf' capabilities are present in the terminal's term‐
2764       cap entry, applications running in a screen window can send  output  to
2765       the printer port of the terminal.  This allows a user to have an appli‐
2766       cation in one window sending output to a printer connected to the  ter‐
2767       minal,  while  all  other windows are still active (the printer port is
2768       enabled and disabled again for each  chunk  of  output).   As  a  side-
2769       effect,  programs  running  in different windows can send output to the
2770       printer simultaneously.  Data sent to the printer is not  displayed  in
2771       the window.  The info command displays a line starting `PRIN' while the
2772       printer is active.
2773
2774       Screen maintains a hardstatus line for every window. If a  window  gets
2775       selected,  the  display's  hardstatus will be updated to match the win‐
2776       dow's hardstatus line. If the display has no hardstatus the  line  will
2777       be  displayed as a standard screen message.  The hardstatus line can be
2778       changed   with   the   ANSI   Application   Program   Command    (APC):
2779       "ESC_<string>ESC\".  As  a  convenience  for  xterm  users the sequence
2780       "ESC]0..2;<string>^G" is also accepted.
2781
2782       Some capabilities are only put into the $TERMCAP variable of  the  vir‐
2783       tual  terminal  if  they can be efficiently implemented by the physical
2784       terminal.  For instance, `dl' (delete line) is only put into the $TERM‐
2785       CAP  variable  if  the  terminal  supports either delete line itself or
2786       scrolling regions. Note that this may provoke confusion, when the  ses‐
2787       sion  is  reattached  on a different terminal, as the value of $TERMCAP
2788       cannot be modified by parent processes.
2789
2790       The "alternate screen" capability is not enabled by default.   Set  the
2791       altscreen .screenrc command to enable it.
2792
2793       The  following  is  a  list  of control sequences recognized by screen.
2794       "(V)" and "(A)" indicate VT100-specific and ANSI- or ISO-specific func‐
2795       tions, respectively.
2796
2797       ESC E                      Next Line
2798
2799       ESC D                      Index
2800
2801       ESC M                      Reverse Index
2802
2803       ESC H                      Horizontal Tab Set
2804
2805       ESC Z                      Send VT100 Identification String
2806
2807       ESC 7                 (V)  Save Cursor and Attributes
2808
2809       ESC 8                 (V)  Restore Cursor and Attributes
2810
2811       ESC [s                (A)  Save Cursor and Attributes
2812
2813       ESC [u                (A)  Restore Cursor and Attributes
2814
2815       ESC c                      Reset to Initial State
2816
2817       ESC g                      Visual Bell
2818
2819       ESC Pn p                   Cursor Visibility (97801)
2820
2821           Pn = 6                 Invisible
2822
2823                7                 Visible
2824
2825       ESC =                 (V)  Application Keypad Mode
2826
2827       ESC >                 (V)  Numeric Keypad Mode
2828
2829       ESC # 8               (V)  Fill Screen with E's
2830
2831       ESC \                 (A)  String Terminator
2832
2833       ESC ^                 (A)  Privacy Message String (Message Line)
2834
2835       ESC !                      Global Message String (Message Line)
2836
2837       ESC k                      A.k.a. Definition String
2838
2839       ESC P                 (A)  Device  Control  String.   Outputs  a string
2840                                  directly to the host terminal without inter‐
2841                                  pretation.
2842
2843       ESC _                 (A)  Application Program Command (Hardstatus)
2844
2845       ESC ] 0 ; string ^G   (A)  Operating  System Command (Hardstatus, xterm
2846                                  title hack)
2847
2848       ESC ] 83 ; cmd ^G     (A)  Execute screen command. This only  works  if
2849                                  multi-user  support is compiled into screen.
2850                                  The pseudo-user ":window:" is used to  check
2851                                  the  access  control list. Use "addacl :win‐
2852                                  dow: -rwx #?"  to  create  a  user  with  no
2853                                  rights and allow only the needed commands.
2854
2855       Control-N             (A)  Lock Shift G1 (SO)
2856
2857       Control-O             (A)  Lock Shift G0 (SI)
2858
2859       ESC n                 (A)  Lock Shift G2
2860
2861       ESC o                 (A)  Lock Shift G3
2862
2863       ESC N                 (A)  Single Shift G2
2864
2865       ESC O                 (A)  Single Shift G3
2866
2867       ESC ( Pcs             (A)  Designate character set as G0
2868
2869       ESC ) Pcs             (A)  Designate character set as G1
2870
2871       ESC * Pcs             (A)  Designate character set as G2
2872
2873       ESC + Pcs             (A)  Designate character set as G3
2874
2875       ESC [ Pn ; Pn H            Direct Cursor Addressing
2876
2877       ESC [ Pn ; Pn f            same as above
2878
2879       ESC [ Pn J                 Erase in Display
2880
2881             Pn = None or 0       From Cursor to End of Screen
2882
2883                  1               From Beginning of Screen to Cursor
2884
2885                  2               Entire Screen
2886
2887       ESC [ Pn K                 Erase in Line
2888
2889             Pn = None or 0       From Cursor to End of Line
2890
2891                  1               From Beginning of Line to Cursor
2892
2893                  2               Entire Line
2894
2895       ESC [ Pn X                 Erase character
2896
2897       ESC [ Pn A                 Cursor Up
2898
2899       ESC [ Pn B                 Cursor Down
2900
2901       ESC [ Pn C                 Cursor Right
2902
2903       ESC [ Pn D                 Cursor Left
2904
2905       ESC [ Pn E                 Cursor next line
2906
2907       ESC [ Pn F                 Cursor previous line
2908
2909       ESC [ Pn G                 Cursor horizontal position
2910
2911       ESC [ Pn `                 same as above
2912
2913       ESC [ Pn d                 Cursor vertical position
2914
2915       ESC [ Ps ;...; Ps m        Select Graphic Rendition
2916
2917             Ps = None or 0       Default Rendition
2918
2919                  1               Bold
2920
2921                  2          (A)  Faint
2922
2923                  3          (A)  Standout Mode (ANSI: Italicized)
2924
2925                  4               Underlined
2926
2927                  5               Blinking
2928
2929                  7               Negative Image
2930
2931                  22         (A)  Normal Intensity
2932
2933                  23         (A)  Standout Mode off (ANSI: Italicized off)
2934
2935                  24         (A)  Not Underlined
2936
2937                  25         (A)  Not Blinking
2938
2939                  27         (A)  Positive Image
2940
2941                  30         (A)  Foreground Black
2942
2943                  31         (A)  Foreground Red
2944
2945                  32         (A)  Foreground Green
2946
2947                  33         (A)  Foreground Yellow
2948
2949                  34         (A)  Foreground Blue
2950
2951                  35         (A)  Foreground Magenta
2952
2953                  36         (A)  Foreground Cyan
2954
2955                  37         (A)  Foreground White
2956
2957                  39         (A)  Foreground Default
2958
2959                  40         (A)  Background Black
2960
2961                  ...
2962
2963                  49         (A)  Background Default
2964
2965       ESC [ Pn g                 Tab Clear
2966
2967             Pn = None or 0       Clear Tab at Current Position
2968
2969                  3               Clear All Tabs
2970
2971       ESC [ Pn ; Pn r       (V)  Set Scrolling Region
2972
2973       ESC [ Pn I            (A)  Horizontal Tab
2974
2975       ESC [ Pn Z            (A)  Backward Tab
2976
2977       ESC [ Pn L            (A)  Insert Line
2978
2979       ESC [ Pn M            (A)  Delete Line
2980
2981       ESC [ Pn @            (A)  Insert Character
2982
2983       ESC [ Pn P            (A)  Delete Character
2984
2985       ESC [ Pn S                 Scroll Scrolling Region Up
2986
2987       ESC [ Pn T                 Scroll Scrolling Region Down
2988
2989       ESC [ Pn ^                 same as above
2990
2991       ESC [ Ps ;...; Ps h        Set Mode
2992
2993       ESC [ Ps ;...; Ps l        Reset Mode
2994
2995             Ps = 4          (A)  Insert Mode
2996
2997                  20         (A)  Automatic Linefeed Mode
2998
2999                  34              Normal Cursor Visibility
3000
3001                  ?1         (V)  Application Cursor Keys
3002
3003                  ?3         (V)  Change Terminal Width to 132 columns
3004
3005                  ?5         (V)  Reverse Video
3006
3007                  ?6         (V)  Origin Mode
3008
3009                  ?7         (V)  Wrap Mode
3010
3011                  ?9              X10 mouse tracking
3012
3013                  ?25        (V)  Visible Cursor
3014
3015                  ?47             Alternate Screen (old xterm code)
3016
3017                  ?1000      (V)  VT200 mouse tracking
3018
3019                  ?1047           Alternate Screen (new xterm code)
3020
3021                  ?1049           Alternate Screen (new xterm code)
3022
3023       ESC [ 5 i             (A)  Start relay to printer (ANSI Media Copy)
3024
3025       ESC [ 4 i             (A)  Stop relay to printer (ANSI Media Copy)
3026
3027       ESC [ 8 ; Ph ; Pw t        Resize  the  window  to  `Ph' lines and `Pw'
3028                                  columns (SunView special)
3029
3030       ESC [ c                    Send VT100 Identification String
3031
3032       ESC [ x                    Send Terminal Parameter Report
3033
3034       ESC [ > c                  Send  VT220  Secondary   Device   Attributes
3035                                  String
3036
3037       ESC [ 6 n                  Send Cursor Position Report
3038
3039
3040

INPUT TRANSLATION

3042       In  order  to  do  a  full  VT100 emulation screen has to detect that a
3043       sequence of characters in the input stream was generated by a  keypress
3044       on  the  user's  keyboard  and  insert the VT100 style escape sequence.
3045       Screen has a very flexible way of doing this by making it  possible  to
3046       map  arbitrary commands on arbitrary sequences of characters. For stan‐
3047       dard VT100 emulation the command will always insert  a  string  in  the
3048       input  buffer  of the window (see also command stuff in the command ta‐
3049       ble).  Because the sequences generated by a keypress can change after a
3050       reattach  from  a  different terminal type, it is possible to bind com‐
3051       mands to the termcap name of the keys.  Screen will insert the  correct
3052       binding  after  each  reattach.  See  the  bindkey  command for further
3053       details on the syntax and examples.
3054
3055       Here is the table of the default key bindings. (A) means that the  com‐
3056       mand is executed if the keyboard is switched into application mode.
3057
3058       Key name          Termcap name    Command
3059       ______________________________________________________
3060       Cursor up             ku          stuff \033[A
3061                                         stuff \033OA    (A)
3062       Cursor down           kd          stuff \033[B
3063                                         stuff \033OB    (A)
3064       Cursor right          kr          stuff \033[C
3065                                         stuff \033OC    (A)
3066       Cursor left           kl          stuff \033[D
3067                                         stuff \033OD    (A)
3068       Function key 0        k0          stuff \033[10~
3069       Function key 1        k1          stuff \033OP
3070       Function key 2        k2          stuff \033OQ
3071       Function key 3        k3          stuff \033OR
3072       Function key 4        k4          stuff \033OS
3073       Function key 5        k5          stuff \033[15~
3074       Function key 6        k6          stuff \033[17~
3075       Function key 7        k7          stuff \033[18~
3076       Function key 8        k8          stuff \033[19~
3077       Function key 9        k9          stuff \033[20~
3078       Function key 10       k;          stuff \033[21~
3079       Function key 11       F1          stuff \033[23~
3080       Function key 12       F2          stuff \033[24~
3081       Home                  kh          stuff \033[1~
3082       End                   kH          stuff \033[4~
3083       Insert                kI          stuff \033[2~
3084       Delete                kD          stuff \033[3~
3085       Page up               kP          stuff \033[5~
3086       Page down             kN          stuff \033[6~
3087       Keypad 0              f0          stuff 0
3088                                         stuff \033Op    (A)
3089       Keypad 1              f1          stuff 1
3090                                         stuff \033Oq    (A)
3091       Keypad 2              f2          stuff 2
3092                                         stuff \033Or    (A)
3093       Keypad 3              f3          stuff 3
3094                                         stuff \033Os    (A)
3095       Keypad 4              f4          stuff 4
3096                                         stuff \033Ot    (A)
3097       Keypad 5              f5          stuff 5
3098                                         stuff \033Ou    (A)
3099       Keypad 6              f6          stuff 6
3100                                         stuff \033Ov    (A)
3101       Keypad 7              f7          stuff 7
3102                                         stuff \033Ow    (A)
3103       Keypad 8              f8          stuff 8
3104                                         stuff \033Ox    (A)
3105       Keypad 9              f9          stuff 9
3106                                         stuff \033Oy    (A)
3107       Keypad +              f+          stuff +
3108                                         stuff \033Ok    (A)
3109       Keypad -              f-          stuff -
3110                                         stuff \033Om    (A)
3111       Keypad *              f*          stuff *
3112                                         stuff \033Oj    (A)
3113       Keypad /              f/          stuff /
3114                                         stuff \033Oo    (A)
3115       Keypad =              fq          stuff =
3116                                         stuff \033OX    (A)
3117       Keypad .              f.          stuff .
3118                                         stuff \033On    (A)
3119       Keypad ,              f,          stuff ,
3120                                         stuff \033Ol    (A)
3121       Keypad enter          fe          stuff \015
3122                                         stuff \033OM    (A)
3123
3124
3125

SPECIAL TERMINAL CAPABILITIES

3127       The following table describes all terminal capabilities that are recog‐
3128       nized by screen and are not in the termcap(5) manual.   You  can  place
3129       these  capabilities  in your termcap entries (in `/etc/termcap') or use
3130       them with the commands `termcap', `terminfo' and `termcapinfo' in  your
3131       screenrc files. It is often not possible to place these capabilities in
3132       the terminfo database.
3133
3134       LP   (bool)  Terminal has VT100 style margins (`magic  margins').  Note
3135                    that  this  capability is obsolete because screen uses the
3136                    standard 'xn' instead.
3137
3138       Z0   (str)   Change width to 132 columns.
3139
3140       Z1   (str)   Change width to 80 columns.
3141
3142       WS   (str)   Resize display. This capability has the desired width  and
3143                    height as arguments. SunView(tm) example: '\E[8;%d;%dt'.
3144
3145       NF   (bool)  Terminal  doesn't need flow control. Send ^S and ^Q direct
3146                    to the application. Same as 'flow off'.  The  opposite  of
3147                    this capability is 'nx'.
3148
3149       G0   (bool)  Terminal can deal with ISO 2022 font selection sequences.
3150
3151       S0   (str)   Switch  charset  'G0' to the specified charset. Default is
3152                    '\E(%.'.
3153
3154       E0   (str)   Switch charset 'G0' back to standard charset.  Default  is
3155                    '\E(B'.
3156
3157       C0   (str)   Use the string as a conversion table for font '0'. See the
3158                    'ac' capability for more details.
3159
3160       CS   (str)   Switch cursor-keys to application mode.
3161
3162       CE   (str)   Switch cursor-keys back to normal mode.
3163
3164       AN   (bool)  Turn on autonuke. See  the  'autonuke'  command  for  more
3165                    details.
3166
3167       OL   (num)   Set  the  output buffer limit. See the 'obuflimit' command
3168                    for more details.
3169
3170       KJ   (str)   Set the encoding of the terminal. See the 'encoding'  com‐
3171                    mand for valid encodings.
3172
3173       AF   (str)   Change  character foreground color in an ANSI conform way.
3174                    This capability will almost always  be  set  to  '\E[3%dm'
3175                    ('\E[3%p1%dm' on terminfo machines).
3176
3177       AB   (str)   Same as 'AF', but change background color.
3178
3179       AX   (bool)  Does  understand  ANSI  set  default fg/bg color (\E[39m /
3180                    \E[49m).
3181
3182       XC   (str)   Describe a translation of characters to strings  depending
3183                    on  the current font. More details follow in the next sec‐
3184                    tion.
3185
3186       XT   (bool)  Terminal understands special xterm sequences  (OSC,  mouse
3187                    tracking).
3188
3189       C8   (bool)  Terminal needs bold to display high-intensity colors (e.g.
3190                    Eterm).
3191
3192       TF   (bool)  Add missing capabilities to the termcap/info  entry.  (Set
3193                    by default).
3194
3195

CHARACTER TRANSLATION

3197       Screen  has  a  powerful mechanism to translate characters to arbitrary
3198       strings depending on the current font and terminal type.  Use this fea‐
3199       ture  if  you  want  to  work with a common standard character set (say
3200       ISO8851-latin1) even on terminals that scatter the more unusual charac‐
3201       ters over several national language font pages.
3202
3203       Syntax:
3204           XC=<charset-mapping>{,,<charset-mapping>}
3205           <charset-mapping> := <designator><template>{,<mapping>}
3206           <mapping> := <char-to-be-mapped><template-arg>
3207
3208       The things in braces may be repeated any number of times.
3209
3210       A  <charset-mapping> tells screen how to map characters in font <desig‐
3211       nator> ('B': Ascii, 'A': UK, 'K':  german,  etc.)   to  strings.  Every
3212       <mapping>  describes  to  what string a single character will be trans‐
3213       lated. A template mechanism is used, as most of the time the codes have
3214       a  lot  in  common  (for  example strings to switch to and from another
3215       charset). Each occurrence of '%' in <template>  gets  substituted  with
3216       the  <template-arg>  specified  together  with  the  character. If your
3217       strings are not similar at all, then use '%' as a  template  and  place
3218       the  full  string  in  <template-arg>. A quoting mechanism was added to
3219       make it possible to use a real '%'. The '\' character quotes  the  spe‐
3220       cial characters '\', '%', and ','.
3221
3222       Here is an example:
3223
3224           termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]'
3225
3226       This  tells  screen how to translate ISOlatin1 (charset 'B') upper case
3227       umlaut characters on a hp700 terminal that has a german charset. '\304'
3228       gets  translated  to  '\E(K[\E(B'  and so on.  Note that this line gets
3229       parsed *three* times before the internal lookup table is built,  there‐
3230       fore a lot of quoting is needed to create a single '\'.
3231
3232       Another  extension  was  added  to  allow  more emulation: If a mapping
3233       translates the unquoted '%' char, it will be sent to the terminal when‐
3234       ever screen switches to the corresponding <designator>. In this special
3235       case the template is assumed to be just '%' because the charset  switch
3236       sequence and the character mappings normally haven't much in common.
3237
3238       This example shows one use of the extension:
3239
3240           termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334'
3241
3242       Here,  a  part of the german ('K') charset is emulated on an xterm.  If
3243       screen has to change to the 'K' charset, '\E(B' will  be  sent  to  the
3244       terminal,  i.e. the ASCII charset is used instead. The template is just
3245       '%', so the mapping is straightforward: '[' to '\304', '\'  to  '\326',
3246       and ']' to '\334'.
3247
3248

ENVIRONMENT

3250       COLUMNS        Number  of  columns  on  the terminal (overrides termcap
3251                      entry).
3252       HOME           Directory in which to look for .screenrc.
3253       LINES          Number of  lines  on  the  terminal  (overrides  termcap
3254                      entry).
3255       LOCKPRG        Screen lock program.
3256       NETHACKOPTIONS Turns on nethack option.
3257       PATH           Used for locating programs to run.
3258       SCREENCAP      For customizing a terminal's TERMCAP value.
3259       SCREENDIR      Alternate socket directory.
3260       SCREENRC       Alternate user screenrc file.
3261       SHELL          Default  shell  program  for  opening  windows  (default
3262                      "/bin/sh").
3263       STY            Alternate socket name.
3264       SYSSCREENRC    Alternate system screenrc file.
3265       TERM           Terminal name.
3266       TERMCAP        Terminal description.
3267       WINDOW         Window number of a window (at creation time).
3268

FILES

3270       .../screen-4.?.??/etc/screenrc
3271       .../screen-4.?.??/etc/etcscreenrc Examples in the  screen  distribution
3272                                         package  for  private and global ini‐
3273                                         tialization files.
3274       $SYSSCREENRC
3275       /etc/screenrc                     screen initialization commands
3276       $SCREENRC
3277       $HOME/.screenrc                   Read in after /etc/screenrc
3278       $SCREENDIR/S-<login>
3279       /local/screens/S-<login>          Socket directories (default)
3280       /usr/tmp/screens/S-<login>        Alternate socket directories.
3281       <socket directory>/.termcap       Written by the "termcap" output func‐
3282                                         tion
3283       /usr/tmp/screens/screen-exchange  or
3284       /tmp/screen-exchange              screen   `interprocess  communication
3285                                         buffer'
3286       hardcopy.[0-9]                    Screen images created by the hardcopy
3287                                         function
3288       screenlog.[0-9]                   Output  log  files created by the log
3289                                         function
3290       /usr/lib/terminfo/?/*             or
3291       /etc/termcap                      Terminal capability databases
3292       /etc/utmp                         Login records
3293       $LOCKPRG                          Program that locks a terminal.
3294
3295

SEE ALSO

3297       termcap(5), utmp(5), vi(1), captoinfo(1), tic(1)
3298
3299

AUTHORS

3301       Originally created by Oliver Laumann, this latest version was  produced
3302       by Wayne Davison, Juergen Weigert and Michael Schroeder.
3303

COPYLEFT

3305       Copyright (C) 1993-2003
3306            Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
3307            Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
3308       Copyright (C) 1987 Oliver Laumann
3309       This program is free software; you can redistribute it and/or modify it
3310       under the terms of the GNU General Public License as published  by  the
3311       Free  Software  Foundation;  either  version 2, or (at your option) any
3312       later version.
3313       This program is distributed in the hope that it  will  be  useful,  but
3314       WITHOUT  ANY  WARRANTY;  without  even  the  implied  warranty  of MER‐
3315       CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  General
3316       Public License for more details.
3317       You should have received a copy of the GNU General Public License along
3318       with this program (see the file COPYING); if not,  write  to  the  Free
3319       Software  Foundation,  Inc.,  59  Temple  Place - Suite 330, Boston, MA
3320       02111-1307, USA
3321

CONTRIBUTORS

3323       Ken Beal (kbeal@amber.ssd.csd.harris.com),
3324       Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de),
3325       Toerless Eckert (eckert@immd4.informatik.uni-erlangen.de),
3326       Wayne Davison (davison@borland.com),
3327       Patrick Wolfe (pat@kai.com, kailand!pat),
3328       Bart Schaefer (schaefer@cse.ogi.edu),
3329       Nathan Glasser (nathan@brokaw.lcs.mit.edu),
3330       Larry W. Virden (lvirden@cas.org),
3331       Howard Chu (hyc@hanauma.jpl.nasa.gov),
3332       Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
3333       Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
3334       Marc Boucher (marc@CAM.ORG),
3335       Doug Siebert (dsiebert@isca.uiowa.edu),
3336       Ken Stillson (stillson@tsfsrv.mitre.org),
3337       Ian Frechett (frechett@spot.Colorado.EDU),
3338       Brian Koehmstedt (bpk@gnu.ai.mit.edu),
3339       Don Smith (djs6015@ultb.isc.rit.edu),
3340       Frank van der Linden (vdlinden@fwi.uva.nl),
3341       Martin Schweikert (schweik@cpp.ob.open.de),
3342       David Vrona (dave@sashimi.lcu.com),
3343       E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
3344       Matthew Green (mrg@eterna.com.au),
3345       Christopher Williams (cgw@pobox.com),
3346       Matt Mosley (mattm@access.digex.net),
3347       Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
3348       Johannes Zellner (johannes@zellner.org),
3349       Pablo Averbuj (pablo@averbuj.com).
3350
3351

VERSION

3353       This is version 4.0.2. Its roots are a merge of a custom version 2.3PR7
3354       by  Wayne  Davison and several enhancements to Oliver Laumann's version
3355       2.0. Note that all versions numbered 2.x are copyright by  Oliver  Lau‐
3356       mann.
3357

AVAILABILITY

3359       The  latest official release of screen available via anonymous ftp from
3360       gnudist.gnu.org, nic.funet.fi or any other GNU distribution  site.  The
3361       home site of screen is ftp.uni-erlangen.de, in the directory pub/utili‐
3362       ties/screen. The subdirectory `private' contains the latest beta  test‐
3363       ing  release.  If  you  want  to help, send a note to screen@uni-erlan‐
3364       gen.de.
3365

BUGS

3367       ·  `dm' (delete mode) and `xs' are  not  handled  correctly  (they  are
3368          ignored). `xn' is treated as a magic-margin indicator.
3369
3370       ·  Screen has no clue about double-high or double-wide characters.  But
3371          this is the only area where vttest is allowed to fail.
3372
3373       ·  It is not possible to change the environment variable $TERMCAP  when
3374          reattaching under a different terminal type.
3375
3376       ·  The  support of terminfo based systems is very limited. Adding extra
3377          capabilities to $TERMCAP may not have any effects.
3378
3379       ·  Screen does not make use of hardware tabs.
3380
3381       ·  Screen must be installed as set-uid with owner root on most  systems
3382          in  order to be able to correctly change the owner of the tty device
3383          file for each window.  Special permission may also  be  required  to
3384          write the file "/etc/utmp".
3385
3386       ·  Entries  in  "/etc/utmp"  are not removed when screen is killed with
3387          SIGKILL.  This will cause some programs  (like  "w"  or  "rwho")  to
3388          advertise that a user is logged on who really isn't.
3389
3390       ·  Screen may give a strange warning when your tty has no utmp entry.
3391
3392       ·  When the modem line was hung up, screen may not automatically detach
3393          (or quit) unless the device driver is configured to  send  a  HANGUP
3394          signal.   To  detach  a screen session use the -D or -d command line
3395          option.
3396
3397       ·  If a password is set, the command  line  options  -d  and  -D  still
3398          detach a session without asking.
3399
3400       ·  Both  "breaktype"  and  "defbreaktype"  change  the break generating
3401          method used by all terminal devices. The first should change a  win‐
3402          dow  specific  setting,  where  the  latter  should  change only the
3403          default for new windows.
3404
3405       ·  When attaching to a multiuser session, the user's .screenrc file  is
3406          not  sourced.  Each  user's personal settings have to be included in
3407          the .screenrc file from which the session is booted, or have  to  be
3408          changed manually.
3409
3410       ·  A weird imagination is most useful to gain full advantage of all the
3411          features.
3412
3413       ·  Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza
3414          to screen@uni-erlangen.de.
3415
3416
3417
3418
34194th Berkeley Distribution          Aug 2003                          SCREEN(1)
Impressum