· 9 years ago · Aug 08, 2017, 12:38 AM
1SCREEN(1) SCREEN(1)
2
3
4
5NAME
6 screen - screen manager with VT100/ANSI terminal emulation
7
8
9
10SYNOPSIS
11 screen [ -options ] [ cmd [ args ] ]
12 screen -r [[pid.]tty[.host]]
13 screen -r sessionowner/[[pid.]tty[.host]]
14
15
16
17DESCRIPTION
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. - Note that you cannot transport environment variables from the
72 invoking shell to the application (emacs in this case), because it is
73 forked from the parent screen process, not from the invoking shell.
74
75 If "/var/run/utmp" is writable by screen, an appropriate record will be
76 written to this file for each window, and removed when the window is
77 terminated. This is useful for working with "talk", "script", "shutâ€
78 down", "rsend", "sccs" and other similar programs that use the utmp
79 file to determine who you are. As long as screen is active on your terâ€
80 minal, the terminal's own record is removed from the utmp file. See
81 also "C-a L".
82
83
84
85GETTING STARTED
86 Before you begin to use screen you'll need to make sure you have corâ€
87 rectly selected your terminal type, just as you would for any other
88 termcap/terminfo program. (You can do this by using tset for example.)
89
90 If you're impatient and want to get started without doing a lot more
91 reading, you should remember this one command: "C-a ?". Typing these
92 two characters will display a list of the available screen commands and
93 their bindings. Each keystroke is discussed in the section "DEFAULT KEY
94 BINDINGS". The manual section "CUSTOMIZATION" deals with the contents
95 of your .screenrc.
96
97 If your terminal is a "true" auto-margin terminal (it doesn't allow the
98 last position on the screen to be updated without scrolling the screen)
99 consider using a version of your terminal's termcap that has automatic
100 margins turned off. This will ensure an accurate and optimal update of
101 the screen in all circumstances. Most terminals nowadays have "magic"
102 margins (automatic margins plus usable last column). This is the VT100
103 style type and perfectly suited for screen. If all you've got is a
104 "true" auto-margin terminal screen will be content to use it, but
105 updating a character put into the last position on the screen may not
106 be possible until the screen scrolls or the character is moved into a
107 safe position in some other way. This delay can be shortened by using a
108 terminal with insert-character capability.
109
110
111
112COMMAND-LINE OPTIONS
113 Screen has the following command-line options:
114
115 -a include all capabilities (with some minor exceptions) in each winâ€
116 dow's termcap, even if screen must redraw parts of the display in
117 order to implement a function.
118
119 -A Adapt the sizes of all windows to the size of the current termiâ€
120 nal. By default, screen tries to restore its old window sizes
121 when attaching to resizable terminals (those with "WS" in its
122 description, e.g. suncmd or some xterm).
123
124 -c file
125 override the default configuration file from "$HOME/.screenrc" to
126 file.
127
128 -d|-D [pid.tty.host]
129 does not start screen, but detaches the elsewhere running screen
130 session. It has the same effect as typing "C-a d" from screen's
131 controlling terminal. -D is the equivalent to the power detach
132 key. If no session can be detached, this option is ignored. In
133 combination with the -r/-R option more powerful effects can be
134 achieved:
135
136 -d -r Reattach a session and if necessary detach it first.
137
138 -d -R Reattach a session and if necessary detach or even create it
139 first.
140
141 -d -RR Reattach a session and if necessary detach or create it. Use
142 the first session if more than one session is available.
143
144 -D -r Reattach a session. If necessary detach and logout remotely
145 first.
146
147 -D -R Attach here and now. In detail this means: If a session is runâ€
148 ning, then reattach. If necessary detach and logout remotely
149 first. If it was not running create it and notify the user.
150 This is the author's favorite.
151
152 -D -RR Attach here and now. Whatever that means, just do it.
153
154 Note: It is always a good idea to check the status of your sesâ€
155 sions by means of "screen -list".
156
157 -e xy
158 specifies the command character to be x and the character generatâ€
159 ing a literal command character to y (when typed after the command
160 character). The default is "C-a" and `a', which can be specified
161 as "-e^Aa". When creating a screen session, this option sets the
162 default command character. In a multiuser session all users added
163 will start off with this command character. But when attaching to
164 an already running session, this option changes only the command
165 character of the attaching user. This option is equivalent to
166 either the commands "defescape" or "escape" respectively.
167
168 -f, -fn, and -fa
169 turns flow-control on, off, or "automatic switching mode". This
170 can also be defined through the "defflow" .screenrc command.
171
172 -h num
173 Specifies the history scrollback buffer to be num lines high.
174
175 -i will cause the interrupt key (usually C-c) to interrupt the disâ€
176 play immediately when flow-control is on. See the "defflow"
177 .screenrc command for details. The use of this option is discourâ€
178 aged.
179
180 -l and -ln
181 turns login mode on or off (for /var/run/utmp updating). This can
182 also be defined through the "deflogin" .screenrc command.
183
184 -ls and -list
185 does not start screen, but prints a list of pid.tty.host strings
186 and creation timestamps identifying your screen sessions. Sesâ€
187 sions marked `detached' can be resumed with "screen -r". Those
188 marked `attached' are running and have a controlling terminal. If
189 the session runs in multiuser mode, it is marked `multi'. Sessions
190 marked as `unreachable' either live on a different host or are
191 `dead'. An unreachable session is considered dead, when its name
192 matches either the name of the local host, or the specified paramâ€
193 eter, if any. See the -r flag for a description how to construct
194 matches. Sessions marked as `dead' should be thoroughly checked
195 and removed. Ask your system administrator if you are not sure.
196 Remove sessions with the -wipe option.
197
198 -L tells screen to turn on automatic output logging for the windows.
199
200 -m causes screen to ignore the $STY environment variable. With
201 "screen -m" creation of a new session is enforced, regardless
202 whether screen is called from within another screen session or
203 not. This flag has a special meaning in connection with the `-d'
204 option:
205
206 -d -m Start screen in "detached" mode. This creates a new session but
207 doesn't attach to it. This is useful for system startup
208 scripts.
209
210 -D -m This also starts screen in "detached" mode, but doesn't fork a
211 new process. The command exits if the session terminates.
212
213 -O selects a more optimal output mode for your terminal rather than
214 true VT100 emulation (only affects auto-margin terminals without
215 `LP'). This can also be set in your .screenrc by specifying `OP'
216 in a "termcap" command.
217
218 -p number_or_name
219 Preselect a window. This is useful when you want to reattach to a
220 specific window or you want to send a command via the "-X" option
221 to a specific window. As with screen's select command, "-" selects
222 the blank window. As a special case for reattach, "=" brings up
223 the windowlist on the blank window.
224
225 -q Suppress printing of error messages. In combination with "-ls" the
226 exit value is as follows: 9 indicates a directory without sesâ€
227 sions. 10 indicates a directory with running but not attachable
228 sessions. 11 (or more) indicates 1 (or more) usable sessions. In
229 combination with "-r" the exit value is as follows: 10 indicates
230 that there is no session to resume. 12 (or more) indicates that
231 there are 2 (or more) sessions to resume and you should specify
232 which one to choose. In all other cases "-q" has no effect.
233
234 -r [pid.tty.host]
235 -r sessionowner/[pid.tty.host]
236 resumes a detached screen session. No other options (except comâ€
237 binations with -d/-D) may be specified, though an optional prefix
238 of [pid.]tty.host may be needed to distinguish between multiple
239 detached screen sessions. The second form is used to connect to
240 another user's screen session which runs in multiuser mode. This
241 indicates that screen should look for sessions in another user's
242 directory. This requires setuid-root.
243
244 -R attempts to resume the youngest (in terms of creation time)
245 detached screen session it finds. If successful, all other comâ€
246 mand-line options are ignored. If no detached session exists,
247 starts a new session using the specified options, just as if -R
248 had not been specified. The option is set by default if screen is
249 run as a login-shell (actually screen uses "-xRR" in that case).
250 For combinations with the -d/-D option see there. Note: Time-
251 based session selection is a Debian addition.
252
253 -s sets the default shell to the program specified, instead of the
254 value in the environment variable $SHELL (or "/bin/sh" if not
255 defined). This can also be defined through the "shell" .screenrc
256 command.
257
258 -S sessionname
259 When creating a new session, this option can be used to specify a
260 meaningful name for the session. This name identifies the session
261 for "screen -list" and "screen -r" actions. It substitutes the
262 default [tty.host] suffix.
263
264 -t name
265 sets the title (a.k.a.) for the default shell or specified proâ€
266 gram. See also the "shelltitle" .screenrc command.
267
268 -U Run screen in UTF-8 mode. This option tells screen that your terâ€
269 minal sends and understands UTF-8 encoded characters. It also sets
270 the default encoding for new windows to `utf8'.
271
272 -v Print version number.
273
274 -wipe [match]
275 does the same as "screen -ls", but removes destroyed sessions
276 instead of marking them as `dead'. An unreachable session is conâ€
277 sidered dead, when its name matches either the name of the local
278 host, or the explicitly given parameter, if any. See the -r flag
279 for a description how to construct matches.
280
281 -x Attach to a not detached screen session. (Multi display mode).
282 Screen refuses to attach from within itself. But when cascading
283 multiple screens, loops are not detected; take care.
284
285 -X Send the specified command to a running screen session. You can
286 use the -d or -r option to tell screen to look only for attached
287 or detached screen sessions. Note that this command doesn't work
288 if the session is password protected.
289
290
291
292DEFAULT KEY BINDINGS
293 As mentioned, each screen command consists of a "C-a" followed by one
294 other character. For your convenience, all commands that are bound to
295 lower-case letters are also bound to their control character counterâ€
296 parts (with the exception of "C-a a"; see below), thus, "C-a c" as well
297 as "C-a C-c" can be used to create a window. See section "CUSTOMIZAâ€
298 TION" for a description of the command.
299
300 The following table shows the default key bindings:
301
302 C-a ' (select) Prompt for a window name or number to switch
303 to.
304
305 C-a " (windowlist -b)
306 Present a list of all windows for selection.
307
308 C-a 0 (select 0)
309 ... ...
310 C-a 9 (select 9)
311 C-a - (select -) Switch to window number 0 - 9, or to the
312 blank window.
313
314 C-a tab (focus) Switch the input focus to the next region.
315 See also split, remove, only.
316
317 C-a C-a (other) Toggle to the window displayed previously.
318 Note that this binding defaults to the comâ€
319 mand character typed twice, unless overridâ€
320 den. For instance, if you use the option
321 "-e]x", this command becomes "]]".
322
323 C-a a (meta) Send the command character (C-a) to window.
324 See escape command.
325
326 C-a A (title) Allow the user to enter a name for the curâ€
327 rent window.
328
329 C-a b
330 C-a C-b (break) Send a break to window.
331
332 C-a B (pow_break) Reopen the terminal line and send a break.
333
334 C-a c
335 C-a C-c (screen) Create a new window with a shell and switch
336 to that window.
337
338 C-a C (clear) Clear the screen.
339
340 C-a d
341 C-a C-d (detach) Detach screen from this terminal.
342
343 C-a D D (pow_detach) Detach and logout.
344
345 C-a f
346 C-a C-f (flow) Toggle flow on, off or auto.
347
348 C-a F (fit) Resize the window to the current region size.
349
350 C-a C-g (vbell) Toggles screen's visual bell mode.
351
352 C-a h (hardcopy) Write a hardcopy of the current window to the
353 file "hardcopy.n".
354
355 C-a H (log) Begins/ends logging of the current window to
356 the file "screenlog.n".
357
358 C-a i
359 C-a C-i (info) Show info about this window.
360
361 C-a k
362 C-a C-k (kill) Destroy current window.
363
364 C-a l
365 C-a C-l (redisplay) Fully refresh current window.
366
367 C-a L (login) Toggle this windows login slot. Available
368 only if screen is configured to update the
369 utmp database.
370
371 C-a m
372 C-a C-m (lastmsg) Repeat the last message displayed in the mesâ€
373 sage line.
374
375 C-a M (monitor) Toggles monitoring of the current window.
376
377 C-a space
378 C-a n
379 C-a C-n (next) Switch to the next window.
380
381 C-a N (number) Show the number (and title) of the current
382 window.
383
384 C-a backspace
385 C-a h
386 C-a p
387 C-a C-p (prev) Switch to the previous window (opposite of C-
388 a n).
389
390 C-a q
391 C-a C-q (xon) Send a control-q to the current window.
392
393 C-a Q (only) Delete all regions but the current one. See
394 also split, remove, focus.
395
396 C-a r
397 C-a C-r (wrap) Toggle the current window's line-wrap setting
398 (turn the current window's automatic margins
399 on and off).
400
401 C-a s
402 C-a C-s (xoff) Send a control-s to the current window.
403
404 C-a S (split) Split the current region horizontally into
405 two new ones. See also only, remove, focus.
406
407 C-a t
408 C-a C-t (time) Show system information.
409
410 C-a v (version) Display the version and compilation date.
411
412 C-a C-v (digraph) Enter digraph.
413
414 C-a w
415 C-a C-w (windows) Show a list of window.
416
417 C-a W (width) Toggle 80/132 columns.
418
419 C-a x
420 C-a C-x (lockscreen) Lock this terminal.
421
422 C-a X (remove) Kill the current region. See also split,
423 only, focus.
424
425 C-a z
426 C-a C-z (suspend) Suspend screen. Your system must support
427 BSD-style job-control.
428
429 C-a Z (reset) Reset the virtual terminal to its "power-on"
430 values.
431
432 C-a . (dumptermcap) Write out a ".termcap" file.
433
434 C-a ? (help) Show key bindings.
435
436 C-a C-\ (quit) Kill all windows and terminate screen.
437
438 C-a : (colon) Enter command line mode.
439
440 C-a [
441 C-a C-[
442 C-a esc (copy) Enter copy/scrollback mode.
443
444 C-a ] (paste .) Write the contents of the paste buffer to the
445 stdin queue of the current window.
446
447 C-a {
448 C-a } (history) Copy and paste a previous (command) line.
449
450 C-a > (writebuf) Write paste buffer to a file.
451
452 C-a < (readbuf) Reads the screen-exchange file into the paste
453 buffer.
454
455 C-a = (removebuf) Removes the file used by C-a < and C-a >.
456
457 C-a , (license) Shows where screen comes from, where it went
458 to and why you can use it.
459
460 C-a _ (silence) Start/stop monitoring the current window for
461 inactivity.
462
463 C-a | (split -v) Split the current region vertically into two
464 new ones.
465
466 C-a * (displays) Show a listing of all currently attached disâ€
467 plays.
468
469
470
471CUSTOMIZATION
472 The "socket directory" defaults either to $HOME/.screen or simply to
473 /tmp/screens or preferably to /var/run/screen chosen at compile-time.
474 If screen is installed setuid-root, then the administrator should comâ€
475 pile screen with an adequate (not NFS mounted) socket directory. If
476 screen is not running setuid-root, the user can specify any mode 700
477 directory in the environment variable $SCREENDIR.
478
479 When screen is invoked, it executes initialization commands from the
480 files "/etc/screenrc" and ".screenrc" in the user's home directory.
481 These are the "programmer's defaults" that can be overridden in the
482 following ways: for the global screenrc file screen searches for the
483 environment variable $SYSSCREENRC (this override feature may be disâ€
484 abled at compile-time). The user specific screenrc file is searched in
485 $SCREENRC, then $HOME/.screenrc. The command line option -c takes
486 precedence over the above user screenrc files.
487
488 Commands in these files are used to set options, bind functions to
489 keys, and to automatically establish one or more windows at the beginâ€
490 ning of your screen session. Commands are listed one per line, with
491 empty lines being ignored. A command's arguments are separated by tabs
492 or spaces, and may be surrounded by single or double quotes. A `#'
493 turns the rest of the line into a comment, except in quotes. Unintelâ€
494 ligible lines are warned about and ignored. Commands may contain refâ€
495 erences to environment variables. The syntax is the shell-like "$VAR "
496 or "${VAR}". Note that this causes incompatibility with previous screen
497 versions, as now the '$'-character has to be protected with '\' if no
498 variable substitution shall be performed. A string in single-quotes is
499 also protected from variable substitution.
500
501 Two configuration files are shipped as examples with your screen disâ€
502 tribution: "etc/screenrc" and "etc/etcscreenrc". They contain a number
503 of useful examples for various commands.
504
505 Customization can also be done 'on-line'. To enter the command mode
506 type `C-a :'. Note that commands starting with "def" change default
507 values, while others change current settings.
508
509 The following commands are available:
510
511 acladd usernames [crypted-pw]
512 addacl usernames
513
514 Enable users to fully access this screen session. Usernames can be one
515 user or a comma separated list of users. This command enables to attach
516 to the screen session and performs the equivalent of `aclchg usernames
517 +rwx "#?"'. executed. To add a user with restricted access, use the
518 `aclchg' command below. If an optional second parameter is supplied,
519 it should be a crypted password for the named user(s). `Addacl' is a
520 synonym to `acladd'. Multi user mode only.
521
522 aclchg usernames permbits list
523 chacl usernames permbits list
524
525 Change permissions for a comma separated list of users. Permission bits
526 are represented as `r', `w' and `x'. Prefixing `+' grants the permisâ€
527 sion, `-' removes it. The third parameter is a comma separated list of
528 commands and/or windows (specified either by number or title). The speâ€
529 cial list `#' refers to all windows, `?' to all commands. if usernames
530 consists of a single `*', all known users are affected. A command can
531 be executed when the user has the `x' bit for it. The user can type
532 input to a window when he has its `w' bit set and no other user obtains
533 a writelock for this window. Other bits are currently ignored. To
534 withdraw the writelock from another user in window 2: `aclchg username
535 -w+w 2'. To allow read-only access to the session: `aclchg username -w
536 "#"'. As soon as a user's name is known to screen he can attach to the
537 session and (per default) has full permissions for all command and winâ€
538 dows. Execution permission for the acl commands, `at' and others should
539 also be removed or the user may be able to regain write permission.
540 Rights of the special username nobody cannot be changed (see the "su"
541 command). `Chacl' is a synonym to `aclchg'. Multi user mode only.
542
543 acldel username
544
545 Remove a user from screen's access control list. If currently attached,
546 all the user's displays are detached from the session. He cannot attach
547 again. Multi user mode only.
548
549 aclgrp username [groupname]
550
551 Creates groups of users that share common access rights. The name of
552 the group is the username of the group leader. Each member of the group
553 inherits the permissions that are granted to the group leader. That
554 means, if a user fails an access check, another check is made for the
555 group leader. A user is removed from all groups the special value
556 "none" is used for groupname. If the second parameter is omitted all
557 groups the user is in are listed.
558
559 aclumask [[users]+bits |[users]-bits .... ]
560 umask [[users]+bits |[users]-bits .... ]
561
562 This specifies the access other users have to windows that will be creâ€
563 ated by the caller of the command. Users may be no, one or a comma
564 separated list of known usernames. If no users are specified, a list of
565 all currently known users is assumed. Bits is any combination of
566 access control bits allowed defined with the "aclchg" command. The speâ€
567 cial username "?" predefines the access that not yet known users will
568 be granted to any window initially. The special username "??" predeâ€
569 fines the access that not yet known users are granted to any command.
570 Rights of the special username nobody cannot be changed (see the "su"
571 command). `Umask' is a synonym to `aclumask'.
572
573 activity message
574
575 When any activity occurs in a background window that is being moniâ€
576 tored, screen displays a notification in the message line. The notifiâ€
577 cation message can be re-defined by means of the "activity" command.
578 Each occurrence of `%' in message is replaced by the number of the winâ€
579 dow in which activity has occurred, and each occurrence of `^G' is
580 replaced by the definition for bell in your termcap (usually an audible
581 bell). The default message is
582
583 'Activity in window %n'
584
585 Note that monitoring is off for all windows by default, but can be
586 altered by use of the "monitor" command (C-a M).
587
588 allpartial on|off
589
590 If set to on, only the current cursor line is refreshed on window
591 change. This affects all windows and is useful for slow terminal
592 lines. The previous setting of full/partial refresh for each window is
593 restored with "allpartial off". This is a global flag that immediately
594 takes effect on all windows overriding the "partial" settings. It does
595 not change the default redraw behavior of newly created windows.
596
597 altscreen on|off
598
599 If set to on, "alternate screen" support is enabled in virtual termiâ€
600 nals, just like in xterm. Initial setting is `off'.
601
602 at [identifier][#|*|%] command [args ... ]
603
604 Execute a command at other displays or windows as if it had been
605 entered there. "At" changes the context (the `current window' or `curâ€
606 rent display' setting) of the command. If the first parameter describes
607 a non-unique context, the command will be executed multiple times. If
608 the first parameter is of the form `identifier*' then identifier is
609 matched against user names. The command is executed once for each disâ€
610 play of the selected user(s). If the first parameter is of the form
611 `identifier%' identifier is matched against displays. Displays are
612 named after the ttys they attach. The prefix `/dev/' or `/dev/tty' may
613 be omitted from the identifier. If identifier has a `#' or nothing
614 appended it is matched against window numbers and titles. Omitting an
615 identifier in front of the `#', `*' or `%'-character selects all users,
616 displays or windows because a prefix-match is performed. Note that on
617 the affected display(s) a short message will describe what happened.
618 Permission is checked for initiator of the "at" command, not for the
619 owners of the affected display(s). Note that the '#' character works
620 as a comment introducer when it is preceded by whitespace. This can be
621 escaped by prefixing a '\'. Permission is checked for the initiator of
622 the "at" command, not for the owners of the affected display(s).
623 Caveat: When matching against windows, the command is executed at least
624 once per window. Commands that change the internal arrangement of winâ€
625 dows (like "other") may be called again. In shared windows the command
626 will be repeated for each attached display. Beware, when issuing toggle
627 commands like "login"! Some commands (e.g. "process") require that a
628 display is associated with the target windows. These commands may not
629 work correctly under "at" looping over windows.
630
631 attrcolor attrib [attribute/color-modifier]
632
633 This command can be used to highlight attributes by changing the color
634 of the text. If the attribute attrib is in use, the specified
635 attribute/color modifier is also applied. If no modifier is given, the
636 current one is deleted. See the "STRING ESCAPES" chapter for the syntax
637 of the modifier. Screen understands two pseudo-attributes, "i" stands
638 for high-intensity foreground color and "I" for high-intensity backâ€
639 ground color.
640
641 Examples:
642
643 attrcolor b "R"
644
645 Change the color to bright red if bold text is to be printed.
646
647 attrcolor u "-u b"
648
649 Use blue text instead of underline.
650
651 attrcolor b ".I"
652
653 Use bright colors for bold text. Most terminal emulators do this
654 already.
655
656 attrcolor i "+b"
657
658 Make bright colored text also bold.
659
660 autodetach on|off
661
662 Sets whether screen will automatically detach upon hangup, which saves
663 all your running programs until they are resumed with a screen -r comâ€
664 mand. When turned off, a hangup signal will terminate screen and all
665 the processes it contains. Autodetach is on by default.
666
667 autonuke on|off
668
669 Sets whether a clear screen sequence should nuke all the output that
670 has not been written to the terminal. See also "obuflimit".
671
672 backtick id lifespan autorefresh cmd args...
673 backtick id
674
675 Program the backtick command with the numerical id id. The output of
676 such a command is used for substitution of the "%`" string escape. The
677 specified lifespan is the number of seconds the output is considered
678 valid. After this time, the command is run again if a corresponding
679 string escape is encountered. The autorefresh parameter triggers an
680 automatic refresh for caption and hardstatus strings after the speciâ€
681 fied number of seconds. Only the last line of output is used for subâ€
682 stitution.
683 If both the lifespan and the autorefresh parameters are zero, the backâ€
684 tick program is expected to stay in the background and generate output
685 once in a while. In this case, the command is executed right away and
686 screen stores the last line of output. If a new line gets printed
687 screen will automatically refresh the hardstatus or the captions.
688 The second form of the command deletes the backtick command with the
689 numerical id id.
690
691 bce [on|off]
692
693 Change background-color-erase setting. If "bce" is set to on, all charâ€
694 acters cleared by an erase/insert/scroll/clear operation will be disâ€
695 played in the current background color. Otherwise the default backâ€
696 ground color is used.
697
698 bell_msg [message]
699
700 When a bell character is sent to a background window, screen displays a
701 notification in the message line. The notification message can be re-
702 defined by this command. Each occurrence of `%' in message is replaced
703 by the number of the window to which a bell has been sent, and each
704 occurrence of `^G' is replaced by the definition for bell in your termâ€
705 cap (usually an audible bell). The default message is
706
707 'Bell in window %n'
708
709 An empty message can be supplied to the "bell_msg" command to suppress
710 output of a message line (bell_msg ""). Without parameter, the current
711 message is shown.
712
713 bind [-c class] key [command [args]]
714
715 Bind a command to a key. By default, most of the commands provided by
716 screen are bound to one or more keys as indicated in the "DEFAULT KEY
717 BINDINGS" section, e.g. the command to create a new window is bound to
718 "C-c" and "c". The "bind" command can be used to redefine the key
719 bindings and to define new bindings. The key argument is either a sinâ€
720 gle character, a two-character sequence of the form "^x" (meaning "C-
721 x"), a backslash followed by an octal number (specifying the ASCII code
722 of the character), or a backslash followed by a second character, such
723 as "\^" or "\\". The argument can also be quoted, if you like. If no
724 further argument is given, any previously established binding for this
725 key is removed. The command argument can be any command listed in this
726 section.
727
728 If a command class is specified via the "-c" option, the key is bound
729 for the specified class. Use the "command" command to activate a class.
730 Command classes can be used to create multiple command keys or multi-
731 character bindings.
732
733 Some examples:
734
735 bind ' ' windows
736 bind ^k
737 bind k
738 bind K kill
739 bind ^f screen telnet foobar
740 bind \033 screen -ln -t root -h 1000 9 su
741
742 would bind the space key to the command that displays a list of windows
743 (so that the command usually invoked by "C-a C-w" would also be availâ€
744 able as "C-a space"). The next three lines remove the default kill
745 binding from "C-a C-k" and "C-a k". "C-a K" is then bound to the kill
746 command. Then it binds "C-f" to the command "create a window with a
747 TELNET connection to foobar", and bind "escape" to the command that
748 creates an non-login window with a.k.a. "root" in slot #9, with a supeâ€
749 ruser shell and a scrollback buffer of 1000 lines.
750
751 bind -c demo1 0 select 10
752 bind -c demo1 1 select 11
753 bind -c demo1 2 select 12
754 bindkey "^B" command -c demo1
755
756 makes "C-b 0" select window 10, "C-b 1" window 11, etc.
757
758 bind -c demo2 0 select 10
759 bind -c demo2 1 select 11
760 bind -c demo2 2 select 12
761 bind - command -c demo2
762
763 makes "C-a - 0" select window 10, "C-a - 1" window 11, etc.
764
765 bindkey [-d] [-m] [-a] [[-k|-t] string [cmd args]]
766
767 This command manages screen's input translation tables. Every entry in
768 one of the tables tells screen how to react if a certain sequence of
769 characters is encountered. There are three tables: one that should conâ€
770 tain actions programmed by the user, one for the default actions used
771 for terminal emulation and one for screen's copy mode to do cursor
772 movement. See section "INPUT TRANSLATION" for a list of default key
773 bindings.
774 If the -d option is given, bindkey modifies the default table, -m
775 changes the copy mode table and with neither option the user table is
776 selected. The argument string is the sequence of characters to which
777 an action is bound. This can either be a fixed string or a termcap keyâ€
778 board capability name (selectable with the -k option).
779 Some keys on a VT100 terminal can send a different string if applicaâ€
780 tion mode is turned on (e.g the cursor keys). Such keys have two
781 entries in the translation table. You can select the application mode
782 entry by specifying the -a option.
783 The -t option tells screen not to do inter-character timing. One cannot
784 turn off the timing if a termcap capability is used.
785 Cmd can be any of screen's commands with an arbitrary number of args.
786 If cmd is omitted the key-binding is removed from the table.
787 Here are some examples of keyboard bindings:
788
789 bindkey -d
790 Show all of the default key bindings. The application mode entries are
791 marked with [A].
792
793 bindkey -k k1 select 1
794 Make the "F1" key switch to window one.
795
796 bindkey -t foo stuff barfoo
797 Make "foo" an abbreviation of the word "barfoo". Timeout is disabled so
798 that users can type slowly.
799
800 bindkey "\024" mapdefault
801 This key-binding makes "^T" an escape character for key-bindings. If
802 you did the above "stuff barfoo" binding, you can enter the word "foo"
803 by typing "^Tfoo". If you want to insert a "^T" you have to press the
804 key twice (i.e., escape the escape binding).
805
806 bindkey -k F1 command
807 Make the F11 (not F1!) key an alternative screen escape (besides ^A).
808
809 break [duration]
810
811 Send a break signal for duration*0.25 seconds to this window. For non-
812 Posix systems the time interval may be rounded up to full seconds.
813 Most useful if a character device is attached to the window rather than
814 a shell process (See also chapter "WINDOW TYPES"). The maximum duration
815 of a break signal is limited to 15 seconds.
816
817 blanker
818
819 Activate the screen blanker. First the screen is cleared. If no blanker
820 program is defined, the cursor is turned off, otherwise, the program is
821 started and it's output is written to the screen. The screen blanker
822 is killed with the first keypress, the read key is discarded.
823 This command is normally used together with the "idle" command.
824
825 blankerprg [program args]
826
827 Defines a blanker program. Disables the blanker program if no arguments
828 are given.
829
830 breaktype [tcsendbreak|TIOCSBRK |TCSBRK]
831
832 Choose one of the available methods of generating a break signal for
833 terminal devices. This command should affect the current window only.
834 But it still behaves identical to "defbreaktype". This will be changed
835 in the future. Calling "breaktype" with no parameter displays the
836 break method for the current window.
837
838 bufferfile [exchange-file]
839
840 Change the filename used for reading and writing with the paste buffer.
841 If the optional argument to the "bufferfile" command is omitted, the
842 default setting ("/tmp/screen-exchange") is reactivated. The following
843 example will paste the system's password file into the screen window
844 (using the paste buffer, where a copy remains):
845
846 C-a : bufferfile /etc/passwd
847 C-a < C-a ]
848 C-a : bufferfile
849
850 c1 [on|off]
851
852 Change c1 code processing. "C1 on" tells screen to treat the input
853 characters between 128 and 159 as control functions. Such an 8-bit
854 code is normally the same as ESC followed by the corresponding 7-bit
855 code. The default setting is to process c1 codes and can be changed
856 with the "defc1" command. Users with fonts that have usable characters
857 in the c1 positions may want to turn this off.
858
859 caption always|splitonly [string]
860 caption string [string]
861
862 This command controls the display of the window captions. Normally a
863 caption is only used if more than one window is shown on the display
864 (split screen mode). But if the type is set to always screen shows a
865 caption even if only one window is displayed. The default is splitonly.
866
867 The second form changes the text used for the caption. You can use all
868 escapes from the "STRING ESCAPES" chapter. Screen uses a default of
869 `%3n %t'.
870
871 You can mix both forms by providing a string as an additional argument.
872
873 charset set
874
875 Change the current character set slot designation and charset mapping.
876 The first four character of set are treated as charset designators
877 while the fifth and sixth character must be in range '0' to '3' and set
878 the GL/GR charset mapping. On every position a '.' may be used to indiâ€
879 cate that the corresponding charset/mapping should not be changed (set
880 is padded to six characters internally by appending '.' chars). New
881 windows have "BBBB02" as default charset, unless a "encoding" command
882 is active.
883 The current setting can be viewed with the "info" command.
884
885 chdir [directory]
886
887 Change the current directory of screen to the specified directory or,
888 if called without an argument, to your home directory (the value of the
889 environment variable $HOME). All windows that are created by means of
890 the "screen" command from within ".screenrc" or by means of "C-a :
891 screen ..." or "C-a c" use this as their default directory. Without a
892 chdir command, this would be the directory from which screen was
893 invoked. Hardcopy and log files are always written to the window's
894 default directory, not the current directory of the process running in
895 the window. You can use this command multiple times in your .screenrc
896 to start various windows in different default directories, but the last
897 chdir value will affect all the windows you create interactively.
898
899 clear
900
901 Clears the current window and saves its image to the scrollback buffer.
902
903 colon [prefix]
904
905 Allows you to enter ".screenrc" command lines. Useful for on-the-fly
906 modification of key bindings, specific window creation and changing
907 settings. Note that the "set" keyword no longer exists! Usually comâ€
908 mands affect the current window rather than default settings for future
909 windows. Change defaults with commands starting with 'def...'.
910
911 If you consider this as the `Ex command mode' of screen, you may regard
912 "C-a esc" (copy mode) as its `Vi command mode'.
913
914 command [-c class]
915
916 This command has the same effect as typing the screen escape character
917 (^A). It is probably only useful for key bindings. If the "-c" option
918 is given, select the specified command class. See also "bind" and
919 "bindkey".
920
921 compacthist [on|off]
922
923 This tells screen whether to suppress trailing blank lines when
924 scrolling up text into the history buffer.
925
926 console [on|off]
927
928 Grabs or un-grabs the machines console output to a window. Note: Only
929 the owner of /dev/console can grab the console output. This command is
930 only available if the machine supports the ioctl TIOCCONS.
931
932 copy
933
934 Enter copy/scrollback mode. This allows you to copy text from the curâ€
935 rent window and its history into the paste buffer. In this mode a vi-
936 like `full screen editor' is active:
937 Movement keys:
938 h, j, k, l move the cursor line by line or column by column.
939 0, ^ and $ move to the leftmost column, to the first or last non-
940 whitespace character on the line.
941 H, M and L move the cursor to the leftmost column of the top, center
942 or bottom line of the window.
943 + and - positions one line up and down.
944 G moves to the specified absolute line (default: end of buffer).
945 | moves to the specified absolute column.
946 w, b, e move the cursor word by word.
947 B, E move the cursor WORD by WORD (as in vi).
948 C-u and C-d scroll the display up/down by the specified amount of
949 lines while preserving the cursor position. (Default: half screen-
950 full).
951 C-b and C-f scroll the display up/down a full screen.
952 g moves to the beginning of the buffer.
953 % jumps to the specified percentage of the buffer.
954
955 Note:
956 Emacs style movement keys can be customized by a .screenrc command.
957 (E.g. markkeys "h=^B:l=^F:$=^E") There is no simple method for a
958 full emacs-style keymap, as this involves multi-character codes.
959
960 Marking:
961 The copy range is specified by setting two marks. The text between
962 these marks will be highlighted. Press
963 space to set the first or second mark respectively.
964 Y and y used to mark one whole line or to mark from start of line.
965 W marks exactly one word.
966 Repeat count:
967 Any of these commands can be prefixed with a repeat count number by
968 pressing digits
969 0..9 which is taken as a repeat count.
970 Example: "C-a C-[ H 10 j 5 Y" will copy lines 11 to 15 into the
971 paste buffer.
972 Searching:
973 / Vi-like search forward.
974 ? Vi-like search backward.
975 C-a s Emacs style incremental search forward.
976 C-r Emacs style reverse i-search.
977 Specials:
978 There are however some keys that act differently than in vi. Vi
979 does not allow one to yank rectangular blocks of text, but screen
980 does. Press
981 c or C to set the left or right margin respectively. If no repeat
982 count is given, both default to the current cursor position.
983 Example: Try this on a rather full text screen: "C-a [ M 20 l SPACE
984 c 10 l 5 j C SPACE".
985
986 This moves one to the middle line of the screen, moves in 20 colâ€
987 umns left, marks the beginning of the paste buffer, sets the left
988 column, moves 5 columns down, sets the right column, and then marks
989 the end of the paste buffer. Now try:
990 "C-a [ M 20 l SPACE 10 l 5 j SPACE"
991
992 and notice the difference in the amount of text copied.
993 J joins lines. It toggles between 4 modes: lines separated by a newâ€
994 line character (012), lines glued seamless, lines separated by a
995 single whitespace and comma separated lines. Note that you can
996 prepend the newline character with a carriage return character, by
997 issuing a "crlf on".
998 v is for all the vi users with ":set numbers" - it toggles the left
999 margin between column 9 and 1. Press
1000 a before the final space key to toggle in append mode. Thus the conâ€
1001 tents of the paste buffer will not be overwritten, but is appended
1002 to.
1003 A toggles in append mode and sets a (second) mark.
1004 > sets the (second) mark and writes the contents of the paste buffer
1005 to the screen-exchange file (/tmp/screen-exchange per default) once
1006 copy-mode is finished.
1007 This example demonstrates how to dump the whole scrollback buffer
1008 to that file: "C-A [ g SPACE G $ >".
1009 C-g gives information about the current line and column.
1010 x exchanges the first mark and the current cursor position. You can
1011 use this to adjust an already placed mark.
1012 @ does nothing. Does not even exit copy mode.
1013 All keys not described here exit copy mode.
1014
1015 copy_reg [key]
1016
1017 No longer exists, use "readreg" instead.
1018
1019 crlf [on|off]
1020
1021 This affects the copying of text regions with the `C-a [' command. If
1022 it is set to `on', lines will be separated by the two character
1023 sequence `CR' - `LF'. Otherwise (default) only `LF' is used. When no
1024 parameter is given, the state is toggled.
1025
1026 debug on|off
1027
1028 Turns runtime debugging on or off. If screen has been compiled with
1029 option -DDEBUG debugging available and is turned on per default. Note
1030 that this command only affects debugging output from the main "SCREEN"
1031 process correctly. Debug output from attacher processes can only be
1032 turned off once and forever.
1033
1034 defc1 on|off
1035
1036 Same as the c1 command except that the default setting for new windows
1037 is changed. Initial setting is `on'.
1038
1039 defautonuke on|off
1040
1041 Same as the autonuke command except that the default setting for new
1042 displays is changed. Initial setting is `off'. Note that you can use
1043 the special `AN' terminal capability if you want to have a dependency
1044 on the terminal type.
1045
1046 defbce on|off
1047
1048 Same as the bce command except that the default setting for new windows
1049 is changed. Initial setting is `off'.
1050
1051 defbreaktype [tcsendbreak|TIOCSBRK |TCSBRK]
1052
1053 Choose one of the available methods of generating a break signal for
1054 terminal devices. The preferred methods are tcsendbreak and TIOCSBRK.
1055 The third, TCSBRK, blocks the complete screen session for the duration
1056 of the break, but it may be the only way to generate long breaks.
1057 Tcsendbreak and TIOCSBRK may or may not produce long breaks with spikes
1058 (e.g. 4 per second). This is not only system-dependent, this also difâ€
1059 fers between serial board drivers. Calling "defbreaktype" with no
1060 parameter displays the current setting.
1061
1062 defcharset [set]
1063
1064 Like the charset command except that the default setting for new winâ€
1065 dows is changed. Shows current default if called without argument.
1066
1067 defescape xy
1068
1069 Set the default command characters. This is equivalent to the "escape"
1070 except that it is useful multiuser sessions only. In a multiuser sesâ€
1071 sion "escape" changes the command character of the calling user, where
1072 "defescape" changes the default command characters for users that will
1073 be added later.
1074
1075 defflow on|off|auto [interrupt]
1076
1077 Same as the flow command except that the default setting for new winâ€
1078 dows is changed. Initial setting is `auto'. Specifying "defflow auto
1079 interrupt" is the same as the command-line options -fa and -i.
1080
1081 defgr on|off
1082
1083 Same as the gr command except that the default setting for new windows
1084 is changed. Initial setting is `off'.
1085
1086 defhstatus [status]
1087
1088 The hardstatus line that all new windows will get is set to status.
1089 This command is useful to make the hardstatus of every window display
1090 the window number or title or the like. Status may contain the same
1091 directives as in the window messages, but the directive escape characâ€
1092 ter is '^E' (octal 005) instead of '%'. This was done to make a misinâ€
1093 terpretation of program generated hardstatus lines impossible. If the
1094 parameter status is omitted, the current default string is displayed.
1095 Per default the hardstatus line of new windows is empty.
1096
1097 defencoding enc
1098
1099 Same as the encoding command except that the default setting for new
1100 windows is changed. Initial setting is the encoding taken from the terâ€
1101 minal.
1102
1103 deflog on|off
1104
1105 Same as the log command except that the default setting for new windows
1106 is changed. Initial setting is `off'.
1107
1108 deflogin on|off
1109
1110 Same as the login command except that the default setting for new winâ€
1111 dows is changed. This is initialized with `on' as distributed (see conâ€
1112 fig.h.in).
1113
1114 defmode mode
1115
1116 The mode of each newly allocated pseudo-tty is set to mode. Mode is an
1117 octal number. When no "defmode" command is given, mode 0622 is used.
1118
1119 defmonitor on|off
1120
1121 Same as the monitor command except that the default setting for new
1122 windows is changed. Initial setting is `off'.
1123
1124 defnonblock on|off|numsecs
1125
1126 Same as the nonblock command except that the default setting for disâ€
1127 plays is changed. Initial setting is `off'.
1128
1129 defobuflimit limit
1130
1131 Same as the obuflimit command except that the default setting for new
1132 displays is changed. Initial setting is 256 bytes. Note that you can
1133 use the special 'OL' terminal capability if you want to have a depenâ€
1134 dency on the terminal type.
1135
1136 defscrollback num
1137
1138 Same as the scrollback command except that the default setting for new
1139 windows is changed. Initial setting is 100.
1140
1141 defshell command
1142
1143 Synonym to the shell command. See there.
1144
1145 defsilence on|off
1146
1147 Same as the silence command except that the default setting for new
1148 windows is changed. Initial setting is `off'.
1149
1150 defslowpaste msec"
1151
1152 Same as the slowpaste command except that the default setting for new
1153 windows is changed. Initial setting is 0 milliseconds, meaning `off'.
1154
1155 defutf8 on|off
1156
1157 Same as the utf8 command except that the default setting for new winâ€
1158 dows is changed. Initial setting is `on' if screen was started with
1159 "-U", otherwise `off'.
1160
1161 defwrap on|off
1162
1163 Same as the wrap command except that the default setting for new winâ€
1164 dows is changed. Initially line-wrap is on and can be toggled with the
1165 "wrap" command ("C-a r") or by means of "C-a : wrap on|off".
1166
1167 defwritelock on|off|auto
1168
1169 Same as the writelock command except that the default setting for new
1170 windows is changed. Initially writelocks will off.
1171
1172 defzombie [keys]
1173
1174 Synonym to the zombie command. Both currently change the default. See
1175 there.
1176
1177 detach [-h]
1178
1179 Detach the screen session (disconnect it from the terminal and put it
1180 into the background). This returns you to the shell where you invoked
1181 screen. A detached screen can be resumed by invoking screen with the
1182 -r option (see also section "COMMAND-LINE OPTIONS"). The -h option
1183 tells screen to immediately close the connection to the terminal
1184 ("hangup").
1185
1186 dinfo
1187
1188 Show what screen thinks about your terminal. Useful if you want to know
1189 why features like color or the alternate charset don't work.
1190
1191 displays
1192
1193 Shows a tabular listing of all currently connected user front-ends
1194 (displays). This is most useful for multiuser sessions.
1195
1196 digraph [preset]
1197
1198 This command prompts the user for a digraph sequence. The next two
1199 characters typed are looked up in a builtin table and the resulting
1200 character is inserted in the input stream. For example, if the user
1201 enters 'a"', an a-umlaut will be inserted. If the first character
1202 entered is a 0 (zero), screen will treat the following characters (up
1203 to three) as an octal number instead. The optional argument preset is
1204 treated as user input, thus one can create an "umlaut" key. For examâ€
1205 ple the command "bindkey ^K digraph '"'" enables the user to generate
1206 an a-umlaut by typing CTRL-K a.
1207
1208 dumptermcap
1209
1210 Write the termcap entry for the virtual terminal optimized for the curâ€
1211 rently active window to the file ".termcap" in the user's
1212 "$HOME/.screen" directory (or wherever screen stores its sockets. See
1213 the "FILES" section below). This termcap entry is identical to the
1214 value of the environment variable $TERMCAP that is set up by screen for
1215 each window. For terminfo based systems you will need to run a conâ€
1216 verter like captoinfo and then compile the entry with tic.
1217
1218 echo [-n] message
1219
1220 The echo command may be used to annoy screen users with a 'message of
1221 the day'. Typically installed in a global /etc/screenrc. The option
1222 "-n" may be used to suppress the line feed. See also "sleep". Echo is
1223 also useful for online checking of environment variables.
1224
1225 encoding enc [enc]
1226
1227 Tell screen how to interpret the input/output. The first argument sets
1228 the encoding of the current window. Each window can emulate a different
1229 encoding. The optional second parameter overwrites the encoding of the
1230 connected terminal. It should never be needed as screen uses the locale
1231 setting to detect the encoding. There is also a way to select a termiâ€
1232 nal encoding depending on the terminal type by using the "KJ" termcap
1233 entry.
1234
1235 Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, GBK, KOI8-R,
1236 CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6,
1237 ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis.
1238
1239 See also "defencoding", which changes the default setting of a new winâ€
1240 dow.
1241
1242 escape xy
1243
1244 Set the command character to x and the character generating a literal
1245 command character (by triggering the "meta" command) to y (similar to
1246 the -e option). Each argument is either a single character, a two-
1247 character sequence of the form "^x" (meaning "C-x"), a backslash folâ€
1248 lowed by an octal number (specifying the ASCII code of the character),
1249 or a backslash followed by a second character, such as "\^" or "\\".
1250 The default is "^Aa".
1251
1252 eval command1 [command2 ...]
1253
1254 Parses and executes each argument as separate command.
1255
1256 exec [[fdpat] newcommand [args ...]]
1257
1258 Run a unix subprocess (specified by an executable path newcommand and
1259 its optional arguments) in the current window. The flow of data between
1260 newcommands stdin/stdout/stderr, the process originally started in the
1261 window (let us call it "application-process") and screen itself (winâ€
1262 dow) is controlled by the file descriptor pattern fdpat. This pattern
1263 is basically a three character sequence representing stdin, stdout and
1264 stderr of newcommand. A dot (.) connects the file descriptor to screen.
1265 An exclamation mark (!) causes the file descriptor to be connected to
1266 the application-process. A colon (:) combines both. User input will go
1267 to newcommand unless newcommand receives the application-process' outâ€
1268 put (fdpats first character is `!' or `:') or a pipe symbol (|) is
1269 added (as a fourth character) to the end of fdpat.
1270 Invoking `exec' without arguments shows name and arguments of the curâ€
1271 rently running subprocess in this window. Only one subprocess a time
1272 can be running in each window.
1273 When a subprocess is running the `kill' command will affect it instead
1274 of the windows process.
1275 Refer to the postscript file `doc/fdpat.ps' for a confusing illustraâ€
1276 tion of all 21 possible combinations. Each drawing shows the digits
1277 2,1,0 representing the three file descriptors of newcommand. The box
1278 marked `W' is the usual pty that has the application-process on its
1279 slave side. The box marked `P' is the secondary pty that now has
1280 screen at its master side.
1281
1282 Abbreviations:
1283 Whitespace between the word `exec' and fdpat and the command can be
1284 omitted. Trailing dots and a fdpat consisting only of dots can be omitâ€
1285 ted. A simple `|' is synonymous for the pattern `!..|'; the word exec
1286 can be omitted here and can always be replaced by `!'.
1287
1288 Examples:
1289
1290 exec ... /bin/sh
1291 exec /bin/sh
1292 !/bin/sh
1293
1294 Creates another shell in the same window, while the original shell is
1295 still running. Output of both shells is displayed and user input is
1296 sent to the new /bin/sh.
1297
1298 exec !.. stty 19200
1299 exec ! stty 19200
1300 !!stty 19200
1301
1302 Set the speed of the window's tty. If your stty command operates on
1303 stdout, then add another `!'.
1304
1305 exec !..| less
1306 |less
1307
1308 This adds a pager to the window output. The special character `|' is
1309 needed to give the user control over the pager although it gets its
1310 input from the window's process. This works, because less listens on
1311 stderr (a behavior that screen would not expect without the `|') when
1312 its stdin is not a tty. Less versions newer than 177 fail miserably
1313 here; good old pg still works.
1314
1315 !:sed -n s/.*Error.*/\007/p
1316
1317 Sends window output to both, the user and the sed command. The sed
1318 inserts an additional bell character (oct. 007) to the window output
1319 seen by screen. This will cause "Bell in window x" messages, whenever
1320 the string "Error" appears in the window.
1321
1322 fit
1323
1324 Change the window size to the size of the current region. This command
1325 is needed because screen doesn't adapt the window size automatically if
1326 the window is displayed more than once.
1327
1328 flow [on|off|auto]
1329
1330 Sets the flow-control mode for this window. Without parameters it
1331 cycles the current window's flow-control setting from "automatic" to
1332 "on" to "off". See the discussion on "FLOW-CONTROL" later on in this
1333 document for full details and note, that this is subject to change in
1334 future releases. Default is set by `defflow'.
1335
1336 focus [up|down|top|bottom]
1337
1338 Move the input focus to the next region. This is done in a cyclic way
1339 so that the top region is selected after the bottom one. If no subcomâ€
1340 mand is given it defaults to `down'. `up' cycles in the opposite order,
1341 `top' and `bottom' go to the top and bottom region respectively. Useful
1342 bindings are (j and k as in vi)
1343 bind j focus down
1344 bind k focus up
1345 bind t focus top
1346 bind b focus bottom
1347 Note that k is traditionally bound to the kill command.
1348
1349 gr [on|off]
1350
1351 Turn GR charset switching on/off. Whenever screen sees an input characâ€
1352 ter with the 8th bit set, it will use the charset stored in the GR slot
1353 and print the character with the 8th bit stripped. The default (see
1354 also "defgr") is not to process GR switching because otherwise the
1355 ISO88591 charset would not work.
1356
1357 hardcopy [-h] [file]
1358
1359 Writes out the currently displayed image to the file file, or, if no
1360 filename is specified, to hardcopy.n in the default directory, where n
1361 is the number of the current window. This either appends or overwrites
1362 the file if it exists. See below. If the option -h is specified, dump
1363 also the contents of the scrollback buffer.
1364
1365 hardcopy_append on|off
1366
1367 If set to "on", screen will append to the "hardcopy.n" files created by
1368 the command "C-a h", otherwise these files are overwritten each time.
1369 Default is `off'.
1370
1371 hardcopydir directory
1372
1373 Defines a directory where hardcopy files will be placed. If unset,
1374 hardcopys are dumped in screen's current working directory.
1375
1376 hardstatus [on|off]
1377 hardstatus [always]lastline|message|ignore [string]
1378 hardstatus string [string]
1379
1380 This command configures the use and emulation of the terminal's hardâ€
1381 status line. The first form toggles whether screen will use the hardâ€
1382 ware status line to display messages. If the flag is set to `off',
1383 these messages are overlaid in reverse video mode at the display line.
1384 The default setting is `on'.
1385
1386 The second form tells screen what to do if the terminal doesn't have a
1387 hardstatus line (i.e. the termcap/terminfo capabilities "hs", "ts",
1388 "fs" and "ds" are not set). If the type "lastline" is used, screen will
1389 reserve the last line of the display for the hardstatus. "message" uses
1390 screen's message mechanism and "ignore" tells screen never to display
1391 the hardstatus. If you prepend the word "always" to the type (e.g.,
1392 "alwayslastline"), screen will use the type even if the terminal supâ€
1393 ports a hardstatus.
1394
1395 The third form specifies the contents of the hardstatus line. '%h' is
1396 used as default string, i.e., the stored hardstatus of the current winâ€
1397 dow (settable via "ESC]0;<string>^G" or "ESC_<string>ESC\") is disâ€
1398 played. You can customize this to any string you like including the
1399 escapes from the "STRING ESCAPES" chapter. If you leave out the arguâ€
1400 ment string, the current string is displayed.
1401
1402 You can mix the second and third form by providing the string as addiâ€
1403 tional argument.
1404
1405 height [-w|-d] [lines [cols]]
1406
1407 Set the display height to a specified number of lines. When no argument
1408 is given it toggles between 24 and 42 lines display. You can also specâ€
1409 ify a width if you want to change both values. The -w option tells
1410 screen to leave the display size unchanged and just set the window
1411 size, -d vice versa.
1412
1413 help [-c class]
1414
1415 Not really a online help, but displays a help screen showing you all
1416 the key bindings. The first pages list all the internal commands folâ€
1417 lowed by their current bindings. Subsequent pages will display the
1418 custom commands, one command per key. Press space when you're done
1419 reading each page, or return to exit early. All other characters are
1420 ignored. If the "-c" option is given, display all bound commands for
1421 the specified command class. See also "DEFAULT KEY BINDINGS" section.
1422
1423 history
1424
1425 Usually users work with a shell that allows easy access to previous
1426 commands. For example csh has the command "!!" to repeat the last comâ€
1427 mand executed. Screen allows you to have a primitive way of re-calling
1428 "the command that started ...": You just type the first letter of that
1429 command, then hit `C-a {' and screen tries to find a previous line that
1430 matches with the `prompt character' to the left of the cursor. This
1431 line is pasted into this window's input queue. Thus you have a crude
1432 command history (made up by the visible window and its scrollback bufâ€
1433 fer).
1434
1435 hstatus status
1436
1437 Change the window's hardstatus line to the string status.
1438
1439 idle [timeout [cmd args]]
1440
1441 Sets a command that is run after the specified number of seconds inacâ€
1442 tivity is reached. This command will normally be the "blanker" command
1443 to create a screen blanker, but it can be any screen command. If no
1444 command is specified, only the timeout is set. A timeout of zero (ot
1445 the special timeout off) disables the timer. If no arguments are
1446 given, the current settings are displayed.
1447
1448 ignorecase [on|off]
1449
1450 Tell screen to ignore the case of characters in searches. Default is
1451 `off'.
1452
1453 info
1454
1455 Uses the message line to display some information about the current
1456 window: the cursor position in the form "(column,row)" starting with
1457 "(1,1)", the terminal width and height plus the size of the scrollback
1458 buffer in lines, like in "(80,24)+50", the current state of window
1459 XON/XOFF flow control is shown like this (See also section FLOW CONâ€
1460 TROL):
1461
1462 +flow automatic flow control, currently on.
1463 -flow automatic flow control, currently off.
1464 +(+)flow flow control enabled. Agrees with automatic control.
1465 -(+)flow flow control disabled. Disagrees with automatic control.
1466 +(-)flow flow control enabled. Disagrees with automatic control.
1467 -(-)flow flow control disabled. Agrees with automatic control.
1468
1469 The current line wrap setting (`+wrap' indicates enabled, `-wrap' not)
1470 is also shown. The flags `ins', `org', `app', `log', `mon' or `nored'
1471 are displayed when the window is in insert mode, origin mode, applicaâ€
1472 tion-keypad mode, has output logging, activity monitoring or partial
1473 redraw enabled.
1474
1475 The currently active character set (G0, G1, G2, or G3) and in square
1476 brackets the terminal character sets that are currently designated as
1477 G0 through G3 is shown. If the window is in UTF-8 mode, the string
1478 "UTF-8" is shown instead.
1479
1480 Additional modes depending on the type of the window are displayed at
1481 the end of the status line (See also chapter "WINDOW TYPES").
1482 If the state machine of the terminal emulator is in a non-default
1483 state, the info line is started with a string identifying the current
1484 state.
1485 For system information use the "time" command.
1486
1487 ins_reg [key]
1488
1489 No longer exists, use "paste" instead.
1490
1491 kill
1492
1493 Kill current window.
1494 If there is an `exec' command running then it is killed. Otherwise the
1495 process (shell) running in the window receives a HANGUP condition, the
1496 window structure is removed and screen (your display) switches to
1497 another window. When the last window is destroyed, screen exits.
1498 After a kill screen switches to the previously displayed window.
1499 Note: Emacs users should keep this command in mind, when killing a
1500 line. It is recommended not to use "C-a" as the screen escape key or
1501 to rebind kill to "C-a K".
1502
1503 lastmsg
1504
1505 Redisplay the last contents of the message/status line. Useful if
1506 you're typing when a message appears, because the message goes away
1507 when you press a key (unless your terminal has a hardware status line).
1508 Refer to the commands "msgwait" and "msgminwait" for fine tuning.
1509
1510 license
1511
1512 Display the disclaimer page. This is done whenever screen is started
1513 without options, which should be often enough. See also the
1514 "startup_message" command.
1515
1516 lockscreen
1517
1518 Lock this display. Call a screenlock program (/local/bin/lck or
1519 /usr/bin/lock or a builtin if no other is available). Screen does not
1520 accept any command keys until this program terminates. Meanwhile proâ€
1521 cesses in the windows may continue, as the windows are in the
1522 `detached' state. The screenlock program may be changed through the
1523 environment variable $LOCKPRG (which must be set in the shell from
1524 which screen is started) and is executed with the user's uid and gid.
1525 Warning: When you leave other shells unlocked and you have no password
1526 set on screen, the lock is void: One could easily re-attach from an
1527 unlocked shell. This feature should rather be called `lockterminal'.
1528
1529 log [on|off]
1530
1531 Start/stop writing output of the current window to a file "screenlog.n"
1532 in the window's default directory, where n is the number of the current
1533 window. This filename can be changed with the `logfile' command. If no
1534 parameter is given, the state of logging is toggled. The session log is
1535 appended to the previous contents of the file if it already exists. The
1536 current contents and the contents of the scrollback history are not
1537 included in the session log. Default is `off'.
1538
1539 logfile filename
1540 logfile flush secs
1541
1542 Defines the name the log files will get. The default is "screenlog.%n".
1543 The second form changes the number of seconds screen will wait before
1544 flushing the logfile buffer to the file-system. The default value is 10
1545 seconds.
1546
1547 login [on|off]
1548
1549 Adds or removes the entry in the utmp database file for the current
1550 window. This controls if the window is `logged in'. When no parameter
1551 is given, the login state of the window is toggled. Additionally to
1552 that toggle, it is convenient having a `log in' and a `log out' key.
1553 E.g. `bind I login on' and `bind O login off' will map these keys to be
1554 C-a I and C-a O. The default setting (in config.h.in) should be "on"
1555 for a screen that runs under suid-root. Use the "deflogin" command to
1556 change the default login state for new windows. Both commands are only
1557 present when screen has been compiled with utmp support.
1558
1559 logtstamp [on|off]
1560 logtstamp after [secs]
1561 logtstamp string [string]
1562
1563 This command controls logfile time-stamp mechanism of screen. If time-
1564 stamps are turned "on", screen adds a string containing the current
1565 time to the logfile after two minutes of inactivity. When output conâ€
1566 tinues and more than another two minutes have passed, a second time-
1567 stamp is added to document the restart of the output. You can change
1568 this timeout with the second form of the command. The third form is
1569 used for customizing the time-stamp string (`-- %n:%t -- time-stamp --
1570 %M/%d/%y %c:%s --\n' by default).
1571
1572 mapdefault
1573
1574 Tell screen that the next input character should only be looked up in
1575 the default bindkey table. See also "bindkey".
1576
1577 mapnotnext
1578
1579 Like mapdefault, but don't even look in the default bindkey table.
1580
1581 maptimeout [timo]
1582
1583 Set the inter-character timer for input sequence detection to a timeout
1584 of timo ms. The default timeout is 300ms. Maptimeout with no arguments
1585 shows the current setting. See also "bindkey".
1586
1587 markkeys string
1588
1589 This is a method of changing the keymap used for copy/history mode.
1590 The string is made up of oldchar=newchar pairs which are separated by
1591 `:'. Example: The string "B=^B:F=^F" will change the keys `C-b' and `C-
1592 f' to the vi style binding (scroll up/down fill page). This happens to
1593 be the default binding for `B' and `F'. The command "markkeys
1594 h=^B:l=^F:$=^E" would set the mode for an emacs-style binding. If your
1595 terminal sends characters, that cause you to abort copy mode, then this
1596 command may help by binding these characters to do nothing. The no-op
1597 character is `@' and is used like this: "markkeys @=L=H" if you do not
1598 want to use the `H' or `L' commands any longer. As shown in this examâ€
1599 ple, multiple keys can be assigned to one function in a single stateâ€
1600 ment.
1601
1602 maxwin num
1603
1604 Set the maximum window number screen will create. Doesn't affect
1605 already existing windows. The number may only be decreased.
1606
1607 meta
1608
1609 Insert the command character (C-a) in the current window's input
1610 stream.
1611
1612 monitor [on|off]
1613
1614 Toggles activity monitoring of windows. When monitoring is turned on
1615 and an affected window is switched into the background, you will
1616 receive the activity notification message in the status line at the
1617 first sign of output and the window will also be marked with an `@' in
1618 the window-status display. Monitoring is initially off for all winâ€
1619 dows.
1620
1621 msgminwait sec
1622
1623 Defines the time screen delays a new message when one message is curâ€
1624 rently displayed. The default is 1 second.
1625
1626 msgwait sec
1627
1628 Defines the time a message is displayed if screen is not disturbed by
1629 other activity. The default is 5 seconds.
1630
1631 multiuser on|off
1632
1633 Switch between singleuser and multiuser mode. Standard screen operation
1634 is singleuser. In multiuser mode the commands `acladd', `aclchg',
1635 `aclgrp' and `acldel' can be used to enable (and disable) other users
1636 accessing this screen session.
1637
1638 nethack on|off
1639
1640 Changes the kind of error messages used by screen. When you are familâ€
1641 iar with the game "nethack", you may enjoy the nethack-style messages
1642 which will often blur the facts a little, but are much funnier to read.
1643 Anyway, standard messages often tend to be unclear as well.
1644 This option is only available if screen was compiled with the NETHACK
1645 flag defined. The default setting is then determined by the presence of
1646 the environment variable $NETHACKOPTIONS and the file ~/.nethackrc - if
1647 either one is present, the default is on.
1648
1649 next
1650
1651 Switch to the next window. This command can be used repeatedly to
1652 cycle through the list of windows.
1653
1654 nonblock [on|off|numsecs]
1655
1656 Tell screen how to deal with user interfaces (displays) that cease to
1657 accept output. This can happen if a user presses ^S or a TCP/modem conâ€
1658 nection gets cut but no hangup is received. If nonblock is off (this is
1659 the default) screen waits until the display restarts to accept the outâ€
1660 put. If nonblock is on, screen waits until the timeout is reached (on
1661 is treated as 1s). If the display still doesn't receive characters,
1662 screen will consider it "blocked" and stop sending characters to it. If
1663 at some time it restarts to accept characters, screen will unblock the
1664 display and redisplay the updated window contents.
1665
1666 number [n]
1667
1668 Change the current windows number. If the given number n is already
1669 used by another window, both windows exchange their numbers. If no
1670 argument is specified, the current window number (and title) is shown.
1671
1672 obuflimit [limit]
1673
1674 If the output buffer contains more bytes than the specified limit, no
1675 more data will be read from the windows. The default value is 256. If
1676 you have a fast display (like xterm), you can set it to some higher
1677 value. If no argument is specified, the current setting is displayed.
1678
1679 only
1680
1681 Kill all regions but the current one.
1682
1683 other
1684
1685 Switch to the window displayed previously. If this window does no
1686 longer exist, other has the same effect as next.
1687
1688 partial on|off
1689
1690 Defines whether the display should be refreshed (as with redisplay)
1691 after switching to the current window. This command only affects the
1692 current window. To immediately affect all windows use the allpartial
1693 command. Default is `off', of course. This default is fixed, as there
1694 is currently no defpartial command.
1695
1696 password [crypted_pw]
1697
1698 Present a crypted password in your ".screenrc" file and screen will ask
1699 for it, whenever someone attempts to resume a detached. This is useful
1700 if you have privileged programs running under screen and you want to
1701 protect your session from reattach attempts by another user masqueradâ€
1702 ing as your uid (i.e. any superuser.) If no crypted password is speciâ€
1703 fied, screen prompts twice for typing a password and places its encrypâ€
1704 tion in the paste buffer. Default is `none', this disables password
1705 checking.
1706
1707 paste [registers [dest_reg]]
1708
1709 Write the (concatenated) contents of the specified registers to the
1710 stdin queue of the current window. The register '.' is treated as the
1711 paste buffer. If no parameter is given the user is prompted for a sinâ€
1712 gle register to paste. The paste buffer can be filled with the copy,
1713 history and readbuf commands. Other registers can be filled with the
1714 register, readreg and paste commands. If paste is called with a second
1715 argument, the contents of the specified registers is pasted into the
1716 named destination register rather than the window. If '.' is used as
1717 the second argument, the displays paste buffer is the destination.
1718 Note, that "paste" uses a wide variety of resources: Whenever a second
1719 argument is specified no current window is needed. When the source
1720 specification only contains registers (not the paste buffer) then there
1721 need not be a current display (terminal attached), as the registers are
1722 a global resource. The paste buffer exists once for every user.
1723
1724 pastefont [on|off]
1725
1726 Tell screen to include font information in the paste buffer. The
1727 default is not to do so. This command is especially useful for multi
1728 character fonts like kanji.
1729
1730 pow_break
1731
1732 Reopen the window's terminal line and send a break condition. See
1733 `break'.
1734
1735 pow_detach
1736
1737 Power detach. Mainly the same as detach, but also sends a HANGUP sigâ€
1738 nal to the parent process of screen. CAUTION: This will result in a
1739 logout, when screen was started from your login shell.
1740
1741 pow_detach_msg [message]
1742
1743 The message specified here is output whenever a `Power detach' was perâ€
1744 formed. It may be used as a replacement for a logout message or to
1745 reset baud rate, etc. Without parameter, the current message is shown.
1746
1747 prev
1748
1749 Switch to the window with the next lower number. This command can be
1750 used repeatedly to cycle through the list of windows.
1751
1752 printcmd [cmd]
1753
1754 If cmd is not an empty string, screen will not use the terminal capaâ€
1755 bilities "po/pf" if it detects an ansi print sequence ESC [ 5 i, but
1756 pipe the output into cmd. This should normally be a command like "lpr"
1757 or "'cat > /tmp/scrprint'". printcmd without a command displays the
1758 current setting. The ansi sequence ESC \ ends printing and closes the
1759 pipe.
1760 Warning: Be careful with this command! If other user have write access
1761 to your terminal, they will be able to fire off print commands.
1762
1763 process [key]
1764
1765 Stuff the contents of the specified register into screen's input queue.
1766 If no argument is given you are prompted for a register name. The text
1767 is parsed as if it had been typed in from the user's keyboard. This
1768 command can be used to bind multiple actions to a single key.
1769
1770 quit
1771
1772 Kill all windows and terminate screen. Note that on VT100-style termiâ€
1773 nals the keys C-4 and C-\ are identical. This makes the default bindâ€
1774 ings dangerous: Be careful not to type C-a C-4 when selecting window
1775 no. 4. Use the empty bind command (as in "bind '^\'") to remove a key
1776 binding.
1777
1778 readbuf [-e encoding] [filename]
1779
1780 Reads the contents of the specified file into the paste buffer. You
1781 can tell screen the encoding of the file via the -e option. If no file
1782 is specified, the screen-exchange filename is used. See also "bufferâ€
1783 file" command.
1784
1785 readreg [-e encoding] [register [filename]]
1786
1787 Does one of two things, dependent on number of arguments: with zero or
1788 one arguments it it duplicates the paste buffer contents into the regâ€
1789 ister specified or entered at the prompt. With two arguments it reads
1790 the contents of the named file into the register, just as readbuf reads
1791 the screen-exchange file into the paste buffer. You can tell screen
1792 the encoding of the file via the -e option. The following example will
1793 paste the system's password file into the screen window (using register
1794 p, where a copy remains):
1795
1796 C-a : readreg p /etc/passwd
1797 C-a : paste p
1798
1799 redisplay
1800
1801 Redisplay the current window. Needed to get a full redisplay when in
1802 partial redraw mode.
1803
1804 register [-e encoding] key string
1805
1806 Save the specified string to the register key. The encoding of the
1807 string can be specified via the -e option. See also the "paste" comâ€
1808 mand.
1809
1810 remove
1811
1812 Kill the current region. This is a no-op if there is only one region.
1813
1814 removebuf
1815
1816 Unlinks the screen-exchange file used by the commands "writebuf" and
1817 "readbuf".
1818
1819 reset
1820
1821 Reset the virtual terminal to its "power-on" values. Useful when
1822 strange settings (like scroll regions or graphics character set) are
1823 left over from an application.
1824
1825 resize
1826
1827 Resize the current region. The space will be removed from or added to
1828 the region below or if there's not enough space from the region above.
1829
1830 resize +N increase current region height by N
1831
1832 resize -N decrease current region height by N
1833
1834 resize N set current region height to N
1835
1836 resize = make all windows equally high
1837
1838 resize max maximize current region height
1839
1840 resize min minimize current region height
1841
1842 screen [-opts] [n] [cmd [args]]
1843
1844 Establish a new window. The flow-control options (-f, -fn and -fa),
1845 title (a.k.a.) option (-t), login options (-l and -ln) , terminal type
1846 option (-T <term>), the all-capability-flag (-a) and scrollback option
1847 (-h <num>) may be specified with each command. The option (-M) turns
1848 monitoring on for this window. The option (-L) turns output logging on
1849 for this window. If an optional number n in the range 0..MAXWIN-1 is
1850 given, the window number n is assigned to the newly created window (or,
1851 if this number is already in-use, the next available number). If a
1852 command is specified after "screen", this command (with the given arguâ€
1853 ments) is started in the window; otherwise, a shell is created. Thus,
1854 if your ".screenrc" contains the lines
1855
1856 # example for .screenrc:
1857 screen 1
1858 screen -fn -t foobar -L 2 telnet foobar
1859
1860 screen creates a shell window (in window #1) and a window with a TELNET
1861 connection to the machine foobar (with no flow-control using the title
1862 "foobar" in window #2) and will write a logfile ("screenlog.2") of the
1863 telnet session. Note, that unlike previous versions of screen no addiâ€
1864 tional default window is created when "screen" commands are included in
1865 your ".screenrc" file. When the initialization is completed, screen
1866 switches to the last window specified in your .screenrc file or, if
1867 none, opens a default window #0.
1868 Screen has built in some functionality of "cu" and "telnet". See also
1869 chapter "WINDOW TYPES".
1870
1871 scrollback num
1872
1873 Set the size of the scrollback buffer for the current windows to num
1874 lines. The default scrollback is 100 lines. See also the "defscrollâ€
1875 back" command and use "C-a i" to view the current setting.
1876
1877 select [WindowID]
1878
1879 Switch to the window identified by WindowID. This can be a prefix of a
1880 window title (alphanumeric window name) or a window number. The paramâ€
1881 eter is optional and if omitted, you get prompted for an identifier.
1882 When a new window is established, the first available number is
1883 assigned to this window. Thus, the first window can be activated by
1884 "select 0". The number of windows is limited at compile-time by the
1885 MAXWIN configuration parameter (which defaults to 40 in Debian). There
1886 are two special WindowIDs, "-" selects the internal blank window and
1887 "." selects the current window. The latter is useful if used with
1888 screen's "-X" option.
1889
1890 sessionname [name]
1891
1892 Rename the current session. Note, that for "screen -list" the name
1893 shows up with the process-id prepended. If the argument "name" is omitâ€
1894 ted, the name of this session is displayed. Caution: Among other probâ€
1895 lems, the $STY environment variable still reflects the old name. Use
1896 of this command is strongly discouraged. Use the "-S" commandline
1897 option if you need this feature. The default is constructed from the
1898 tty and host names.
1899
1900 setenv [var [string]]
1901
1902 Set the environment variable var to value string. If only var is specâ€
1903 ified, the user will be prompted to enter a value. If no parameters
1904 are specified, the user will be prompted for both variable and value.
1905 The environment is inherited by all subsequently forked shells.
1906
1907 setsid [on|off]
1908
1909 Normally screen uses different sessions and process groups for the winâ€
1910 dows. If setsid is turned off, this is not done anymore and all windows
1911 will be in the same process group as the screen backend process. This
1912 also breaks job-control, so be careful. The default is on, of course.
1913 This command is probably useful only in rare circumstances.
1914
1915 shell command
1916
1917 Set the command to be used to create a new shell. This overrides the
1918 value of the environment variable $SHELL. This is useful if you'd like
1919 to run a tty-enhancer which is expecting to execute the program speciâ€
1920 fied in $SHELL. If the command begins with a '-' character, the shell
1921 will be started as a login-shell.
1922
1923 shelltitle title
1924
1925 Set the title for all shells created during startup or by the C-A C-c
1926 command. For details about what a title is, see the discussion entiâ€
1927 tled "TITLES (naming windows)".
1928
1929 silence [on|off|sec]
1930
1931 Toggles silence monitoring of windows. When silence is turned on and
1932 an affected window is switched into the background, you will receive
1933 the silence notification message in the status line after a specified
1934 period of inactivity (silence). The default timeout can be changed with
1935 the `silencewait' command or by specifying a number of seconds instead
1936 of `on' or `off'. Silence is initially off for all windows.
1937
1938 silencewait sec
1939
1940 Define the time that all windows monitored for silence should wait
1941 before displaying a message. Default 30 seconds.
1942
1943 sleep num
1944
1945 This command will pause the execution of a .screenrc file for num secâ€
1946 onds. Keyboard activity will end the sleep. It may be used to give
1947 users a chance to read the messages output by "echo".
1948
1949 slowpaste msec
1950
1951 Define the speed at which text is inserted into the current window by
1952 the paste ("C-a ]") command. If the slowpaste value is nonzero text is
1953 written character by character. screen will make a pause of msec milâ€
1954 liseconds after each single character write to allow the application to
1955 process its input. Only use slowpaste if your underlying system exposes
1956 flow control problems while pasting large amounts of text.
1957
1958 source file
1959
1960 Read and execute commands from file file. Source commands may be nested
1961 to a maximum recursion level of ten. If file is not an absolute path
1962 and screen is already processing a source command, the parent directory
1963 of the running source command file is used to search for the new comâ€
1964 mand file before screen's current directory.
1965
1966 Note that termcap/terminfo/termcapinfo commands only work at startup
1967 and reattach time, so they must be reached via the default screenrc
1968 files to have an effect.
1969
1970 sorendition [attr [color]]
1971
1972 Change the way screen does highlighting for text marking and printing
1973 messages. See the "STRING ESCAPES" chapter for the syntax of the modiâ€
1974 fiers. The default is currently "=s dd" (standout, default colors).
1975
1976 split [-v]
1977
1978 Split the current region into two new ones. All regions on the display
1979 are resized to make room for the new region. The blank window is disâ€
1980 played on the new region. Splits are made horizontally unless -v is
1981 used. Use the "remove" or the "only" command to delete regions. Use
1982 "focus" to toggle between regions.
1983
1984 startup_message on|off
1985
1986 Select whether you want to see the copyright notice during startup.
1987 Default is `on', as you probably noticed.
1988
1989 stuff string
1990
1991 Stuff the string string in the input buffer of the current window.
1992 This is like the "paste" command but with much less overhead. You canâ€
1993 not paste large buffers with the "stuff" command. It is most useful for
1994 key bindings. See also "bindkey".
1995
1996 su [username [password [password2]]
1997
1998 Substitute the user of a display. The command prompts for all parameâ€
1999 ters that are omitted. If passwords are specified as parameters, they
2000 have to be specified un-crypted. The first password is matched against
2001 the systems passwd database, the second password is matched against the
2002 screen password as set with the commands "acladd" or "password". "Su"
2003 may be useful for the screen administrator to test multiuser setups.
2004 When the identification fails, the user has access to the commands
2005 available for user nobody. These are "detach", "license", "version",
2006 "help" and "displays".
2007
2008 suspend
2009
2010 Suspend screen. The windows are in the `detached' state, while screen
2011 is suspended. This feature relies on the shell being able to do job
2012 control.
2013
2014 term term
2015
2016 In each window's environment screen opens, the $TERM variable is set to
2017 "screen" by default. But when no description for "screen" is installed
2018 in the local termcap or terminfo data base, you set $TERM to - say -
2019 "vt100". This won't do much harm, as screen is VT100/ANSI compatible.
2020 The use of the "term" command is discouraged for non-default purpose.
2021 That is, one may want to specify special $TERM settings (e.g. vt100)
2022 for the next "screen rlogin othermachine" command. Use the command
2023 "screen -T vt100 rlogin othermachine" rather than setting and resetting
2024 the default.
2025
2026 termcap term terminal-tweaks [window-tweaks]
2027 terminfo term terminal-tweaks [window-tweaks]
2028 termcapinfo term terminal-tweaks [window-tweaks]
2029
2030 Use this command to modify your terminal's termcap entry without going
2031 through all the hassles involved in creating a custom termcap entry.
2032 Plus, you can optionally customize the termcap generated for the winâ€
2033 dows. You have to place these commands in one of the screenrc startup
2034 files, as they are meaningless once the terminal emulator is booted.
2035 If your system works uses the terminfo database rather than termcap,
2036 screen will understand the `terminfo' command, which has the same
2037 effects as the `termcap' command. Two separate commands are provided,
2038 as there are subtle syntactic differences, e.g. when parameter interpoâ€
2039 lation (using `%') is required. Note that termcap names of the capabilâ€
2040 ities have to be used with the `terminfo' command.
2041 In many cases, where the arguments are valid in both terminfo and termâ€
2042 cap syntax, you can use the command `termcapinfo', which is just a
2043 shorthand for a pair of `termcap' and `terminfo' commands with identiâ€
2044 cal arguments.
2045
2046 The first argument specifies which terminal(s) should be affected by
2047 this definition. You can specify multiple terminal names by separating
2048 them with `|'s. Use `*' to match all terminals and `vt*' to match all
2049 terminals that begin with "vt".
2050
2051 Each tweak argument contains one or more termcap defines (separated by
2052 `:'s) to be inserted at the start of the appropriate termcap entry,
2053 enhancing it or overriding existing values. The first tweak modifies
2054 your terminal's termcap, and contains definitions that your terminal
2055 uses to perform certain functions. Specify a null string to leave this
2056 unchanged (e.g. ''). The second (optional) tweak modifies all the winâ€
2057 dow termcaps, and should contain definitions that screen understands
2058 (see the "VIRTUAL TERMINAL" section).
2059
2060 Some examples:
2061
2062 termcap xterm* LP:hs@
2063
2064 Informs screen that all terminals that begin with `xterm' have firm
2065 auto-margins that allow the last position on the screen to be updated
2066 (LP), but they don't really have a status line (no 'hs' - append `@' to
2067 turn entries off). Note that we assume `LP' for all terminal names
2068 that start with "vt", but only if you don't specify a termcap command
2069 for that terminal.
2070
2071 termcap vt* LP
2072 termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l
2073
2074 Specifies the firm-margined `LP' capability for all terminals that
2075 begin with `vt', and the second line will also add the escape-sequences
2076 to switch into (Z0) and back out of (Z1) 132-character-per-line mode if
2077 this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap
2078 to use the width-changing commands.)
2079
2080 termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4
2081
2082 This leaves your vt100 termcap alone and adds the function key labels
2083 to each window's termcap entry.
2084
2085 termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P
2086
2087 Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables
2088 the insert mode (im) and end-insert (ei) capabilities (the `@' in the
2089 `im' string is after the `=', so it is part of the string). Having the
2090 `im' and `ei' definitions put into your terminal's termcap will cause
2091 screen to automatically advertise the character-insert capability in
2092 each window's termcap. Each window will also get the delete-character
2093 capability (dc) added to its termcap, which screen will translate into
2094 a line-update for the terminal (we're pretending it doesn't support
2095 character deletion).
2096
2097 If you would like to fully specify each window's termcap entry, you
2098 should instead set the $SCREENCAP variable prior to running screen.
2099 See the discussion on the "VIRTUAL TERMINAL" in this manual, and the
2100 termcap(5) man page for more information on termcap definitions.
2101
2102 time [string]
2103
2104 Uses the message line to display the time of day, the host name, and
2105 the load averages over 1, 5, and 15 minutes (if this is available on
2106 your system). For window specific information use "info".
2107
2108 If a string is specified, it changes the format of the time report like
2109 it is described in the "STRING ESCAPES" chapter. Screen uses a default
2110 of "%c:%s %M %d %H%? %l%?".
2111
2112 title [windowtitle]
2113
2114 Set the name of the current window to windowtitle. If no name is speciâ€
2115 fied, screen prompts for one. This command was known as `aka' in previâ€
2116 ous releases.
2117
2118 unsetenv var
2119
2120 Unset an environment variable.
2121
2122 utf8 [on|off [on|off]]
2123
2124 Change the encoding used in the current window. If utf8 is enabled, the
2125 strings sent to the window will be UTF-8 encoded and vice versa. Omitâ€
2126 ting the parameter toggles the setting. If a second parameter is given,
2127 the display's encoding is also changed (this should rather be done with
2128 screen's "-U" option). See also "defutf8", which changes the default
2129 setting of a new window.
2130
2131 vbell [on|off]
2132
2133 Sets the visual bell setting for this window. Omitting the parameter
2134 toggles the setting. If vbell is switched on, but your terminal does
2135 not support a visual bell, a `vbell-message' is displayed in the status
2136 line when the bell character (^G) is received. Visual bell support of
2137 a terminal is defined by the termcap variable `vb' (terminfo: 'flash').
2138 Per default, vbell is off, thus the audible bell is used. See also
2139 `bell_msg'.
2140
2141 vbell_msg [message]
2142
2143 Sets the visual bell message. message is printed to the status line if
2144 the window receives a bell character (^G), vbell is set to "on", but
2145 the terminal does not support a visual bell. The default message is
2146 "Wuff, Wuff!!". Without parameter, the current message is shown.
2147
2148 vbellwait sec
2149
2150 Define a delay in seconds after each display of screen's visual bell
2151 message. The default is 1 second.
2152
2153 verbose [on|off]
2154
2155 If verbose is switched on, the command name is echoed, whenever a winâ€
2156 dow is created (or resurrected from zombie state). Default is off.
2157 Without parameter, the current setting is shown.
2158
2159 version
2160
2161 Print the current version and the compile date in the status line.
2162
2163 wall message
2164
2165 Write a message to all displays. The message will appear in the termiâ€
2166 nal's status line.
2167
2168 width [-w|-d] [cols [lines]]
2169
2170 Toggle the window width between 80 and 132 columns or set it to cols
2171 columns if an argument is specified. This requires a capable terminal
2172 and the termcap entries "Z0" and "Z1". See the "termcap" command for
2173 more information. You can also specify a new height if you want to
2174 change both values. The -w option tells screen to leave the display
2175 size unchanged and just set the window size, -d vice versa.
2176
2177 windowlist [-b] [-m]
2178 windowlist string [string]
2179 windowlist title [title]
2180
2181 Display all windows in a table for visual window selection. The desired
2182 window can be selected via the standard movement keys (see the "copy"
2183 command) and activated via the return key. If the -b option is given,
2184 screen will switch to the blank window before presenting the list, so
2185 that the current window is also selectable. The -m option changes the
2186 order of the windows, instead of sorting by window numbers screen uses
2187 its internal most-recently-used list.
2188
2189 The table format can be changed with the string and title option, the
2190 title is displayed as table heading, while the lines are made by using
2191 the string setting. The default setting is "Num Name%=Flags" for the
2192 title and "%3n %t%=%f" for the lines. See the "STRING ESCAPES" chapter
2193 for more codes (e.g. color settings).
2194
2195 windows
2196
2197 Uses the message line to display a list of all the windows. Each winâ€
2198 dow is listed by number with the name of process that has been started
2199 in the window (or its title); the current window is marked with a `*';
2200 the previous window is marked with a `-'; all the windows that are
2201 "logged in" are marked with a `$'; a background window that has
2202 received a bell is marked with a `!'; a background window that is being
2203 monitored and has had activity occur is marked with an `@'; a window
2204 which has output logging turned on is marked with `(L)'; windows occuâ€
2205 pied by other users are marked with `&'; windows in the zombie state
2206 are marked with `Z'. If this list is too long to fit on the terminal's
2207 status line only the portion around the current window is displayed.
2208
2209 wrap [on|off]
2210
2211 Sets the line-wrap setting for the current window. When line-wrap is
2212 on, the second consecutive printable character output at the last colâ€
2213 umn of a line will wrap to the start of the following line. As an
2214 added feature, backspace (^H) will also wrap through the left margin to
2215 the previous line. Default is `on'.
2216
2217 writebuf [-e encoding] [filename]
2218
2219 Writes the contents of the paste buffer to the specified file, or the
2220 public accessible screen-exchange file if no filename is given. This is
2221 thought of as a primitive means of communication between screen users
2222 on the same host. If an encoding is specified the paste buffer is
2223 recoded on the fly to match the encoding. The filename can be set with
2224 the bufferfile command and defaults to "/tmp/screen-exchange".
2225
2226 writelock [on|off|auto]
2227
2228 In addition to access control lists, not all users may be able to write
2229 to the same window at once. Per default, writelock is in `auto' mode
2230 and grants exclusive input permission to the user who is the first to
2231 switch to the particular window. When he leaves the window, other users
2232 may obtain the writelock (automatically). The writelock of the current
2233 window is disabled by the command "writelock off". If the user issues
2234 the command "writelock on" he keeps the exclusive write permission
2235 while switching to other windows.
2236
2237 xoff
2238 xon
2239
2240 Insert a CTRL-s / CTRL-q character to the stdin queue of the current
2241 window.
2242
2243 zmodem [off|auto|catch|pass]
2244 zmodem sendcmd [string]
2245 zmodem recvcmd [string]
2246
2247 Define zmodem support for screen. Screen understands two different
2248 modes when it detects a zmodem request: "pass" and "catch". If the
2249 mode is set to "pass", screen will relay all data to the attacher until
2250 the end of the transmission is reached. In "catch" mode screen acts as
2251 a zmodem endpoint and starts the corresponding rz/sz commands. If the
2252 mode is set to "auto", screen will use "catch" if the window is a tty
2253 (e.g. a serial line), otherwise it will use "pass".
2254 You can define the templates screen uses in "catch" mode via the second
2255 and the third form.
2256 Note also that this is an experimental feature.
2257
2258 zombie [keys[onerror]]
2259 defzombie [keys]
2260
2261 Per default screen windows are removed from the window list as soon as
2262 the windows process (e.g. shell) exits. When a string of two keys is
2263 specified to the zombie command, `dead' windows will remain in the
2264 list. The kill command may be used to remove such a window. Pressing
2265 the first key in the dead window has the same effect. When pressing the
2266 second key, screen will attempt to resurrect the window. The process
2267 that was initially running in the window will be launched again. Callâ€
2268 ing zombie without parameters will clear the zombie setting, thus makâ€
2269 ing windows disappear when their process exits.
2270
2271 As the zombie-setting is manipulated globally for all windows, this
2272 command should only be called defzombie. Until we need this as a per
2273 window setting, the commands zombie and defzombie are synonymous.
2274
2275 Optionally you can put the word "onerror" after the keys. This will
2276 cause screen to monitor exit status of the process running in the winâ€
2277 dow. If it exits normally ('0'), the window disappears. Any other exit
2278 value causes the window to become a zombie.
2279
2280
2281THE MESSAGE LINE
2282 Screen displays informational messages and other diagnostics in a mesâ€
2283 sage line. While this line is distributed to appear at the bottom of
2284 the screen, it can be defined to appear at the top of the screen during
2285 compilation. If your terminal has a status line defined in its termâ€
2286 cap, screen will use this for displaying its messages, otherwise a line
2287 of the current screen will be temporarily overwritten and output will
2288 be momentarily interrupted. The message line is automatically removed
2289 after a few seconds delay, but it can also be removed early (on termiâ€
2290 nals without a status line) by beginning to type.
2291
2292 The message line facility can be used by an application running in the
2293 current window by means of the ANSI Privacy message control sequence.
2294 For instance, from within the shell, try something like:
2295
2296 echo '<esc>^Hello world from window '$WINDOW'<esc>\\'
2297
2298 where '<esc>' is an escape, '^' is a literal up-arrow, and '\\' turns
2299 into a single backslash.
2300
2301
2302WINDOW TYPES
2303 Screen provides three different window types. New windows are created
2304 with screen's screen command (see also the entry in chapter "CUSTOMIZAâ€
2305 TION"). The first parameter to the screen command defines which type of
2306 window is created. The different window types are all special cases of
2307 the normal type. They have been added in order to allow screen to be
2308 used efficiently as a console multiplexer with 100 or more windows.
2309
2310
2311 · The normal window contains a shell (default, if no parameter is
2312 given) or any other system command that could be executed from a
2313 shell (e.g. slogin, etc...)
2314
2315
2316 · If a tty (character special device) name (e.g. "/dev/ttya") is specâ€
2317 ified as the first parameter, then the window is directly connected
2318 to this device. This window type is similar to "screen cu -l
2319 /dev/ttya". Read and write access is required on the device node,
2320 an exclusive open is attempted on the node to mark the connection
2321 line as busy. An optional parameter is allowed consisting of a
2322 comma separated list of flags in the notation used by stty(1):
2323
2324 <baud_rate>
2325 Usually 300, 1200, 9600 or 19200. This affects transmission
2326 as well as receive speed.
2327
2328 cs8 or cs7
2329 Specify the transmission of eight (or seven) bits per byte.
2330
2331 ixon or -ixon
2332 Enables (or disables) software flow-control (CTRL-S/CTRL-Q)
2333 for sending data.
2334
2335 ixoff or -ixoff
2336 Enables (or disables) software flow-control for receiving
2337 data.
2338
2339 istrip or -istrip
2340 Clear (or keep) the eight bit in each received byte.
2341
2342 You may want to specify as many of these options as applicable.
2343 Unspecified options cause the terminal driver to make up the parameâ€
2344 ter values of the connection. These values are system dependent and
2345 may be in defaults or values saved from a previous connection.
2346
2347 For tty windows, the info command shows some of the modem control
2348 lines in the status line. These may include `RTS', `CTS', 'DTR',
2349 `DSR', `CD' and more. This depends on the available ioctl()'s and
2350 system header files as well as the on the physical capabilities of
2351 the serial board. Signals that are logical low (inactive) have
2352 their name preceded by an exclamation mark (!), otherwise the signal
2353 is logical high (active). Signals not supported by the hardware but
2354 available to the ioctl() interface are usually shown low.
2355 When the CLOCAL status bit is true, the whole set of modem signals
2356 is placed inside curly braces ({ and }). When the CRTSCTS or TIOCâ€
2357 SOFTCAR bit is set, the signals `CTS' or `CD' are shown in parentheâ€
2358 sis, respectively.
2359
2360
2361 For tty windows, the command break causes the Data transmission line
2362 (TxD) to go low for a specified period of time. This is expected to
2363 be interpreted as break signal on the other side. No data is sent
2364 and no modem control line is changed when a break is issued.
2365
2366 · If the first parameter is "//telnet", the second parameter is
2367 expected to be a host name, and an optional third parameter may
2368 specify a TCP port number (default decimal 23). Screen will connect
2369 to a server listening on the remote host and use the telnet protocol
2370 to communicate with that server.
2371 For telnet windows, the command info shows details about the connecâ€
2372 tion in square brackets ([ and ]) at the end of the status line.
2373
2374 b BINARY. The connection is in binary mode.
2375
2376 e ECHO. Local echo is disabled.
2377
2378 c SGA. The connection is in `character mode' (default: `line
2379 mode').
2380
2381 t TTYPE. The terminal type has been requested by the remote
2382 host. Screen sends the name "screen" unless instructed othâ€
2383 erwise (see also the command `term').
2384
2385 w NAWS. The remote site is notified about window size changes.
2386
2387 f LFLOW. The remote host will send flow control information.
2388 (Ignored at the moment.)
2389
2390 Additional flags for debugging are x, t and n (XDISPLOC, TSPEED and
2391 NEWENV).
2392
2393 For telnet windows, the command break sends the telnet code IAC
2394 BREAK (decimal 243) to the remote host.
2395
2396
2397 This window type is only available if screen was compiled with the
2398 BUILTIN_TELNET option defined.
2399
2400
2401
2402STRING ESCAPES
2403 Screen provides an escape mechanism to insert information like the curâ€
2404 rent time into messages or file names. The escape character is '%' with
2405 one exception: inside of a window's hardstatus '^%' ('^E') is used
2406 instead.
2407
2408 Here is the full list of supported escapes:
2409
2410 % the escape character itself
2411
2412 a either 'am' or 'pm'
2413
2414 A either 'AM' or 'PM'
2415
2416 c current time HH:MM in 24h format
2417
2418 C current time HH:MM in 12h format
2419
2420 d day number
2421
2422 D weekday name
2423
2424 f flags of the window
2425
2426 F sets %? to true if the window has the focus
2427
2428 h hardstatus of the window
2429
2430 H hostname of the system
2431
2432 l current load of the system
2433
2434 m month number
2435
2436 M month name
2437
2438 n window number
2439
2440 s seconds
2441
2442 t window title
2443
2444 u all other users on this window
2445
2446 w all window numbers and names. With '-' qualifier: up to the curâ€
2447 rent window; with '+' qualifier: starting with the window after
2448 the current one.
2449
2450 W all window numbers and names except the current one
2451
2452 y last two digits of the year number
2453
2454 Y full year number
2455
2456 ? the part to the next '%?' is displayed only if a '%' escape
2457 inside the part expands to a non-empty string
2458
2459 : else part of '%?'
2460
2461 = pad the string to the display's width (like TeX's hfill). If a
2462 number is specified, pad to the percentage of the window's
2463 width. A '0' qualifier tells screen to treat the number as
2464 absolute position. You can specify to pad relative to the last
2465 absolute pad position by adding a '+' qualifier or to pad relaâ€
2466 tive to the right margin by using '-'. The padding truncates the
2467 string if the specified position lies before the current posiâ€
2468 tion. Add the 'L' qualifier to change this.
2469
2470 < same as '%=' but just do truncation, do not fill with spaces
2471
2472 > mark the current text position for the next truncation. When
2473 screen needs to do truncation, it tries to do it in a way that
2474 the marked position gets moved to the specified percentage of
2475 the output area. (The area starts from the last absolute pad
2476 position and ends with the position specified by the truncation
2477 operator.) The 'L' qualifier tells screen to mark the truncated
2478 parts with '...'.
2479
2480 { attribute/color modifier string terminated by the next "}"
2481
2482 ` Substitute with the output of a 'backtick' command. The length
2483 qualifier is misused to identify one of the commands.
2484
2485 The 'c' and 'C' escape may be qualified with a '0' to make screen use
2486 zero instead of space as fill character. The '0' qualifier also makes
2487 the '=' escape use absolute positions. The 'n' and '=' escapes underâ€
2488 stand a length qualifier (e.g. '%3n'), 'D' and 'M' can be prefixed with
2489 'L' to generate long names, 'w' and 'W' also show the window flags if
2490 'L' is given.
2491
2492 An attribute/color modifier is is used to change the attributes or the
2493 color settings. Its format is "[attribute modifier] [color descripâ€
2494 tion]". The attribute modifier must be prefixed by a change type indiâ€
2495 cator if it can be confused with a color description. The following
2496 change types are known:
2497
2498 + add the specified set to the current attributes
2499
2500 - remove the set from the current attributes
2501
2502 ! invert the set in the current attributes
2503
2504 = change the current attributes to the specified set
2505
2506 The attribute set can either be specified as a hexadecimal number or a
2507 combination of the following letters:
2508
2509 d dim
2510 u underline
2511 b bold
2512 r reverse
2513 s standout
2514 B blinking
2515
2516 Colors are coded either as a hexadecimal number or two letters specifyâ€
2517 ing the desired background and foreground color (in that order). The
2518 following colors are known:
2519
2520 k black
2521 r red
2522 g green
2523 y yellow
2524 b blue
2525 m magenta
2526 c cyan
2527 w white
2528 d default color
2529 . leave color unchanged
2530
2531 The capitalized versions of the letter specify bright colors. You can
2532 also use the pseudo-color 'i' to set just the brightness and leave the
2533 color unchanged.
2534 A one digit/letter color description is treated as foreground or backâ€
2535 ground color dependent on the current attributes: if reverse mode is
2536 set, the background color is changed instead of the foreground color.
2537 If you don't like this, prefix the color with a ".". If you want the
2538 same behavior for two-letter color descriptions, also prefix them with
2539 a ".".
2540 As a special case, "%{-}" restores the attributes and colors that were
2541 set before the last change was made (i.e., pops one level of the color-
2542 change stack).
2543
2544 Examples:
2545
2546 "G" set color to bright green
2547
2548 "+b r" use bold red
2549
2550 "= yd" clear all attributes, write in default color on yellow backâ€
2551 ground.
2552
2553 %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<
2554 The available windows centered at the current window and trunâ€
2555 cated to the available width. The current window is displayed
2556 white on blue. This can be used with "hardstatus alwayslastâ€
2557 line".
2558
2559 %?%F%{.R.}%?%3n %t%? [%h]%?
2560 The window number and title and the window's hardstatus, if one
2561 is set. Also use a red background if this is the active focus.
2562 Useful for "caption string".
2563
2564FLOW-CONTROL
2565 Each window has a flow-control setting that determines how screen deals
2566 with the XON and XOFF characters (and perhaps the interrupt character).
2567 When flow-control is turned off, screen ignores the XON and XOFF charâ€
2568 acters, which allows the user to send them to the current program by
2569 simply typing them (useful for the emacs editor, for instance). The
2570 trade-off is that it will take longer for output from a "normal" proâ€
2571 gram to pause in response to an XOFF. With flow-control turned on, XON
2572 and XOFF characters are used to immediately pause the output of the
2573 current window. You can still send these characters to the current
2574 program, but you must use the appropriate two-character screen commands
2575 (typically "C-a q" (xon) and "C-a s" (xoff)). The xon/xoff commands
2576 are also useful for typing C-s and C-q past a terminal that intercepts
2577 these characters.
2578
2579 Each window has an initial flow-control value set with either the -f
2580 option or the "defflow" .screenrc command. Per default the windows are
2581 set to automatic flow-switching. It can then be toggled between the
2582 three states 'fixed on', 'fixed off' and 'automatic' interactively with
2583 the "flow" command bound to "C-a f".
2584
2585 The automatic flow-switching mode deals with flow control using the
2586 TIOCPKT mode (like "rlogin" does). If the tty driver does not support
2587 TIOCPKT, screen tries to find out the right mode based on the current
2588 setting of the application keypad - when it is enabled, flow-control is
2589 turned off and visa versa. Of course, you can still manipulate flow-
2590 control manually when needed.
2591
2592 If you're running with flow-control enabled and find that pressing the
2593 interrupt key (usually C-c) does not interrupt the display until
2594 another 6-8 lines have scrolled by, try running screen with the "interâ€
2595 rupt" option (add the "interrupt" flag to the "flow" command in your
2596 .screenrc, or use the -i command-line option). This causes the output
2597 that screen has accumulated from the interrupted program to be flushed.
2598 One disadvantage is that the virtual terminal's memory contains the
2599 non-flushed version of the output, which in rare cases can cause minor
2600 inaccuracies in the output. For example, if you switch screens and
2601 return, or update the screen with "C-a l" you would see the version of
2602 the output you would have gotten without "interrupt" being on. Also,
2603 you might need to turn off flow-control (or use auto-flow mode to turn
2604 it off automatically) when running a program that expects you to type
2605 the interrupt character as input, as it is possible to interrupt the
2606 output of the virtual terminal to your physical terminal when flow-conâ€
2607 trol is enabled. If this happens, a simple refresh of the screen with
2608 "C-a l" will restore it. Give each mode a try, and use whichever mode
2609 you find more comfortable.
2610
2611
2612
2613TITLES (naming windows)
2614 You can customize each window's name in the window display (viewed with
2615 the "windows" command (C-a w)) by setting it with one of the title comâ€
2616 mands. Normally the name displayed is the actual command name of the
2617 program created in the window. However, it is sometimes useful to disâ€
2618 tinguish various programs of the same name or to change the name on-
2619 the-fly to reflect the current state of the window.
2620
2621 The default name for all shell windows can be set with the "shelltitle"
2622 command in the .screenrc file, while all other windows are created with
2623 a "screen" command and thus can have their name set with the -t option.
2624 Interactively, there is the title-string escape-sequence
2625 (<esc>kname<esc>\) and the "title" command (C-a A). The former can be
2626 output from an application to control the window's name under software
2627 control, and the latter will prompt for a name when typed. You can
2628 also bind pre-defined names to keys with the "title" command to set
2629 things quickly without prompting.
2630
2631 Finally, screen has a shell-specific heuristic that is enabled by setâ€
2632 ting the window's name to "search|name" and arranging to have a null
2633 title escape-sequence output as a part of your prompt. The search porâ€
2634 tion specifies an end-of-prompt search string, while the name portion
2635 specifies the default shell name for the window. If the name ends in a
2636 `:' screen will add what it believes to be the current command running
2637 in the window to the end of the window's shell name (e.g. "name:cmd").
2638 Otherwise the current command name supersedes the shell name while it
2639 is running.
2640
2641 Here's how it works: you must modify your shell prompt to output a
2642 null title-escape-sequence (<esc>k<esc>\) as a part of your prompt.
2643 The last part of your prompt must be the same as the string you speciâ€
2644 fied for the search portion of the title. Once this is set up, screen
2645 will use the title-escape-sequence to clear the previous command name
2646 and get ready for the next command. Then, when a newline is received
2647 from the shell, a search is made for the end of the prompt. If found,
2648 it will grab the first word after the matched string and use it as the
2649 command name. If the command name begins with either '!', '%', or '^'
2650 screen will use the first word on the following line (if found) in
2651 preference to the just-found name. This helps csh users get better
2652 command names when using job control or history recall commands.
2653
2654 Here's some .screenrc examples:
2655
2656 screen -t top 2 nice top
2657
2658 Adding this line to your .screenrc would start a nice-d version of the
2659 "top" command in window 2 named "top" rather than "nice".
2660
2661 shelltitle '> |csh'
2662 screen 1
2663
2664 These commands would start a shell with the given shelltitle. The
2665 title specified is an auto-title that would expect the prompt and the
2666 typed command to look something like the following:
2667
2668 /usr/joe/src/dir> trn
2669
2670 (it looks after the '> ' for the command name). The window status
2671 would show the name "trn" while the command was running, and revert to
2672 "csh" upon completion.
2673
2674 bind R screen -t '% |root:' su
2675
2676 Having this command in your .screenrc would bind the key sequence "C-a
2677 R" to the "su" command and give it an auto-title name of "root:". For
2678 this auto-title to work, the screen could look something like this:
2679
2680 % !em
2681 emacs file.c
2682
2683 Here the user typed the csh history command "!em" which ran the previâ€
2684 ously entered "emacs" command. The window status would show
2685 "root:emacs" during the execution of the command, and revert to simply
2686 "root:" at its completion.
2687
2688 bind o title
2689 bind E title ""
2690 bind u title (unknown)
2691
2692 The first binding doesn't have any arguments, so it would prompt you
2693 for a title. when you type "C-a o". The second binding would clear an
2694 auto-title's current setting (C-a E). The third binding would set the
2695 current window's title to "(unknown)" (C-a u).
2696
2697 One thing to keep in mind when adding a null title-escape-sequence to
2698 your prompt is that some shells (like the csh) count all the non-conâ€
2699 trol characters as part of the prompt's length. If these invisible
2700 characters aren't a multiple of 8 then backspacing over a tab will
2701 result in an incorrect display. One way to get around this is to use a
2702 prompt like this:
2703
2704 set prompt='^[[0000m^[k^[\% '
2705
2706 The escape-sequence "<esc>[0000m" not only normalizes the character
2707 attributes, but all the zeros round the length of the invisible characâ€
2708 ters up to 8. Bash users will probably want to echo the escape
2709 sequence in the PROMPT_COMMAND:
2710
2711 PROMPT_COMMAND='echo -n -e "\033k\033\134"'
2712
2713 (I used "134" to output a `\' because of a bug in bash v1.04).
2714
2715
2716
2717THE VIRTUAL TERMINAL
2718 Each window in a screen session emulates a VT100 terminal, with some
2719 extra functions added. The VT100 emulator is hard-coded, no other terâ€
2720 minal types can be emulated.
2721 Usually screen tries to emulate as much of the VT100/ANSI standard as
2722 possible. But if your terminal lacks certain capabilities, the emulaâ€
2723 tion may not be complete. In these cases screen has to tell the appliâ€
2724 cations that some of the features are missing. This is no problem on
2725 machines using termcap, because screen can use the $TERMCAP variable to
2726 customize the standard screen termcap.
2727
2728 But if you do a rlogin on another machine or your machine supports only
2729 terminfo this method fails. Because of this, screen offers a way to
2730 deal with these cases. Here is how it works:
2731
2732 When screen tries to figure out a terminal name for itself, it first
2733 looks for an entry named "screen.<term>", where <term> is the contents
2734 of your $TERM variable. If no such entry exists, screen tries "screen"
2735 (or "screen-w" if the terminal is wide (132 cols or more)). If even
2736 this entry cannot be found, "vt100" is used as a substitute.
2737
2738 The idea is that if you have a terminal which doesn't support an imporâ€
2739 tant feature (e.g. delete char or clear to EOS) you can build a new
2740 termcap/terminfo entry for screen (named "screen.<dumbterm>") in which
2741 this capability has been disabled. If this entry is installed on your
2742 machines you are able to do a rlogin and still keep the correct termâ€
2743 cap/terminfo entry. The terminal name is put in the $TERM variable of
2744 all new windows. Screen also sets the $TERMCAP variable reflecting the
2745 capabilities of the virtual terminal emulated. Notice that, however, on
2746 machines using the terminfo database this variable has no effect. Furâ€
2747 thermore, the variable $WINDOW is set to the window number of each winâ€
2748 dow.
2749
2750 The actual set of capabilities supported by the virtual terminal
2751 depends on the capabilities supported by the physical terminal. If,
2752 for instance, the physical terminal does not support underscore mode,
2753 screen does not put the `us' and `ue' capabilities into the window's
2754 $TERMCAP variable, accordingly. However, a minimum number of capabiliâ€
2755 ties must be supported by a terminal in order to run screen; namely
2756 scrolling, clear screen, and direct cursor addressing (in addition,
2757 screen does not run on hardcopy terminals or on terminals that over-
2758 strike).
2759
2760 Also, you can customize the $TERMCAP value used by screen by using the
2761 "termcap" .screenrc command, or by defining the variable $SCREENCAP
2762 prior to startup. When the is latter defined, its value will be copied
2763 verbatim into each window's $TERMCAP variable. This can either be the
2764 full terminal definition, or a filename where the terminal "screen"
2765 (and/or "screen-w") is defined.
2766
2767 Note that screen honors the "terminfo" .screenrc command if the system
2768 uses the terminfo database rather than termcap.
2769
2770 When the boolean `G0' capability is present in the termcap entry for
2771 the terminal on which screen has been called, the terminal emulation of
2772 screen supports multiple character sets. This allows an application to
2773 make use of, for instance, the VT100 graphics character set or national
2774 character sets. The following control functions from ISO 2022 are supâ€
2775 ported: lock shift G0 (SI), lock shift G1 (SO), lock shift G2, lock
2776 shift G3, single shift G2, and single shift G3. When a virtual termiâ€
2777 nal is created or reset, the ASCII character set is designated as G0
2778 through G3. When the `G0' capability is present, screen evaluates the
2779 capabilities `S0', `E0', and `C0' if present. `S0' is the sequence the
2780 terminal uses to enable and start the graphics character set rather
2781 than SI. `E0' is the corresponding replacement for SO. `C0' gives a
2782 character by character translation string that is used during semi-
2783 graphics mode. This string is built like the `acsc' terminfo capabilâ€
2784 ity.
2785
2786 When the `po' and `pf' capabilities are present in the terminal's termâ€
2787 cap entry, applications running in a screen window can send output to
2788 the printer port of the terminal. This allows a user to have an appliâ€
2789 cation in one window sending output to a printer connected to the terâ€
2790 minal, while all other windows are still active (the printer port is
2791 enabled and disabled again for each chunk of output). As a side-
2792 effect, programs running in different windows can send output to the
2793 printer simultaneously. Data sent to the printer is not displayed in
2794 the window. The info command displays a line starting `PRIN' while the
2795 printer is active.
2796
2797 Screen maintains a hardstatus line for every window. If a window gets
2798 selected, the display's hardstatus will be updated to match the winâ€
2799 dow's hardstatus line. If the display has no hardstatus the line will
2800 be displayed as a standard screen message. The hardstatus line can be
2801 changed with the ANSI Application Program Command (APC):
2802 "ESC_<string>ESC\". As a convenience for xterm users the sequence
2803 "ESC]0..2;<string>^G" is also accepted.
2804
2805 Some capabilities are only put into the $TERMCAP variable of the virâ€
2806 tual terminal if they can be efficiently implemented by the physical
2807 terminal. For instance, `dl' (delete line) is only put into the $TERMâ€
2808 CAP variable if the terminal supports either delete line itself or
2809 scrolling regions. Note that this may provoke confusion, when the sesâ€
2810 sion is reattached on a different terminal, as the value of $TERMCAP
2811 cannot be modified by parent processes.
2812
2813 The "alternate screen" capability is not enabled by default. Set the
2814 altscreen .screenrc command to enable it.
2815
2816 The following is a list of control sequences recognized by screen.
2817 "(V)" and "(A)" indicate VT100-specific and ANSI- or ISO-specific funcâ€
2818 tions, respectively.
2819
2820 ESC E Next Line
2821
2822 ESC D Index
2823
2824 ESC M Reverse Index
2825
2826 ESC H Horizontal Tab Set
2827
2828 ESC Z Send VT100 Identification String
2829
2830 ESC 7 (V) Save Cursor and Attributes
2831
2832 ESC 8 (V) Restore Cursor and Attributes
2833
2834 ESC [s (A) Save Cursor and Attributes
2835
2836 ESC [u (A) Restore Cursor and Attributes
2837
2838 ESC c Reset to Initial State
2839
2840 ESC g Visual Bell
2841
2842 ESC Pn p Cursor Visibility (97801)
2843
2844 Pn = 6 Invisible
2845
2846 7 Visible
2847
2848 ESC = (V) Application Keypad Mode
2849
2850 ESC > (V) Numeric Keypad Mode
2851
2852 ESC # 8 (V) Fill Screen with E's
2853
2854 ESC \ (A) String Terminator
2855
2856 ESC ^ (A) Privacy Message String (Message Line)
2857
2858 ESC ! Global Message String (Message Line)
2859
2860 ESC k A.k.a. Definition String
2861
2862 ESC P (A) Device Control String. Outputs a string
2863 directly to the host terminal without interâ€
2864 pretation.
2865
2866 ESC _ (A) Application Program Command (Hardstatus)
2867
2868 ESC ] 0 ; string ^G (A) Operating System Command (Hardstatus, xterm
2869 title hack)
2870
2871 ESC ] 83 ; cmd ^G (A) Execute screen command. This only works if
2872 multi-user support is compiled into screen.
2873 The pseudo-user ":window:" is used to check
2874 the access control list. Use "addacl :winâ€
2875 dow: -rwx #?" to create a user with no
2876 rights and allow only the needed commands.
2877
2878 Control-N (A) Lock Shift G1 (SO)
2879
2880 Control-O (A) Lock Shift G0 (SI)
2881
2882 ESC n (A) Lock Shift G2
2883
2884 ESC o (A) Lock Shift G3
2885
2886 ESC N (A) Single Shift G2
2887
2888 ESC O (A) Single Shift G3
2889
2890 ESC ( Pcs (A) Designate character set as G0
2891
2892 ESC ) Pcs (A) Designate character set as G1
2893
2894 ESC * Pcs (A) Designate character set as G2
2895
2896 ESC + Pcs (A) Designate character set as G3
2897
2898 ESC [ Pn ; Pn H Direct Cursor Addressing
2899
2900 ESC [ Pn ; Pn f same as above
2901
2902 ESC [ Pn J Erase in Display
2903
2904 Pn = None or 0 From Cursor to End of Screen
2905
2906 1 From Beginning of Screen to Cursor
2907
2908 2 Entire Screen
2909
2910 ESC [ Pn K Erase in Line
2911
2912 Pn = None or 0 From Cursor to End of Line
2913
2914 1 From Beginning of Line to Cursor
2915
2916 2 Entire Line
2917
2918 ESC [ Pn X Erase character
2919
2920 ESC [ Pn A Cursor Up
2921
2922 ESC [ Pn B Cursor Down
2923
2924 ESC [ Pn C Cursor Right
2925
2926 ESC [ Pn D Cursor Left
2927
2928 ESC [ Pn E Cursor next line
2929
2930 ESC [ Pn F Cursor previous line
2931
2932 ESC [ Pn G Cursor horizontal position
2933
2934 ESC [ Pn ` same as above
2935
2936 ESC [ Pn d Cursor vertical position
2937
2938 ESC [ Ps ;...; Ps m Select Graphic Rendition
2939
2940 Ps = None or 0 Default Rendition
2941
2942 1 Bold
2943
2944 2 (A) Faint
2945
2946 3 (A) Standout Mode (ANSI: Italicized)
2947
2948 4 Underlined
2949
2950 5 Blinking
2951
2952 7 Negative Image
2953
2954 22 (A) Normal Intensity
2955
2956 23 (A) Standout Mode off (ANSI: Italicized off)
2957
2958 24 (A) Not Underlined
2959
2960 25 (A) Not Blinking
2961
2962 27 (A) Positive Image
2963
2964 30 (A) Foreground Black
2965
2966 31 (A) Foreground Red
2967
2968 32 (A) Foreground Green
2969
2970 33 (A) Foreground Yellow
2971
2972 34 (A) Foreground Blue
2973
2974 35 (A) Foreground Magenta
2975
2976 36 (A) Foreground Cyan
2977
2978 37 (A) Foreground White
2979
2980 39 (A) Foreground Default
2981
2982 40 (A) Background Black
2983
2984 ... ...
2985
2986 49 (A) Background Default
2987
2988 ESC [ Pn g Tab Clear
2989
2990 Pn = None or 0 Clear Tab at Current Position
2991
2992 3 Clear All Tabs
2993
2994 ESC [ Pn ; Pn r (V) Set Scrolling Region
2995
2996 ESC [ Pn I (A) Horizontal Tab
2997
2998 ESC [ Pn Z (A) Backward Tab
2999
3000 ESC [ Pn L (A) Insert Line
3001
3002 ESC [ Pn M (A) Delete Line
3003
3004 ESC [ Pn @ (A) Insert Character
3005
3006 ESC [ Pn P (A) Delete Character
3007
3008 ESC [ Pn S Scroll Scrolling Region Up
3009
3010 ESC [ Pn T Scroll Scrolling Region Down
3011
3012 ESC [ Pn ^ same as above
3013
3014 ESC [ Ps ;...; Ps h Set Mode
3015
3016 ESC [ Ps ;...; Ps l Reset Mode
3017
3018 Ps = 4 (A) Insert Mode
3019
3020 20 (A) Automatic Linefeed Mode
3021
3022 34 Normal Cursor Visibility
3023
3024 ?1 (V) Application Cursor Keys
3025
3026 ?3 (V) Change Terminal Width to 132 columns
3027
3028 ?5 (V) Reverse Video
3029
3030 ?6 (V) Origin Mode
3031
3032 ?7 (V) Wrap Mode
3033
3034 ?9 X10 mouse tracking
3035
3036 ?25 (V) Visible Cursor
3037
3038 ?47 Alternate Screen (old xterm code)
3039
3040 ?1000 (V) VT200 mouse tracking
3041
3042 ?1047 Alternate Screen (new xterm code)
3043
3044 ?1049 Alternate Screen (new xterm code)
3045
3046 ESC [ 5 i (A) Start relay to printer (ANSI Media Copy)
3047
3048 ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy)
3049
3050 ESC [ 8 ; Ph ; Pw t Resize the window to `Ph' lines and `Pw'
3051 columns (SunView special)
3052
3053 ESC [ c Send VT100 Identification String
3054
3055 ESC [ x Send Terminal Parameter Report
3056
3057 ESC [ > c Send VT220 Secondary Device Attributes
3058 String
3059
3060 ESC [ 6 n Send Cursor Position Report
3061
3062
3063
3064INPUT TRANSLATION
3065 In order to do a full VT100 emulation screen has to detect that a
3066 sequence of characters in the input stream was generated by a keypress
3067 on the user's keyboard and insert the VT100 style escape sequence.
3068 Screen has a very flexible way of doing this by making it possible to
3069 map arbitrary commands on arbitrary sequences of characters. For stanâ€
3070 dard VT100 emulation the command will always insert a string in the
3071 input buffer of the window (see also command stuff in the command taâ€
3072 ble). Because the sequences generated by a keypress can change after a
3073 reattach from a different terminal type, it is possible to bind comâ€
3074 mands to the termcap name of the keys. Screen will insert the correct
3075 binding after each reattach. See the bindkey command for further
3076 details on the syntax and examples.
3077
3078 Here is the table of the default key bindings. (A) means that the comâ€
3079 mand is executed if the keyboard is switched into application mode.
3080
3081 Key name Termcap name Command
3082 ______________________________________________________
3083 Cursor up ku stuff \033[A
3084 stuff \033OA (A)
3085 Cursor down kd stuff \033[B
3086 stuff \033OB (A)
3087 Cursor right kr stuff \033[C
3088 stuff \033OC (A)
3089 Cursor left kl stuff \033[D
3090 stuff \033OD (A)
3091 Function key 0 k0 stuff \033[10~
3092 Function key 1 k1 stuff \033OP
3093 Function key 2 k2 stuff \033OQ
3094 Function key 3 k3 stuff \033OR
3095 Function key 4 k4 stuff \033OS
3096 Function key 5 k5 stuff \033[15~
3097 Function key 6 k6 stuff \033[17~
3098 Function key 7 k7 stuff \033[18~
3099 Function key 8 k8 stuff \033[19~
3100 Function key 9 k9 stuff \033[20~
3101 Function key 10 k; stuff \033[21~
3102 Function key 11 F1 stuff \033[23~
3103 Function key 12 F2 stuff \033[24~
3104 Home kh stuff \033[1~
3105 End kH stuff \033[4~
3106 Insert kI stuff \033[2~
3107 Delete kD stuff \033[3~
3108 Page up kP stuff \033[5~
3109 Page down kN stuff \033[6~
3110 Keypad 0 f0 stuff 0
3111 stuff \033Op (A)
3112 Keypad 1 f1 stuff 1
3113 stuff \033Oq (A)
3114 Keypad 2 f2 stuff 2
3115 stuff \033Or (A)
3116 Keypad 3 f3 stuff 3
3117 stuff \033Os (A)
3118 Keypad 4 f4 stuff 4
3119 stuff \033Ot (A)
3120 Keypad 5 f5 stuff 5
3121 stuff \033Ou (A)
3122 Keypad 6 f6 stuff 6
3123 stuff \033Ov (A)
3124 Keypad 7 f7 stuff 7
3125 stuff \033Ow (A)
3126 Keypad 8 f8 stuff 8
3127 stuff \033Ox (A)
3128 Keypad 9 f9 stuff 9
3129 stuff \033Oy (A)
3130 Keypad + f+ stuff +
3131 stuff \033Ok (A)
3132 Keypad - f- stuff -
3133 stuff \033Om (A)
3134 Keypad * f* stuff *
3135 stuff \033Oj (A)
3136 Keypad / f/ stuff /
3137 stuff \033Oo (A)
3138 Keypad = fq stuff =
3139 stuff \033OX (A)
3140 Keypad . f. stuff .
3141 stuff \033On (A)
3142 Keypad , f, stuff ,
3143 stuff \033Ol (A)
3144 Keypad enter fe stuff \015
3145 stuff \033OM (A)
3146
3147
3148
3149SPECIAL TERMINAL CAPABILITIES
3150 The following table describes all terminal capabilities that are recogâ€
3151 nized by screen and are not in the termcap(5) manual. You can place
3152 these capabilities in your termcap entries (in `/etc/termcap') or use
3153 them with the commands `termcap', `terminfo' and `termcapinfo' in your
3154 screenrc files. It is often not possible to place these capabilities in
3155 the terminfo database.
3156
3157 LP (bool) Terminal has VT100 style margins (`magic margins'). Note
3158 that this capability is obsolete because screen uses the
3159 standard 'xn' instead.
3160
3161 Z0 (str) Change width to 132 columns.
3162
3163 Z1 (str) Change width to 80 columns.
3164
3165 WS (str) Resize display. This capability has the desired width and
3166 height as arguments. SunView(tm) example: '\E[8;%d;%dt'.
3167
3168 NF (bool) Terminal doesn't need flow control. Send ^S and ^Q direct
3169 to the application. Same as 'flow off'. The opposite of
3170 this capability is 'nx'.
3171
3172 G0 (bool) Terminal can deal with ISO 2022 font selection sequences.
3173
3174 S0 (str) Switch charset 'G0' to the specified charset. Default is
3175 '\E(%.'.
3176
3177 E0 (str) Switch charset 'G0' back to standard charset. Default is
3178 '\E(B'.
3179
3180 C0 (str) Use the string as a conversion table for font '0'. See the
3181 'ac' capability for more details.
3182
3183 CS (str) Switch cursor-keys to application mode.
3184
3185 CE (str) Switch cursor-keys back to normal mode.
3186
3187 AN (bool) Turn on autonuke. See the 'autonuke' command for more
3188 details.
3189
3190 OL (num) Set the output buffer limit. See the 'obuflimit' command
3191 for more details.
3192
3193 KJ (str) Set the encoding of the terminal. See the 'encoding' comâ€
3194 mand for valid encodings.
3195
3196 AF (str) Change character foreground color in an ANSI conform way.
3197 This capability will almost always be set to '\E[3%dm'
3198 ('\E[3%p1%dm' on terminfo machines).
3199
3200 AB (str) Same as 'AF', but change background color.
3201
3202 AX (bool) Does understand ANSI set default fg/bg color (\E[39m /
3203 \E[49m).
3204
3205 XC (str) Describe a translation of characters to strings depending
3206 on the current font. More details follow in the next secâ€
3207 tion.
3208
3209 XT (bool) Terminal understands special xterm sequences (OSC, mouse
3210 tracking).
3211
3212 C8 (bool) Terminal needs bold to display high-intensity colors (e.g.
3213 Eterm).
3214
3215 TF (bool) Add missing capabilities to the termcap/info entry. (Set
3216 by default).
3217
3218
3219CHARACTER TRANSLATION
3220 Screen has a powerful mechanism to translate characters to arbitrary
3221 strings depending on the current font and terminal type. Use this feaâ€
3222 ture if you want to work with a common standard character set (say
3223 ISO8851-latin1) even on terminals that scatter the more unusual characâ€
3224 ters over several national language font pages.
3225
3226 Syntax:
3227 XC=<charset-mapping>{,,<charset-mapping>}
3228 <charset-mapping> := <designator><template>{,<mapping>}
3229 <mapping> := <char-to-be-mapped><template-arg>
3230
3231 The things in braces may be repeated any number of times.
3232
3233 A <charset-mapping> tells screen how to map characters in font <desigâ€
3234 nator> ('B': Ascii, 'A': UK, 'K': German, etc.) to strings. Every
3235 <mapping> describes to what string a single character will be transâ€
3236 lated. A template mechanism is used, as most of the time the codes have
3237 a lot in common (for example strings to switch to and from another
3238 charset). Each occurrence of '%' in <template> gets substituted with
3239 the <template-arg> specified together with the character. If your
3240 strings are not similar at all, then use '%' as a template and place
3241 the full string in <template-arg>. A quoting mechanism was added to
3242 make it possible to use a real '%'. The '\' character quotes the speâ€
3243 cial characters '\', '%', and ','.
3244
3245 Here is an example:
3246
3247 termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]'
3248
3249 This tells screen how to translate ISOlatin1 (charset 'B') upper case
3250 umlaut characters on a hp700 terminal that has a German charset. '\304'
3251 gets translated to '\E(K[\E(B' and so on. Note that this line gets
3252 parsed *three* times before the internal lookup table is built, thereâ€
3253 fore a lot of quoting is needed to create a single '\'.
3254
3255 Another extension was added to allow more emulation: If a mapping
3256 translates the unquoted '%' char, it will be sent to the terminal whenâ€
3257 ever screen switches to the corresponding <designator>. In this special
3258 case the template is assumed to be just '%' because the charset switch
3259 sequence and the character mappings normally haven't much in common.
3260
3261 This example shows one use of the extension:
3262
3263 termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334'
3264
3265 Here, a part of the German ('K') charset is emulated on an xterm. If
3266 screen has to change to the 'K' charset, '\E(B' will be sent to the
3267 terminal, i.e. the ASCII charset is used instead. The template is just
3268 '%', so the mapping is straightforward: '[' to '\304', '\' to '\326',
3269 and ']' to '\334'.
3270
3271
3272ENVIRONMENT
3273 COLUMNS Number of columns on the terminal (overrides termcap
3274 entry).
3275 HOME Directory in which to look for .screenrc.
3276 LINES Number of lines on the terminal (overrides termcap
3277 entry).
3278 LOCKPRG Screen lock program.
3279 NETHACKOPTIONS Turns on nethack option.
3280 PATH Used for locating programs to run.
3281 SCREENCAP For customizing a terminal's TERMCAP value.
3282 SCREENDIR Alternate socket directory.
3283 SCREENRC Alternate user screenrc file.
3284 SHELL Default shell program for opening windows (default
3285 "/bin/sh").
3286 STY Alternate socket name.
3287 SYSSCREENRC Alternate system screenrc file.
3288 TERM Terminal name.
3289 TERMCAP Terminal description.
3290 WINDOW Window number of a window (at creation time).
3291
3292FILES
3293 .../screen-4.?.??/etc/screenrc
3294 .../screen-4.?.??/etc/etcscreenrc Examples in the screen distribution
3295 package for private and global iniâ€
3296 tialization files.
3297 $SYSSCREENRC
3298 /etc/screenrc screen initialization commands
3299 $SCREENRC
3300 $HOME/.screenrc Read in after /etc/screenrc
3301 $SCREENDIR/S-<login>
3302 /var/run/screen/S-<login> Socket directories (default)
3303 /usr/tmp/screens/S-<login> Alternate socket directories.
3304 <socket directory>/.termcap Written by the "termcap" output funcâ€
3305 tion
3306 /usr/tmp/screens/screen-exchange or
3307 /tmp/screen-exchange screen `interprocess communication
3308 buffer'
3309 hardcopy.[0-9] Screen images created by the hardcopy
3310 function
3311 screenlog.[0-9] Output log files created by the log
3312 function
3313 /usr/lib/terminfo/?/* or
3314 /etc/termcap Terminal capability databases
3315 /var/run/utmp Login records
3316 $LOCKPRG Program that locks a terminal.
3317
3318
3319SEE ALSO
3320 termcap(5), utmp(5), vi(1), captoinfo(1), tic(1)
3321
3322
3323AUTHORS
3324 Originally created by Oliver Laumann, this latest version was produced
3325 by Wayne Davison, Juergen Weigert and Michael Schroeder.
3326
3327COPYLEFT
3328 Copyright (C) 1993-2003
3329 Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
3330 Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
3331 Copyright (C) 1987 Oliver Laumann
3332 This program is free software; you can redistribute it and/or modify it
3333 under the terms of the GNU General Public License as published by the
3334 Free Software Foundation; either version 2, or (at your option) any
3335 later version.
3336 This program is distributed in the hope that it will be useful, but
3337 WITHOUT ANY WARRANTY; without even the implied warranty of MERâ€
3338 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
3339 Public License for more details.
3340 You should have received a copy of the GNU General Public License along
3341 with this program (see the file COPYING); if not, write to the Free
3342 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3343 02111-1307, USA
3344
3345CONTRIBUTORS
3346 Ken Beal (kbeal@amber.ssd.csd.harris.com),
3347 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de),
3348 Toerless Eckert (eckert@immd4.informatik.uni-erlangen.de),
3349 Wayne Davison (davison@borland.com),
3350 Patrick Wolfe (pat@kai.com, kailand!pat),
3351 Bart Schaefer (schaefer@cse.ogi.edu),
3352 Nathan Glasser (nathan@brokaw.lcs.mit.edu),
3353 Larry W. Virden (lvirden@cas.org),
3354 Howard Chu (hyc@hanauma.jpl.nasa.gov),
3355 Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
3356 Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
3357 Marc Boucher (marc@CAM.ORG),
3358 Doug Siebert (dsiebert@isca.uiowa.edu),
3359 Ken Stillson (stillson@tsfsrv.mitre.org),
3360 Ian Frechett (frechett@spot.Colorado.EDU),
3361 Brian Koehmstedt (bpk@gnu.ai.mit.edu),
3362 Don Smith (djs6015@ultb.isc.rit.edu),
3363 Frank van der Linden (vdlinden@fwi.uva.nl),
3364 Martin Schweikert (schweik@cpp.ob.open.de),
3365 David Vrona (dave@sashimi.lcu.com),
3366 E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
3367 Matthew Green (mrg@eterna.com.au),
3368 Christopher Williams (cgw@pobox.com),
3369 Matt Mosley (mattm@access.digex.net),
3370 Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
3371 Johannes Zellner (johannes@zellner.org),
3372 Pablo Averbuj (pablo@averbuj.com).
3373
3374
3375VERSION
3376 This is version 4.0.2. Its roots are a merge of a custom version 2.3PR7
3377 by Wayne Davison and several enhancements to Oliver Laumann's version
3378 2.0. Note that all versions numbered 2.x are copyright by Oliver Lauâ€
3379 mann.
3380
3381AVAILABILITY
3382 The latest official release of screen available via anonymous ftp from
3383 gnudist.gnu.org, nic.funet.fi or any other GNU distribution site. The
3384 home site of screen is ftp.uni-erlangen.de, in the directory pub/utiliâ€
3385 ties/screen. The subdirectory `private' contains the latest beta testâ€
3386 ing release. If you want to help, send a note to screen@uni-erlanâ€
3387 gen.de.
3388
3389BUGS
3390 · `dm' (delete mode) and `xs' are not handled correctly (they are
3391 ignored). `xn' is treated as a magic-margin indicator.
3392
3393 · Screen has no clue about double-high or double-wide characters. But
3394 this is the only area where vttest is allowed to fail.
3395
3396 · It is not possible to change the environment variable $TERMCAP when
3397 reattaching under a different terminal type.
3398
3399 · The support of terminfo based systems is very limited. Adding extra
3400 capabilities to $TERMCAP may not have any effects.
3401
3402 · Screen does not make use of hardware tabs.
3403
3404 · Screen must be installed as set-uid with owner root on most systems
3405 in order to be able to correctly change the owner of the tty device
3406 file for each window. Special permission may also be required to
3407 write the file "/var/run/utmp".
3408
3409 · Entries in "/var/run/utmp" are not removed when screen is killed
3410 with SIGKILL. This will cause some programs (like "w" or "rwho") to
3411 advertise that a user is logged on who really isn't.
3412
3413 · Screen may give a strange warning when your tty has no utmp entry.
3414
3415 · When the modem line was hung up, screen may not automatically detach
3416 (or quit) unless the device driver is configured to send a HANGUP
3417 signal. To detach a screen session use the -D or -d command line
3418 option.
3419
3420 · If a password is set, the command line options -d and -D still
3421 detach a session without asking.
3422
3423 · Both "breaktype" and "defbreaktype" change the break generating
3424 method used by all terminal devices. The first should change a winâ€
3425 dow specific setting, where the latter should change only the
3426 default for new windows.
3427
3428 · When attaching to a multiuser session, the user's .screenrc file is
3429 not sourced. Each user's personal settings have to be included in
3430 the .screenrc file from which the session is booted, or have to be
3431 changed manually.
3432
3433 · A weird imagination is most useful to gain full advantage of all the
3434 features.
3435
3436 · Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza
3437 to screen@uni-erlangen.de.
3438
3439
3440
3441
34424th Berkeley Distribution Aug 2003 SCREEN(1)