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