Misc updates to the man and info pages.
[screen-lua.git] / src / doc / screen.1
blobc17589190151a5c309a7ca78fd2ca7cc094458d8
1 .\" vi:set wm=5
2 .TH SCREEN 1 "Aug 2003"
3 .if n .ds Q \&"
4 .if n .ds U \&"
5 .if t .ds Q ``
6 .if t .ds U ''
7 .UC 4
8 .SH NAME
9 screen \- screen manager with VT100/ANSI terminal emulation
12 .SH SYNOPSIS
13 .B screen
15 .B \-\fIoptions\fP
16 ] [
17 .B \fIcmd\fP
19 .B \fIargs\fP
20 ] ]
21 .br
22 .B screen \-r
23 [[\fIpid\fP\fB.\fP]\fItty\fP[\fB.\fP\fIhost\fP]]
24 .br
25 .B screen \-r
26 \fIsessionowner\fP\fB/\fP[[\fIpid\fP\fB.\fP]\fItty\fP[\fB.\fP\fIhost\fP]]
27 .ta .5i 1.8i
30 .SH DESCRIPTION
31 .I Screen
32 is a full-screen window manager that
33 multiplexes a physical terminal between several processes (typically
34 interactive shells).
35 Each virtual terminal provides the functions
36 of a DEC VT100 terminal and, in addition, several control functions
37 from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards
38 (e.\|g. insert/delete line and support for multiple character sets).
39 There is a scrollback history buffer for each virtual terminal and a
40 copy-and-paste mechanism that allows moving text regions between
41 windows.
42 .PP
43 When
44 .I screen
45 is called, it creates a single window with a shell in it (or the specified
46 command) and then gets out of your way so that you can use the program as you
47 normally would.
48 Then, at any time, you can create new (full-screen) windows with other programs
49 in them (including more shells), kill existing windows, view a list of
50 windows, turn output logging on and off, copy-and-paste text between
51 windows, view the scrollback history, switch between windows
52 in whatever manner you wish, etc. All windows run their programs completely
53 independent of each other. Programs continue to run when their window
54 is currently not visible and even when the whole 
55 .I screen 
56 session is detached from the user's terminal.  When a program terminates,
57 .I screen
58 (per default) kills the window that contained it.
59 If this window was in the foreground, the display switches to the previous
60 window; if none are left,
61 .I screen
62 exits.
63 .PP
64 Everything you type is sent to the program running in the current window.
65 The only exception to this is the one keystroke that is used to initiate
66 a command to the window manager.
67 By default, each command begins with a control-a (abbreviated C-a from
68 now on), and is followed by one other keystroke.
69 The command character and all the key bindings can be fully customized
70 to be anything you like, though they are always two characters in length.
71 .PP
72 .I Screen
73 does not understand the prefix \*QC-\*U to mean control. 
74 Please use the caret notation (\*Q^A\*U instead of \*QC-a\*U) as arguments
75 to e.g. the 
76 .I escape
77 command or the \fI-e\fP option.
78 .I Screen
79 will also print out control characters in caret notation.
80 .PP
81 The standard way to create a new window is to type \*QC-a c\*U.
82 This creates a new window running a shell and switches to that
83 window immediately, regardless of the state of the process running
84 in the current window.
85 Similarly, you can create a new window with a custom command in it by
86 first binding the command to a keystroke (in your .screenrc file or at the
87 \*QC-a :\*U command line) and
88 then using it just like the \*QC-a c\*U command.
89 In addition, new windows can be created by running a command like:
90 .IP
91 screen emacs prog.c
92 .PP
93 from a shell prompt within a previously created window.
94 This will not run another copy of
95 .IR screen ,
96 but will instead supply the command name and its arguments to the window
97 manager (specified in the $STY environment variable) who will use it to
98 create the new window.
99 The above example would start the emacs editor (editing prog.c) and switch
100 to its window. - Note that you cannot transport environment variables from
101 the invoking shell to the application (emacs in this case), because it is
102 forked from the parent screen process, not from the invoking shell.
104 If \*Q/etc/utmp\*U is writable by
105 .IR screen ,
106 an appropriate record will be written to this file for each window, and
107 removed when the window is terminated.
108 This is useful for working with \*Qtalk\*U, \*Qscript\*U, \*Qshutdown\*U,
109 \*Qrsend\*U, \*Qsccs\*U and other similar programs that use the utmp
110 file to determine who you are. As long as
111 .I screen
112 is active on your terminal,
113 the terminal's own record is removed from the utmp file. See also \*QC-a L\*U.
116 .SH GETTING STARTED
117 Before you begin to use
118 .I screen
119 you'll need to make sure you have correctly selected your terminal type,
120 just as you would for any other termcap/terminfo program.
121 (You can do this by using
122 .IR tset
123 for example.)
125 If you're impatient and want to get started without doing a lot more reading,
126 you should remember this one command:  \*QC-a ?\*U.
127 Typing these two characters will display a list of the available
128 .I screen
129 commands and their bindings. Each keystroke is discussed in
130 the section \*QDEFAULT KEY BINDINGS\*U. The manual section \*QCUSTOMIZATION\*U
131 deals with the contents of your .screenrc.
133 If your terminal is a \*Qtrue\*U auto-margin terminal (it doesn't allow
134 the last position on the screen to be updated without scrolling the
135 screen) consider using a version of your terminal's termcap that has
136 automatic margins turned \fIoff\fP. This will ensure an accurate and
137 optimal update of the screen in all circumstances. Most terminals
138 nowadays have \*Qmagic\*U margins (automatic margins plus usable last
139 column). This is the VT100 style type and perfectly suited for
140 .IR screen .
141 If all you've got is a \*Qtrue\*U auto-margin terminal 
142 .I screen
143 will be content to use it, but updating a character put into the last
144 position on the screen may not be possible until the screen scrolls or
145 the character is moved into a safe position in some other way. This
146 delay can be shortened by using a terminal with insert-character
147 capability.
150 .SH "COMMAND-LINE OPTIONS"
151 Screen has the following command-line options:
152 .TP 5
153 .B \-a
154 include \fIall\fP capabilities (with some minor exceptions) in each
155 window's termcap, even if
156 .I screen
157 must redraw parts of the display in order to implement a function.
158 .TP 5
159 .B \-A
160 Adapt the sizes of all windows to the size of the current terminal.
161 By default,
162 .I screen
163 tries to restore its old window sizes when attaching to resizable terminals
164 (those with \*QWS\*U in its description, e.g. suncmd or some xterm).
165 .TP 5
166 .BI "\-c " file
167 override the default configuration file from \*Q$HOME/.screenrc\*U
168 to \fIfile\fP.
169 .TP 5
170 .BR \-d | \-D " [" \fIpid.tty.host ]
171 does not start
172 .IR screen ,
173 but detaches the elsewhere running
174 .I screen
175 session. It has the same effect as typing \*QC-a d\*U from
176 .IR screen 's
177 controlling terminal. \fB\-D\fP is the equivalent to the power detach key.
178 If no session can be detached, this option is ignored. In combination with the
179 \fB\-r\fP/\fB\-R\fP option more powerful effects can be achieved:
180 .TP 8
181 .B \-d \-r
182 Reattach a session and if necessary detach it first.
183 .TP 8
184 .B \-d \-R
185 Reattach a session and if necessary detach or even create it first.
186 .TP 8
187 .B \-d \-RR
188 Reattach a session and if necessary detach or create it. Use the first
189 session if more than one session is available.
190 .TP 8
191 .B \-D \-r
192 Reattach a session. If necessary detach and logout remotely first.
193 .TP 8
194 .B \-D \-R
195 Attach here and now. In detail this means: If a session is running, then
196 reattach. If necessary detach and logout remotely first.
197 If it was not running create it and notify the user. This is the
198 author's favorite.
199 .TP 8
200 .B \-D \-RR
201 Attach here and now. Whatever that means, just do it.
202 .IP "" 5
203 Note: It is always a good idea to check the status of your sessions by means of
204 \*Qscreen \-list\*U.
205 .TP 5
206 .BI "\-e " xy
207 specifies the command character to be \fIx\fP and the character generating a
208 literal command character to \fIy\fP (when typed after the command character).
209 The default is \*QC-a\*U and `a', which can be specified as \*Q-e^Aa\*U.
210 When creating a
211 .I screen
212 session, this option sets the default command character. In a multiuser
213 session all users added will start off with this command character. But
214 when attaching to an already running session, this option changes only
215 the command character of the attaching user.
216 This option is equivalent to either the commands \*Qdefescape\*U or
217 \*Qescape\*U respectively.
218 .TP 5
219 .BR \-f\fP ", " \-fn ", and " \-fa
220 turns flow-control on, off, or \*Qautomatic switching mode\*U.
221 This can also be defined through the \*Qdefflow\*U .screenrc command.
222 .TP 5
223 .BI "\-h " num
224 Specifies the history scrollback buffer to be \fInum\fP lines high.
225 .TP 5
226 .B \-i
227 will cause the interrupt key (usually C-c) to interrupt the display
228 immediately when flow-control is on.
229 See the \*Qdefflow\*U .screenrc command for details.
230 The use of this option is discouraged.
231 .TP 5
232 .BR \-l " and " \-ln
233 turns login mode on or off (for /etc/utmp updating).
234 This can also be defined through the \*Qdeflogin\*U .screenrc command.
235 .TP 5
236 .BR \-ls " [" \fImatch ]
237 .PD 0
238 .TP 5
239 .BR \-list " [" \fImatch ] 
241 does not start
242 .IR screen ,
243 but prints a list of
244 .I pid.tty.host
245 strings identifying your
246 .I screen
247 sessions.
248 Sessions marked `detached' can be resumed with \*Qscreen -r\*U. Those marked
249 `attached' are running and have a controlling terminal. If the session runs in 
250 multiuser mode, it is marked `multi'. Sessions marked as `unreachable' either
251 live on a different host or are `dead'.
252 An unreachable session is considered dead, when its name
253 matches either the name of the local host, or the specified parameter, if any.
254 See the \fB-r\fP flag for a description how to construct matches.
255 Sessions marked as `dead' should be thoroughly checked and removed. 
256 Ask your system administrator if you are not sure. Remove sessions with the 
257 \fB-wipe\fP option. 
258 .TP 5
259 .B \-L
260 tells
261 .I screen
262 to turn on automatic output logging for the windows.
263 .TP 5
264 .B \-m
265 causes
266 .I screen
267 to ignore the $STY environment variable. With \*Qscreen -m\*U creation of
268 a new session is enforced, regardless whether
269 .I screen
270 is called from within another
271 .I screen
272 session or not. This flag has a special meaning in connection
273 with the `-d' option:
274 .TP 8
275 .B \-d \-m
276 Start
277 .I screen
278 in \*Qdetached\*U mode. This creates a new session but doesn't
279 attach to it. This is useful for system startup scripts.
280 .TP 8
281 .B \-D \-m
282 This also starts screen in \*Qdetached\*U mode, but doesn't fork
283 a new process. The command exits if the session terminates.
284 .TP 5
285 .B \-O
286 selects a more optimal output mode for your terminal rather than true VT100
287 emulation (only affects auto-margin terminals without `LP').
288 This can also be set in your .screenrc by specifying `OP' in a \*Qtermcap\*U
289 command.
290 .TP 5
291 .BI "\-p " number_or_name|-|=|+
292 Preselect a window. This is useful when you want to reattach to a
293 specific window or you want to send a command via the \*Q-X\*U
294 option to a specific window. As with screen's select command, \*Q-\*U
295 selects the blank window. As a special case for reattach, \*Q=\*U
296 brings up the windowlist on the blank window, while a \*Q+\*U
297 will create a new window. The command will not be
298 executed if the specified window could not be found.
299 .TP 5
300 .B \-q
301 Suppress printing of error messages. In combination with \*Q-ls\*U the exit 
302 value is as follows: 9 indicates a directory without sessions. 10 
303 indicates a directory with running but not attachable sessions. 11 (or more) 
304 indicates 1 (or more) usable sessions.
305 In combination with \*Q-r\*U the exit value is as follows: 10 indicates that 
306 there is no session to resume. 12 (or more) indicates that there are 2 (or 
307 more) sessions to resume and you should specify which one to choose. 
308 In all other cases \*Q-q\*U has no effect.
309 .TP 5
310 .B \-Q
311 Some commands now can be queried from a remote session using this
312 flag, e.g. 'screen -Q windows'. The commands will send the
313 response to the stdout of the querying process. If there was an
314 error in the command, then the querying process will exit with
315 a non-zero status.
317 The commands that can be queried now are:
318  \fBecho\fP
319  \fBinfo\fP
320  \fBlastmsg\fP
321  \fBnumber\fP
322  \fBselect\fP
323  \fBtime\fP
324  \fBtitle\fP
325  \fBwindows\fP
326 .TP 5
327 .BR \-r " [" \fIpid.tty.host ]
328 .PD 0
329 .TP 5
330 .BR \-r " \fIsessionowner/[" \fIpid.tty.host ]
332 resumes a detached
333 .I screen
334 session.  No other options (except combinations with \fB\-d\fP/\fB\-D\fP) may
335 be specified, though an optional prefix of [\fIpid.\fP]\fItty.host\fP
336 may be needed to distinguish between multiple detached
337 .I screen
338 sessions.  The second form is used to connect to another user's screen session
339 which runs in multiuser mode. This indicates that screen should look for
340 sessions in another user's directory. This requires setuid-root.
341 .TP 5
342 .B \-R
343 attempts to resume the first detached
344 .I screen
345 session it finds.  If successful, all other command-line options are ignored.
346 If no detached session exists, starts a new session using the specified
347 options, just as if
348 .B \-R
349 had not been specified. The option is set by default if
350 .I screen
351 is run as a login-shell (actually screen uses \*Q-xRR\*U in that case).
352 For combinations with the \fB\-d\fP/\fB\-D\fP option see there.
353 .TP 5
354 .BI "\-s " program 
355 sets the default shell to the program specified, instead of the value
356 in the environment variable $SHELL (or \*Q/bin/sh\*U if not defined).
357 This can also be defined through the \*Qshell\*U .screenrc command.
358 .TP 5
359 .BI "\-S " sessionname
360 When creating a new session, this option can be used to specify a
361 meaningful name for the session. This name identifies the session for
362 \*Qscreen -list\*U and \*Qscreen -r\*U actions. It substitutes the
363 default [\fItty.host\fP] suffix.
364 .TP 5
365 .BI "\-t " name
366 sets the title (a.\|k.\|a.) for the default shell or specified program.
367 See also the \*Qshelltitle\*U .screenrc command.
368 .TP 5
369 .BI "\-T " term
370 Set the $TERM enviroment varible using the spcified term as
371 opposed to the defualt setting of \fBscreen\fP.
372 .TP 5
373 .B \-U
374 Run screen in UTF-8 mode. This option tells screen that your terminal
375 sends and understands UTF-8 encoded characters. It also sets the default
376 encoding for new windows to `utf8'.
377 .TP 5
378 .B \-v
379 Print version number.
380 .TP 5
381 .BR \-wipe " [" \fImatch ]
382 does the same as \*Qscreen -ls\*U, but removes destroyed sessions instead of
383 marking them as `dead'.
384 An unreachable session is considered dead, when its name matches either 
385 the name of the local host, or the explicitly given parameter, if any.
386 See the \fB-r\fP flag for a description how to construct matches.
387 .TP 5
388 .B \-x
389 Attach to a not detached
390 .I screen
391 session. (Multi display mode).
392 .I Screen
393 refuses to attach from within itself. 
394 But when cascading multiple screens, loops are not detected; take care.
395 .TP 5
396 .B \-X
397 Send the specified command to a running screen session. You can use
398 the \fB-d\fP or \fB-r\fP option to tell screen to look only for
399 attached or detached screen sessions. Note that this command doesn't
400 work if the session is password protected.
402 .SH "DEFAULT KEY BINDINGS"
403 .ta 12n 26n
404 As mentioned, each
405 .I screen
406 command consists of a
407 \*QC-a\*U followed by one other character.
408 For your convenience, all commands that are bound to lower-case letters are
409 also bound to their control character counterparts (with the exception
410 of \*QC-a a\*U; see below), thus, \*QC-a c\*U as well as \*QC-a C-c\*U can
411 be used to create a window. See section \*QCUSTOMIZATION\*U for a description
412 of the command.
414 .TP 26n
415 The following table shows the default key bindings:
416 .IP "\fBC-a '\fP        (select)"
417 Prompt for a window name or number to switch to.
418 .IP "\fBC-a ""\fP       (windowlist -b)"
419 Present a list of all windows for selection.
420 .IP "\fBC-a 0\fP        (select 0)"
421 .PD 0
422 .IP "\fB ... \fP           ..."
423 .IP "\fBC-a 9\fP        (select 9)"
424 .IP "\fBC-a -\fP        (select -)"
426 Switch to window number 0 \- 9, or to the blank window.
427 .IP "\fBC-a tab\fP      (focus)"
429 Switch the input focus to the next region.
430 See also \fIsplit, remove, only\fP.
431 .IP "\fBC-a C-a\fP      (other)"
432 Toggle to the window displayed previously.
433 Note that this binding defaults to the command character typed twice,
434 unless overridden.  For instance, if you use the option \*Q\fB\-e]x\fP\*U,
435 this command becomes \*Q]]\*U.
436 .IP "\fBC-a a\fP        (meta)"
437 Send the command character (C-a) to window. See \fIescape\fP command.
438 .IP "\fBC-a A\fP        (title)"
439 Allow the user to enter a name for the current window.
440 .IP "\fBC-a b\fP"
441 .PD 0
442 .IP "\fBC-a C-b\fP      (break)"
444 Send a break to window.
445 .IP "\fBC-a B\fP        (pow_break)"
446 Reopen the terminal line and send a break.
447 .IP "\fBC-a c\fP"
448 .PD 0
449 .IP "\fBC-a C-c\fP      (screen)"
451 Create a new window with a shell and switch to that window.
452 .IP "\fBC-a C\fP        (clear)"
453 Clear the screen.
454 .IP "\fBC-a d\fP"
455 .PD 0
456 .IP "\fBC-a C-d\fP      (detach)"
458 Detach
459 .I screen
460 from this terminal.
461 .IP "\fBC-a D D\fP      (pow_detach)"
462 Detach and logout.
463 .IP "\fBC-a f\fP"
464 .PD 0
465 .IP "\fBC-a C-f\fP      (flow)"
467 Toggle flow \fIon\fP, \fIoff\fP or \fIauto\fP.
468 .IP "\fBC-a F\fP        (fit)"
469 Resize the window to the current region size.
470 .IP "\fBC-a C-g\fP      (vbell)"
471 Toggles
472 .I screen's
473 visual bell mode.
474 .IP "\fBC-a h\fP        (hardcopy)"
476 Write a hardcopy of the current window to the file \*Qhardcopy.\fIn\fP\*U.
477 .IP "\fBC-a H\fP        (log)"
478 Begins/ends logging of the current window to the file \*Qscreenlog.\fIn\fP\*U.
479 .IP "\fBC-a i\fP"
480 .PD 0
481 .IP "\fBC-a C-i\fP      (info)"
483 Show info about this window.
484 .IP "\fBC-a k\fP"
485 .PD 0
486 .IP "\fBC-a C-k\fP      (kill)"
488 Destroy current window.
489 .IP "\fBC-a l\fP"
490 .PD 0
491 .IP "\fBC-a C-l\fP      (redisplay)"
493 Fully refresh current window.
494 .IP "\fBC-a L\fP        (login)"
495 Toggle this windows login slot. Available only if
496 .I screen
497 is configured to update the utmp database.
498 .IP "\fBC-a m\fP"
499 .PD 0
500 .IP "\fBC-a C-m\fP      (lastmsg)"
502 Repeat the last message displayed in the message line.
503 .IP "\fBC-a M\fP        (monitor)"
504 Toggles monitoring of the current window.
505 .IP "\fBC-a space\fP"
506 .PD 0
507 .IP "\fBC-a n\fP"
508 .IP "\fBC-a C-n\fP      (next)"
510 Switch to the next window.
511 .IP "\fBC-a N\fP        (number)"
512 Show the number (and title) of the current window.
513 .IP "\fBC-a backspace\fP"
514 .PD 0
515 .IP "\fBC-a h\fP"
516 .IP "\fBC-a p\fP"
517 .IP "\fBC-a C-p\fP      (prev)"
519 Switch to the previous window (opposite of \fBC-a n\fP).
520 .IP "\fBC-a q\fP"
521 .PD 0
522 .IP "\fBC-a C-q\fP      (xon)"
524 Send a control-q to the current window.
525 .IP "\fBC-a Q\fP        (only)"
526 Delete all regions but the current one.
527 See also \fIsplit, remove, focus\fP.
528 .IP "\fBC-a r\fP"
529 .PD 0
530 .IP "\fBC-a C-r\fP      (wrap)"
532 Toggle the current window's line-wrap setting (turn the current window's
533 automatic margins on and off).
534 .IP "\fBC-a s\fP"
535 .PD 0
536 .IP "\fBC-a C-s\fP      (xoff)"
538 Send a control-s to the current window.
539 .IP "\fBC-a S\fP        (split)"
540 Split the current region horizontally into two new ones.
541 See also \fIonly, remove, focus\fP.
542 .IP "\fBC-a t\fP"
543 .PD 0
544 .IP "\fBC-a C-t\fP      (time)"
546 Show system information.
547 .IP "\fBC-a v\fP        (version)"
549 Display the version and compilation date.
550 .IP "\fBC-a C-v\fP      (digraph)"
552 Enter digraph.
553 .IP "\fBC-a w\fP"
554 .PD 0
555 .IP "\fBC-a C-w\fP      (windows)"
557 Show a list of window.
558 .IP "\fBC-a W\fP        (width)"
559 Toggle 80/132 columns.
560 .IP "\fBC-a x\fP"
561 .PD 0
562 .IP "\fBC-a C-x\fP      (lockscreen)"
564 Lock this terminal.
565 .IP "\fBC-a X\fP        (remove)"
566 Kill the current region.
567 See also \fIsplit, only, focus\fP.
568 .IP "\fBC-a z\fP"
569 .PD 0
570 .IP "\fBC-a C-z\fP      (suspend)"
572 Suspend
573 .IR screen .
574 Your system must support BSD-style job-control.
575 .IP "\fBC-a Z\fP        (reset)"
576 Reset the virtual terminal to its \*Qpower-on\*U values.
577 .IP "\fBC-a .\fP        (dumptermcap)"
578 Write out a \*Q.termcap\*U file.
579 .IP "\fBC-a ?\fP        (help)"
580 Show key bindings.
581 .IP "\fBC-a C-\e\fP     (quit)"
582 Kill all windows and terminate
583 .IR screen .
584 .IP "\fBC-a :\fP        (colon)"
585 Enter command line mode.
586 .IP "\fBC-a [\fP"
587 .PD 0
588 .IP "\fBC-a C-[\fP"
589 .IP "\fBC-a esc\fP      (copy)"
591 Enter copy/scrollback mode.
592 .IP "\fBC-a C-]\fP"
593 .PD 0
594 .IP "\fBC-a ]\fP        (paste .)"
596 Write the contents of the paste buffer to the stdin queue of the
597 current window. 
598 .IP "\fBC-a {\fP
599 .PD 0
600 .IP "\fBC-a }\fP        (history)"
602 Copy and paste a previous (command) line.
603 .IP "\fBC-a >\fP        (writebuf)"
604 Write paste buffer to a file.
605 .IP "\fBC-a <\fP        (readbuf)"
606 Reads the screen-exchange file into the paste buffer.
607 .IP "\fBC-a =\fP        (removebuf)"
608 Removes the file used by \fBC-a <\fP and \fPC-a >\fP.
609 .IP "\fBC-a ,\fP        (license)"
610 Shows where
611 .I screen
612 comes from, where it went to and why you can use it.
613 .IP "\fBC-a _\fP        (silence)"
614 Start/stop monitoring the current window for inactivity.
615 .IP "\fBC-a |\fP        (split -v)"
616 Split the current region vertically into two new ones.
617 .IP "\fBC-a *\fP        (displays)"
618 Show a listing of all currently attached displays.
621 .SH CUSTOMIZATION
622 The \*Qsocket directory\*U defaults either to $HOME/.screen or simply to
623 /tmp/screens or preferably to /usr/local/screens chosen at compile-time. If
624 .I screen
625 is installed setuid-root, then the administrator
626 should compile
627 .I screen
628 with an adequate (not NFS mounted) socket directory. If
629 .I screen
630 is not running setuid-root, the user can specify any mode 700 directory
631 in the environment variable $SCREENDIR.
633 When
634 .I screen
635 is invoked, it executes initialization commands from the files
636 \*Q/usr/local/etc/screenrc\*U and
637 \*Q.screenrc\*U in the user's home directory. These are the \*Qprogrammer's
638 defaults\*U that can be overridden in the following ways: for the
639 global screenrc file 
640 .I screen
641 searches for the environment variable $SYSSCREENRC (this override feature
642 may be disabled at compile-time). The user specific
643 screenrc file is searched in $SCREENRC, then $HOME/.screenrc.
644 The command line option \fB-c\fP takes
645 precedence over the above user screenrc files.
647 Commands in these files are used to set options, bind functions to
648 keys, and to automatically establish one or more windows at the
649 beginning of your
650 .I screen
651 session.
652 Commands are listed one per line, with empty lines being ignored.
653 A command's arguments are separated by tabs or spaces, and may be
654 surrounded by single or double quotes.
655 A `#' turns the rest of the line into a comment, except in quotes.
656 Unintelligible lines are warned about and ignored.
657 Commands may contain references to environment variables. The 
658 syntax is the shell-like "$VAR " or "${VAR}". Note that this causes 
659 incompatibility with previous 
660 .I screen
661 versions, as now the '$'-character has to be protected with '\e' if no
662 variable substitution shall be performed. A string in single-quotes is also
663 protected from variable substitution.
665 Two configuration files are shipped as examples with your screen distribution:
666 \*Qetc/screenrc\*U and \*Qetc/etcscreenrc\*U. They contain a number of
667 useful examples for various commands.
669 Customization can also be done 'on-line'. To enter the command mode type
670 `C-a :'. Note that commands starting with \*Qdef\*U change default values,
671 while others change current settings.
673 The following commands are available:
674 .sp 
675 .ne 3
676 .BI acladd " usernames"
677 .RI [ crypted-pw ]
679 .BI addacl " usernames"
681 Enable users to fully access this screen session. \fIUsernames\fP can be one
682 user or a comma separated list of users. This command enables to attach to the
683 .I screen
684 session and performs the equivalent of `aclchg \fIusernames\fP +rwx \&"#?\&"'.
685 executed. To add a user with restricted access, use the `aclchg' command below.
686 If an optional second parameter is supplied, it should be a crypted password
687 for the named user(s). `Addacl' is a synonym to `acladd'.
688 Multi user mode only.
689 .sp 
690 .ne 3
691 .BI aclchg " usernames permbits list"
693 .BI chacl " usernames permbits list"
695 Change permissions for a comma separated list of users. Permission bits are
696 represented as `r', `w' and `x'. Prefixing `+' grants the permission, `-' 
697 removes it. The third parameter is a comma separated list of commands and/or
698 windows (specified either by number or title). The special list `#' refers to 
699 all windows, `?' to all commands. if \fIusernames\fP consists of a single `*',
700 all known users are affected.
701 A command can be executed when the user has the `x' bit for it.
702 The user can type input to a window when he has its `w' bit set and no other
703 user obtains a writelock for this window. 
704 Other bits are currently ignored.  
705 To withdraw the writelock from another user in window 2:
706 `aclchg \fIusername\fP -w+w 2'.
707 To allow read-only access to the session: `aclchg \fIusername\fP
708 -w \&"#\&"'. As soon as a user's name is known to 
709 .I screen 
710 he can attach to the session and (per default) has full permissions for all 
711 command and windows. Execution permission for the acl commands, `at' and others
712 should also be removed or the user may be able to regain write permission.
713 Rights of the special username
714 .B nobody
715 cannot be changed (see the \*Qsu\*U command).
716 `Chacl' is a synonym to `aclchg'.
717 Multi user mode only.
719 .ne 3
720 .BI acldel " username"
722 Remove a user from
723 .IR screen 's
724 access control list. If currently attached, all the
725 user's displays are detached from the session. He cannot attach again.
726 Multi user mode only.
728 .ne 3
729 .BI aclgrp " username"
730 .RI [ groupname ]
732 Creates groups of users that share common access rights. The name of the 
733 group is the username of the group leader. Each member of the group inherits
734 the permissions that are granted to the group leader. That means, if a user
735 fails an access check, another check is made for the group leader.
736 A user is removed from all groups the special value \*Qnone\*U is used for
737 .IR groupname .
738 If the second parameter is omitted all groups the user is in are listed.
740 .ne 3
741 .B aclumask
742 .RI [[ users ] +bits 
743 .RI |[ users ] -bits " .... ]"
745 .B umask
746 .RI [[ users ] +bits 
747 .RI |[ users ] -bits " .... ]"
749 This specifies the access other users have to windows that will be created by
750 the caller of the command.
751 .I Users
752 may be no, one or a comma separated list of known usernames. If no users are
753 specified, a list of all currently known users is assumed. 
754 .I Bits
755 is any combination of access control bits allowed defined with the 
756 \*Qaclchg\*U command. The special username \*Q?\*U predefines the access
757 that not yet known users will be granted to any window initially.
758 The special username \*Q??\*U predefines the access that not yet known 
759 users are granted to any command. 
760 Rights of the special username
761 .B nobody
762 cannot be changed (see the \*Qsu\*U command).
763 `Umask' is a synonym to `aclumask'.
765 .ne 3
766 .BI activity " message"
768 When any activity occurs in a background window that is being monitored,
769 .I screen
770 displays a notification in the message line.
771 The notification message can be re-defined by means of the \*Qactivity\*U
772 command.
773 Each occurrence of `%' in \fImessage\fP is replaced by
774 the number of the window in which activity has occurred,
775 and each occurrence of `^G' is replaced by the definition for bell
776 in your termcap (usually an audible bell).
777 The default message is
779         'Activity in window %n'
781 Note that monitoring is off for all windows by default, but can be altered
782 by use of the \*Qmonitor\*U command (C-a M).
784 .ne 3
785 .BR "allpartial on" | off
787 If set to on, only the current cursor line is refreshed on window change.
788 This affects all windows and is useful for slow terminal lines. The 
789 previous setting of full/partial refresh for each window is restored
790 with \*Qallpartial off\*U.  This is a global flag that immediately takes effect
791 on all windows overriding the \*Qpartial\*U settings. It does not change the
792 default redraw behavior of newly created windows.
794 .ne 3
795 .BR "altscreen on" | off
797 If set to on, "alternate screen" support is enabled in virtual terminals,
798 just like in xterm.  Initial setting is `off'.
800 .ne 3
801 .BR "at " "[\fIidentifier\fP][" "#\fP|\fP*\fP|\fP%\fP] "
802 .IR "command " [ args " ... ]"
804 Execute a command at other displays or windows as if it had been entered there.
805 \*QAt\*U changes the context (the `current window' or `current display'
806 setting) of the command. If the first parameter describes a 
807 non-unique context, the command will be executed multiple times. If the first 
808 parameter is of the form `\fIidentifier\fP*' then identifier is matched against
809 user names.  The command is executed once for each display of the selected 
810 user(s). If the first parameter is of the form `\fIidentifier\fP%' identifier 
811 is matched against displays. Displays are named after the ttys they 
812 attach. The prefix `/dev/' or `/dev/tty' may be omitted from the identifier.
813 If \fIidentifier\fP has a `#' or nothing appended it is matched against 
814 window numbers and titles. Omitting an identifier in front of the `#', `*' or 
815 `%'-character selects all users, displays or windows because a prefix-match is
816 performed. Note that on the affected display(s) a short message will describe
817 what happened. Permission is checked for initiator of the \*Qat\*U command,
818 not for the owners of the affected display(s).
819 Note that the '#' character works as a comment introducer when it is preceded by
820 whitespace. This can be escaped by prefixing a '\e'. 
821 Permission is checked for the initiator of the \*Qat\*U command, not for the
822 owners of the affected display(s).
824 Caveat: 
825 When matching against windows, the command is executed at least 
826 once per window. Commands that change the internal arrangement of windows
827 (like \*Qother\*U) may be called again. In shared windows the command will
828 be repeated for each attached display. Beware, when issuing toggle commands
829 like \*Qlogin\*U!
830 Some commands (e.g. \*Qprocess\*U) require that 
831 a display is associated with the target windows.  These commands may not work
832 correctly under \*Qat\*U looping over windows.
834 .ne 3
835 .BI "attrcolor " attrib
836 .RI [ "attribute/color-modifier" ]
838 This command can be used to highlight attributes by changing the color of
839 the text. If the attribute
840 .I attrib
841 is in use, the specified attribute/color modifier is also applied. If no
842 modifier is given, the current one is deleted. See the \*QSTRING ESCAPES\*U
843 chapter for the syntax of the modifier. Screen understands two
844 pseudo-attributes, \*Qi\*U stands for high-intensity foreground
845 color and \*QI\*U for high-intensity background color.
847 Examples:
849 attrcolor b "R"
851 Change the color to bright red if bold text is to be printed.
853 attrcolor u "-u b"
855 Use blue text instead of underline.
857 attrcolor b ".I"
859 Use bright colors for bold text. Most terminal emulators do this
860 already.
862 attrcolor i "+b"
864 Make bright colored text also bold.
866 .ne 3
867 .BR "autodetach on" | off
869 Sets whether 
870 .I screen
871 will automatically detach upon hangup, which
872 saves all your running programs until they are resumed with a
873 .B "screen -r"
874 command.
875 When turned off, a hangup signal will terminate 
876 .I screen
877 and all the processes it contains. Autodetach is on by default.
879 .ne 3
880 .BR "autonuke on" | off
882 Sets whether a clear screen sequence should nuke all the output
883 that has not been written to the terminal. See also
884 \*Qobuflimit\*U.
886 .ne 3
887 .BI "backtick " id
888 .I lifespan
889 .I autorefresh
890 .I cmd
891 .I args...
893 .BI "backtick " id
895 Program the backtick command with the numerical id \fIid\fP.
896 The output of such a command is used for substitution of the
897 \*Q%`\*U string escape. The specified \fIlifespan\fP is the number
898 of seconds the output is considered valid. After this time, the
899 command is run again if a corresponding string escape is encountered.
900 The \fIautorefresh\fP parameter triggers an
901 automatic refresh for caption and hardstatus strings after the
902 specified number of seconds. Only the last line of output is used
903 for substitution.
905 If both the \fIlifespan\fP and the \fIautorefresh\fP parameters
906 are zero, the backtick program is expected to stay in the
907 background and generate output once in a while.
908 In this case, the command is executed right away and screen stores
909 the last line of output. If a new line gets printed screen will
910 automatically refresh the hardstatus or the captions.
912 The second form of the command deletes the backtick command
913 with the numerical id \fIid\fP.
915 .ne 3
916 .BR "bce " [ on | off ]
918 Change background-color-erase setting. If \*Qbce\*U is set to on, all
919 characters cleared by an erase/insert/scroll/clear operation
920 will be displayed in the current background color. Otherwise
921 the default background color is used.
923 .ne 3
924 .B bell_msg
925 .RI [ message ]
927 When a bell character is sent to a background window,
928 .I screen
929 displays a notification in the message line.
930 The notification message can be re-defined by this command.
931 Each occurrence of `%' in \fImessage\fP is replaced by
932 the number of the window to which a bell has been sent,
933 and each occurrence of `^G' is replaced by the definition for bell
934 in your termcap (usually an audible bell).
935 The default message is
937         'Bell in window %n'
939 An empty message can be supplied to the \*Qbell_msg\*U command to suppress
940 output of a message line (bell_msg "").
941 Without parameter, the current message is shown.
943 .ne 3
944 .BI "bind "
945 .RB [ -c
946 .IR class ]
947 .I key 
948 .RI [ command " [" args ]]
950 Bind a command to a key.
951 By default, most of the commands provided by
952 .I screen
953 are bound to one or more keys as indicated in the \*QDEFAULT KEY BINDINGS\*U
954 section, e.\|g. the
955 command to create a new window is bound to \*QC-c\*U and \*Qc\*U.
956 The \*Qbind\*U command can be used to redefine the key bindings and to
957 define new bindings.
958 The \fIkey\fP argument is either a single character, a two-character sequence
959 of the form \*Q^x\*U (meaning \*QC-x\*U), a backslash followed by an octal
960 number (specifying the ASCII code of the character), or a backslash followed
961 by a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
962 The argument can also be quoted, if you like.
963 If no further argument is given, any previously established binding
964 for this key is removed.
965 The \fIcommand\fP argument can be any command listed in this section.
967 If a command class is specified via the \*Q-c\*U option, the key
968 is bound for the specified class. Use the \*Qcommand\*U command
969 to activate a class. Command classes can be used to create multiple
970 command keys or multi-character bindings.
972 Some examples:
975         bind ' ' windows
976         bind ^k
977         bind k
978         bind K kill
979         bind ^f screen telnet foobar
980         bind \e033 screen -ln -t root -h 1000 9 su
983 would bind the space key to the command that displays a list
984 of windows (so that the command usually invoked by \*QC-a C-w\*U
985 would also be available as \*QC-a space\*U). The next three lines
986 remove the default kill binding from \*QC-a C-k\*U and \*QC-a k\*U. 
987 \*QC-a K\*U is then bound to the kill command. Then it
988 binds \*QC-f\*U to the command \*Qcreate a window with a TELNET
989 connection to foobar\*U, and bind \*Qescape\*U to the command
990 that creates an non-login window with a.\|k.\|a. \*Qroot\*U in slot #9, with
991 a superuser shell and a scrollback buffer of 1000 lines.
994         bind -c demo1 0 select 10
995         bind -c demo1 1 select 11
996         bind -c demo1 2 select 12
997         bindkey "^B" command -c demo1
1000 makes \*QC-b 0\*U select window 10, \*QC-b 1\*U window 11, etc.
1003         bind -c demo2 0 select 10
1004         bind -c demo2 1 select 11
1005         bind -c demo2 2 select 12
1006         bind - command -c demo2
1009 makes \*QC-a - 0\*U select window 10, \*QC-a - 1\*U window 11, etc.
1011 .ne 3
1012 .B bindkey
1013 .RB [ -d ]
1014 .RB [ -m ]
1015 .RB [ -a ]
1016 .RB [[ -k | -t ]
1017 .I string
1018 .RI [ "cmd args" ]]
1020 This command manages screen's input translation tables. Every
1021 entry in one of the tables tells screen how to react if a certain
1022 sequence of characters is encountered. There are three tables:
1023 one that should contain actions programmed by the user, one for
1024 the default actions used for terminal emulation and one for
1025 screen's copy mode to do cursor movement. See section
1026 \*QINPUT TRANSLATION\*U for a list of default key bindings.
1028 If the
1029 .B -d
1030 option is given, bindkey modifies the default table,
1031 .B -m
1032 changes the copy mode table
1033 and with neither option the user table is selected.
1034 The argument
1035 .I string
1036 is the sequence of characters to which an action is bound. This
1037 can either be a fixed string or a termcap keyboard capability
1038 name (selectable with the
1039 .B -k
1040 option).
1042 Some keys on a VT100 terminal can send a different
1043 string if application mode is turned on (e.g the cursor keys).
1044 Such keys have two entries in the translation table. You can
1045 select the application mode entry by specifying the
1046 .B -a
1047 option.
1050 .B -t
1051 option tells screen not to do inter-character timing. One cannot
1052 turn off the timing if a termcap capability is used.
1054 .I Cmd
1055 can be any of screen's commands with an arbitrary number of
1056 .IR args .
1058 .I cmd
1059 is omitted the key-binding is removed from the table.
1061 Here are some examples of keyboard bindings:
1064         bindkey -d
1066 Show all of the default key bindings. The application mode entries
1067 are marked with [A].
1070         bindkey -k k1 select 1
1072 Make the "F1" key switch to window one.
1075         bindkey -t foo stuff barfoo
1077 Make "foo" an abbreviation of the word "barfoo". Timeout is disabled
1078 so that users can type slowly.
1081         bindkey "\e024" mapdefault
1083 This key-binding makes \*Q^T\*U an escape character for key-bindings. If
1084 you did the above \*Qstuff barfoo\*U binding, you can enter the word
1085 \*Qfoo\*U by typing \*Q^Tfoo\*U. If you want to insert a \*Q^T\*U
1086 you have to press the key twice (i.e., escape the escape binding).
1089         bindkey -k F1 command
1091 Make the F11 (not F1!) key an alternative screen
1092 escape (besides ^A).
1094 .ne 3
1095 .B break
1096 .RI [ duration ]
1098 Send a break signal for \fIduration\fP*0.25 seconds to this window.
1099 For non-Posix systems the time interval may be rounded up to full seconds.
1100 Most useful if a character device is attached to the window rather than 
1101 a shell process (See also chapter \*QWINDOW TYPES\*U). The maximum duration of
1102 a break signal is limited to 15 seconds.
1104 .ne 3
1105 .B blanker
1107 Activate the screen blanker. First the screen is cleared. If no blanker
1108 program is defined, the cursor is turned off, otherwise, the 
1109 program is started and it's output is written to the screen.
1110 The screen blanker is killed with the first keypress, the read key
1111 is discarded.
1113 This command is normally used together with the \*Qidle\*U command.
1115 .ne 3
1116 .B blankerprg
1117 .RI [ "program args" ]
1119 Defines a blanker program. Disables the blanker program if an
1120 empty argument is given. Shows the currently set blanker program if no
1121 arguments are given.
1123 .ne 3
1124 .B breaktype
1125 .RI [ tcsendbreak | TIOCSBRK
1126 .RI | TCSBRK ]
1128 Choose one of the available methods of generating a break signal for
1129 terminal devices. This command should affect the current window only.
1130 But it still behaves identical to \*Qdefbreaktype\*U. This will be changed in
1131 the future.
1132 Calling \*Qbreaktype\*U with no parameter displays the break method for the
1133 current window.
1135 .ne 3
1136 .B bufferfile
1137 .RI [ exchange-file ]
1139 Change the filename used for reading and writing with the paste buffer.
1140 If the optional argument to the \*Qbufferfile\*U command is omitted, 
1141 the default setting (\*Q/tmp/screen-exchange\*U) is reactivated.
1142 The following example will paste the system's password file into 
1144 .I screen
1145 window (using the paste buffer, where a copy remains):
1148         C-a : bufferfile /etc/passwd
1149         C-a < C-a ]
1150         C-a : bufferfile
1153 .ne 3
1154 .BR "c1 " [ on | off ]
1156 Change c1 code processing. \*QC1 on\*U tells screen to treat
1157 the input characters between 128 and 159 as control functions.
1158 Such an 8-bit code is normally the same as ESC followed by the
1159 corresponding 7-bit code. The default setting is to process c1
1160 codes and can be changed with the \*Qdefc1\*U command. 
1161 Users with fonts that have usable characters in the
1162 c1 positions may want to turn this off.
1164 .ne 3
1165 .BR "caption always" | splitonly
1166 .RI [ string ]
1168 .B "caption string"
1169 .RI [ string ]
1171 This command controls the display of the window captions. Normally
1172 a caption is only used if more than one window is shown on the
1173 display (split screen mode). But if the type is set to
1174 .B always
1175 screen shows a caption even if only one window is displayed. The default
1177 .BR splitonly .
1179 The second form changes the text used for the caption. You can use
1180 all escapes from the \*QSTRING ESCAPES\*U chapter. Screen uses
1181 a default of `%3n %t'.
1183 You can mix both forms by providing a string as an additional argument.
1185 .ne 3
1186 .BI "charset " set
1188 Change the current character set slot designation and charset
1189 mapping.  The first four character of
1190 .I set
1191 are treated as charset designators while the fifth and sixth
1192 character must be in range '0' to '3' and set the GL/GR charset
1193 mapping. On every position a '.' may be used to indicate that
1194 the corresponding charset/mapping should not be changed
1195 (\fIset\fP is padded to six characters internally by appending '.'
1196 chars). New windows have "BBBB02" as default charset, unless a
1197 \*Qencoding\*U command is active.
1199 The current setting can be viewed with the \*Qinfo\*U command.
1201 .ne 3
1202 .B chdir
1203 .RI [ directory ]
1205 Change the \fIcurrent directory\fP of
1206 .I screen
1207 to the specified directory or, if called without an argument,
1208 to your home directory (the value of the environment variable $HOME).
1209 All windows that are created by means of the \*Qscreen\*U command
1210 from within \*Q.screenrc\*U or by means of \*QC-a : screen ...\*U
1211 or \*QC-a c\*U use this as their default directory.
1212 Without a chdir command, this would be the directory from which
1213 .I screen
1214 was invoked.
1215 Hardcopy and log files are always written to the \fIwindow's\fP default
1216 directory, \fInot\fP the current directory of the process running in the
1217 window.
1218 You can use this command multiple times in your .screenrc to start various
1219 windows in different default directories, but the last chdir value will
1220 affect all the windows you create interactively.
1222 .ne 3
1223 .B clear
1225 Clears the current window and saves its image to the scrollback buffer.
1227 .ne 3
1228 .B colon
1229 .RI [ prefix ]
1231 Allows you to enter \*Q.screenrc\*U command lines. Useful 
1232 for on-the-fly modification of key bindings, 
1233 specific window creation and changing settings. Note that the \*Qset\*U
1234 keyword no longer exists! Usually commands affect the current window rather 
1235 than default settings for future windows. Change defaults with commands
1236 starting with 'def...'. 
1238 If you consider this as the `Ex command mode' of 
1239 .IR screen ,
1240 you may regard \*QC-a esc\*U (copy mode) as its `Vi command mode'.
1241 .sp 
1242 .ne 3
1243 .B command
1244 .RB [ -c
1245 .IR class ]
1247 This command has the same effect as typing the screen escape
1248 character (^A). It is probably only useful for key bindings.
1249 If the \*Q-c\*U option is given, select the specified command
1250 class.  See also \*Qbind\*U and \*Qbindkey\*U.
1251 .sp 
1252 .ne 3
1253 .BR "compacthist " [ on | off ]
1255 This tells screen whether to suppress trailing blank lines when
1256 scrolling up text into the history buffer.
1257 .sp 
1258 .ne 3
1259 .BR "console " [ on | off ]
1261 Grabs or un-grabs the machines console output to a window.
1262 .IR Note :
1263 Only the owner of /dev/console can grab the console output.
1264 This command is only available if the machine supports the ioctl TIOCCONS.
1266 .ne 3
1267 .B copy
1269 Enter copy/scrollback mode. This allows you to copy text from the current
1270 window and its history into the paste buffer. In this mode a vi-like
1271 `full screen editor' is active:
1273 .IR "Movement keys" :
1275 .in +4n
1276 .ti -2n
1277 \fBh\fP, \fBC-h\fP, or \fBleft arrow\fP move the cursor left.
1279 .ti -2n
1280 \fBj\fP, \fBC-n\fP, or \fBdown arrow\fP move the cursor down.
1282 .ti -2n
1283 \fBk\fP, \fBC-p\fP, or \fBup arrow\fP move the cursor up.
1285 .ti -2n
1286 \fBl\fP ('el') or \fBright arrow\fP move the cursor right.
1288 .ti -2n
1289 \fB0\fP (zero) or \fBC-a\fP move to the leftmost column.
1291 .ti -2n
1292 \fB+\fP and \fB\-\fP positions one line up and down.
1294 .ti -2n
1295 \fBH\fP, \fBM\fP and \fBL\fP move the cursor to the leftmost column
1296 of the top, center or bottom line of the window. 
1298 .ti -2n
1299 \fB|\fP moves to the specified absolute column.
1301 .ti -2n
1302 \fBg\fP or \fBhome\fP moves to the beginning of the buffer.
1304 .ti -2n
1305 \fBG\fP or \fBend\fP moves to the specified absolute line (default: end of buffer).
1306 .br 
1307 .ti -2n
1308 \fB%\fP jumps to the specified percentage of the buffer.
1310 .ti -2n
1311 \fB^\fP or \fB$\fP move to the leftmost column, to the first or last
1312 non-whitespace character on the line.
1314 .ti -2n
1315 \fBw\fP, \fBb\fP, and \fBe\fP move the cursor word by word.
1316 .br 
1317 .ti -2n
1318 \fBB\fP, \fBE\fP move the cursor WORD by WORD (as in vi).
1319 .br 
1320 .ti -2n
1321 .\"\fBf\fP,\fBt\fP, \fBF\fP, \fBT\fP move the cursor forward/backward to the next occurence of the target.
1322 \fBf/F\fP, \fBt/T\fP move the cursor forward/backward to the next occurence of the target. (eg, '3fy' will 
1323 move the cursor to the 3rd 'y' to the right.)
1325 .ti -2n
1326 \fB;\fP and \fB,\fP Repeat the last f/F/t/T command in the same/opposite direction.
1328 .ti -2n
1329 \fBC-e\fP and \fBC-y\fP scroll the display up/down by one line
1330 while preserving the cursor position.
1332 .ti -2n
1333 \fBC-u\fP and \fBC-d\fP scroll the display up/down by the specified amount of 
1334 lines while preserving the cursor position. (Default: half screen-full). 
1336 .ti -2n
1337 \fBC-b\fP and \fBC-f\fP scroll the display up/down a full screen.
1339 .ti -4n
1341 .IR Note :
1343 Emacs style movement keys can be customized by a .screenrc command.
1344 (E.\|g. markkeys "h=^B:l=^F:$=^E") There is no simple method for a full 
1345 emacs-style keymap, as this involves multi-character codes.
1348 .ti -4n
1349 .IR Marking :
1351 The copy range is specified by setting two marks. The text between these marks 
1352 will be highlighted. Press:
1354 .ti -2n
1355 \fBspace\fP or \fBenter\fP to set the first or second mark
1356 respectively. If \fBmousetrack\fP is set to `on', marks can also be set using
1357 \fPleft mouse click\fP.
1359 .ti -2n
1360 \fBY\fP and \fBy\fP used to mark one whole line or to mark from 
1361 start of line.
1363 .ti -2n
1364 \fBW\fP marks exactly one word. 
1365 .br 
1366 .ti -4n
1367 .IR "Repeat count" :
1369 Any of these commands can be prefixed with a repeat count number by pressing 
1370 digits 
1372 .ti -2n
1373 \fB0\fP..\fB9\fP which
1374 is taken as a repeat count. 
1376 Example: \*QC-a C-[ H 10 j 5 Y\*U will copy lines
1377 11 to 15 into the paste buffer.
1379 .ti -4n
1380 .IR Searching :
1381 .ti -2n
1382 \fB/\fP \fIVi\fP-like search forward.
1383 .ti -2n
1384 \fB?\fP \fIVi\fP-like search backward.
1385 .ti -2n 
1386 \fBC-a s\fP \fIEmacs\fP style incremental search forward.
1387 .ti -2n
1388 \fBC-r\fP \fIEmacs\fP style reverse i-search.
1389 .ti -2n
1390 \fBn\fP Find next search pattern.
1391 .ti -2n
1392 \fBN\fP Find previous search pattern.
1393 .ti -4n
1394 .IR Specials :
1396 There are however some keys that act differently than in
1397 .IR vi .
1398 .I Vi
1399 does not allow one to yank rectangular blocks of text, but
1400 .I screen
1401 does. Press: 
1403 .ti -2n
1404 \fBc\fP or \fBC\fP to set the left or right margin respectively. If no repeat count is
1405 given, both default to the current cursor position. 
1407 Example: Try this on a rather full text screen: 
1408 \*QC-a [ M 20 l SPACE c 10 l 5 j C SPACE\*U.
1410 This moves one to the middle line of the screen, moves in 20 columns left,
1411 marks the beginning of the paste buffer, sets the left column, moves 5 columns
1412 down, sets the right column, and then marks the end of
1413 the paste buffer. Now try:
1415 \*QC-a [ M 20 l SPACE 10 l 5 j SPACE\*U
1417 and notice the difference in the amount of text copied.
1419 .ti -2n
1420 \fBJ\fP joins lines. It toggles between 4 modes: lines separated by a
1421 newline character (012), lines glued seamless, lines separated by a single
1422 whitespace and comma separated lines. Note that you can prepend the newline
1423 character with a carriage return character, by issuing a \*Qcrlf on\*U.
1425 .ti -2n
1426 \fBv\fP or \fBV\fP is for all the
1427 .I vi 
1428 users with \*Q:set numbers\*U \- it toggles the left margin between column 9
1429 and 1. Press 
1431 .ti -2n
1432 \fBa\fP before the final space key to toggle in append mode. Thus
1433 the contents of the paste buffer will not be overwritten, but is appended to.
1435 .ti -2n
1436 \fBA\fP toggles in append mode and sets a (second) mark.
1438 .ti -2n
1439 \fB>\fP sets the (second) mark and writes the contents of the paste buffer to
1440 the screen-exchange file (/tmp/screen-exchange per default) once copy-mode is 
1441 finished. 
1443 This example demonstrates how to dump the whole scrollback buffer 
1444 to that file: \*QC-A [ g SPACE G $ >\*U.
1446 .ti -2n
1447 \fBC-g\fP gives information about the current line and column.
1449 .ti -2n
1450 \fBx\fP or \fBo\fP exchanges the first mark and the current cursor position. You
1451 can use this to adjust an already placed mark.
1453 .ti -2n
1454 \fBC-l\fP ('el') will redraw the screen.
1455 .br 
1456 .ti -2n
1457 \fB@\fP does nothing. Does not even exit copy mode.
1459 .ti -2n
1460 All keys not described here exit copy mode.
1461 .in -4n
1463 .ne 3
1464 .B copy_reg
1465 .RI [ key ]
1467 No longer exists, use \*Qreadreg\*U instead.
1469 .ne 3
1470 .BR "crlf " [ on | off ]
1472 This affects the copying of text regions with the `C-a [' command. If it is set
1473 to `on', lines will be separated by the two character sequence `CR' - `LF'. 
1474 Otherwise (default) only `LF' is used.
1475 When no parameter is given, the state is toggled.
1477 .ne 3
1478 .BR "debug on" | off
1480 Turns runtime debugging on or off. If 
1481 .I screen
1482 has been compiled with option -DDEBUG debugging available and is turned on per 
1483 default. Note that this command only affects debugging output from the main 
1484 \*QSCREEN\*U process correctly. Debug output from attacher processes can only
1485 be turned off once and forever.
1487 .ne 3
1488 .BR "defc1 on" | off
1490 Same as the \fBc1\fP command except that the default setting for new
1491 windows is changed. Initial setting is `on'.
1493 .ne 3
1494 .BR "defautonuke on" | off
1496 Same as the \fBautonuke\fP command except that the default setting for new displays is changed. Initial setting is `off'.
1497 Note that you can use the special `AN' terminal capability if you
1498 want to have a dependency on the terminal type.
1500 .ne 3
1501 .BR "defbce on" | off
1503 Same as the \fBbce\fP command except that the default setting for new
1504 windows is changed. Initial setting is `off'.
1506 .ne 3
1507 .B defbreaktype
1508 .RI [ tcsendbreak | TIOCSBRK
1509 .RI | TCSBRK ]
1511 Choose one of the available methods of generating a break signal for
1512 terminal devices. The preferred methods are 
1513 .IR tcsendbreak " and " TIOCSBRK .
1514 The third, 
1515 .IR TCSBRK , 
1516 blocks the complete 
1517 .I screen
1518 session for the duration
1519 of the break, but it may be the only way to generate long breaks. 
1520 .IR Tcsendbreak " and " TIOCSBRK
1521 may or may not produce long breaks with spikes (e.g. 4 per
1522 second). This is not only system-dependent, this also differs between
1523 serial board drivers.
1524 Calling \*Qdefbreaktype\*U with no parameter displays the current setting.
1526 .ne 3
1527 .BR "defcharset " [ \fIset ]
1529 Like the \fBcharset\fP command except that the default setting for
1530 new windows is changed. Shows current default if called without
1531 argument.
1533 .ne 3
1534 .BI "defescape " xy
1536 Set the default command characters. This is equivalent to the 
1537 \*Qescape\*U except that it is useful multiuser sessions only. In a
1538 multiuser session \*Qescape\*U changes the command character of the
1539 calling user, where \*Qdefescape\*U changes the default command
1540 characters for users that will be added later.
1542 .ne 3
1543 .BR "defflow on" | off | auto 
1544 .RB [ interrupt ]
1546 Same as the \fBflow\fP command except that the default setting for new windows 
1547 is changed. Initial setting is `auto'.
1548 Specifying \*Qdefflow auto interrupt\*U is the same as the command-line options
1549 .B \-fa
1551 .BR \-i . 
1553 .ne 3
1554 .BR "defgr on" | off
1556 Same as the \fBgr\fP command except that the default setting for new
1557 windows is changed. Initial setting is `off'.
1559 .ne 3
1560 .BR "defhstatus " [ \fIstatus ]
1562 The hardstatus line that all new windows will get is set to
1563 .I status\fR.
1564 This command is useful to make the hardstatus of every window
1565 display the window number or title or the like.
1566 .I Status
1567 may contain the same directives as in the window messages, but
1568 the directive escape character is '^E' (octal 005) instead of '%'.
1569 This was done to make a misinterpretation of program generated
1570 hardstatus lines impossible.
1571 If the parameter
1572 .I status
1573 is omitted, the current default string is displayed.
1574 Per default the hardstatus line of new windows is empty.
1576 .ne 3
1577 .BI "defencoding " enc
1579 Same as the \fBencoding\fP command except that the default setting for new
1580 windows is changed. Initial setting is the encoding taken from the
1581 terminal.
1583 .ne 3
1584 .BR "deflog on" | off
1586 Same as the \fBlog\fP command except that the default setting for new windows 
1587 is changed. Initial setting is `off'.
1589 .ne 3
1590 .BR "deflogin on" | off
1592 Same as the \fBlogin\fP command except that the default setting for new windows 
1593 is changed. This is initialized with `on' as distributed (see config.h.in).
1595 .ne 3
1596 .BI "defmode " mode
1598 The mode of each newly allocated pseudo-tty is set to \fImode\fP.
1599 \fIMode\fP is an octal number.
1600 When no \*Qdefmode\*U command is given, mode 0622 is used.
1602 .ne 3
1603 .BR "defmonitor on" | off
1605 Same as the \fBmonitor\fP command except that the default setting for new 
1606 windows is changed. Initial setting is `off'.
1608 .ne 3
1609 .BR "defmousetrack on" | off
1611 Same as the \fBmousetrack\fP command except that the default setting for new
1612 windows is changed. Initial setting is `off'.
1614 .ne 3
1615 .B defnonblock 
1616 .BR on | off | \fInumsecs
1618 Same as the \fBnonblock\fP command except that the default setting for
1619 displays is changed. Initial setting is `off'.
1621 .ne 3
1622 .BI "defobuflimit " limit
1624 Same as the \fBobuflimit\fP command except that the default setting for new displays is changed. Initial setting is 256 bytes.
1625 Note that you can use the special 'OL' terminal capability if you
1626 want to have a dependency on the terminal type.
1628 .ne 3
1629 .BI "defscrollback " num
1631 Same as the \fBscrollback\fP command except that the default setting for new 
1632 windows is changed. Initial setting is 100.
1634 .ne 3
1635 .BI "defshell " command
1637 Synonym to the \fBshell\fP command. See there.
1639 .ne 3
1640 .BR "defsilence on" | off
1642 Same as the \fBsilence\fP command except that the default setting for new
1643 windows is changed. Initial setting is `off'.
1645 .ne 3
1646 .BI "defslowpaste " msec"
1648 Same as the \fBslowpaste\fP command except that the default setting for new
1649 windows is changed. Initial setting is 0 milliseconds, meaning `off'.
1651 .ne 3
1652 .BR "defutf8 on" | off
1654 Same as the \fButf8\fP command except that the default setting for new
1655 windows is changed. Initial setting is `on' if screen was started with
1656 \*Q-U\*U, otherwise `off'.
1658 .ne 3
1659 .BR "defwrap on" | off
1661 Same as the \fBwrap\fP command except that the default setting for new 
1662 windows is changed. Initially line-wrap is on and can be toggled with the 
1663 \*Qwrap\*U command (\*QC-a r\*U) or by means of "C-a : wrap on|off".
1665 .ne 3
1666 .BR "defwritelock on" | off | auto
1668 Same as the \fBwritelock\fP command except that the default setting for new 
1669 windows is changed. Initially writelocks will off.
1671 .ne 3
1672 .BR "defzombie " [\fIkeys\fP]
1674 Synonym to the \fBzombie\fP command. Both currently change the default.
1675 See there.
1677 .ne 3
1678 .B detach
1679 .RB [ -h ]
1681 Detach the 
1682 .I screen
1683 session (disconnect it from the terminal and put it into the background).
1684 This returns you to the shell where you invoked
1685 .IR screen .
1686 A detached
1687 .I screen
1688 can be resumed by invoking
1689 .I screen
1690 with the
1691 .B \-r
1692 option (see also section \*QCOMMAND-LINE OPTIONS\*U). The
1693 .B \-h
1694 option tells screen to immediately close the connection to the
1695 terminal (\*Qhangup\*U).
1697 .ne 3
1698 .B dinfo
1700 Show what screen thinks about your terminal. Useful if you want to know
1701 why features like color or the alternate charset don't work.
1703 .ne 3
1704 .B displays
1706 Shows a tabular listing of all currently connected user front-ends (displays).
1707 This is most useful for multiuser sessions.
1708 The following keys can be used in displays list:
1710 .in +4n
1711 .ti -2n
1712 \fBk\fP, \fBC-p\fP, or \fBup\fP Move up one line.
1714 .ti -2n
1715 \fBj\fP, \fBC-n\fP, or \fBdown\fP Move down one line.
1717 .ti -2n
1718 \fBC-a\fP or \fBhome\fP Move to the first line.
1720 .ti -2n
1721 \fBC-e\fP or \fBend\fP Move to the last line.
1723 .ti -2n
1724 \fBC-u\fP or \fBC-d\fP Move one half page up or down.
1726 .ti -2n
1727 \fBC-b\fP or \fBC-f\fP Move one full page up or down.
1729 .ti -2n
1730 \fBmouseclick\fP Move to the selected line. Available
1731 when \*Qmousetrack\*U is set to on.
1733 .ti -2n
1734 \fBspace\fP Refresh the list
1736 .ti -2n
1737 \fBd\fP Detach that display
1739 .ti -2n
1740 \fBD\fP Power detach that display
1742 .ti -2n
1743 \fBC-g\fP, \fBenter\fP, or \fBescape\fP Exit the list
1745 .ti -4n
1747 The following is an example of what \*Qdisplays\*U could look like:
1749 xterm 80x42 jnweiger@/dev/ttyp4     0(m11)   &rWx
1751 facit 80x24 mlschroe@/dev/ttyhf nb 11(tcsh)   rwx
1753 xterm 80x42 jnhollma@/dev/ttyp5     0(m11)   &R.x
1755  (A)   (B)     (C)     (D)     (E) (F)(G)   (H)(I)
1757 The legend is as follows:
1759 (A) The terminal type known by screen for this display.
1761 (B) Displays geometry as width x height.
1763 (C) Username who is logged in at the display.
1765 (D) Device name of the display or the attached device
1767 (E) Display is in blocking or nonblocking mode. The available modes are "nb", "NB",
1768 "Z<", "Z>", and "BL".
1770 (F) Number of the window
1772 (G) Name/title of window
1774 (H) Whether the window is shared
1776 (I) Window permissions. Made up of three characters:
1777       (1st character)
1778          â€˜-’ : no read
1779          â€˜r’ : read
1780          â€˜R’ : read only due to foreign wlock
1781       (2nd character)
1782          â€˜-’ : no write
1783          â€˜.’ : write suppressed by foreign wlock
1784          â€˜w’ : write
1785          â€˜W’ : own wlock
1786       (3rd character)
1787          â€˜-’ : no execute
1788          â€˜x’ : execute
1790 \*QDisplays\*U needs a region size of at least 10 characters wide and 5 characters high in
1791 order to display.
1793 .ne 3
1794 .BR "digraph " [ \fIpreset [ \fI unicode-value ] ]
1796 This command prompts the user for a digraph sequence. The next
1797 two characters typed are looked up in a builtin table and the
1798 resulting character is inserted in the input stream. For example,
1799 if the user enters 'a"', an a-umlaut will be inserted. If the
1800 first character entered is a 0 (zero),
1801 .I screen
1802 will treat the following characters (up to three) as an octal
1803 number instead.  The optional argument
1804 .I preset
1805 is treated as user input, thus one can create an \*Qumlaut\*U key.
1806 For example the command "bindkey ^K digraph '"'" enables the user
1807 to generate an a-umlaut by typing CTRL-K a.
1808 When a non-zero
1809 .I unicode-value
1810 is specified, a new digraph is created with the specified preset. The digraph is unset
1811 if a zero value is provided for the
1812 .I unicode-value.
1814 .ne 3
1815 .B dumptermcap
1817 Write the termcap entry for the virtual terminal optimized for the currently
1818 active window to the file \*Q.termcap\*U in the user's 
1819 \*Q$HOME/.screen\*U directory (or wherever 
1820 .I screen
1821 stores its sockets. See the \*QFILES\*U section below).
1822 This termcap entry is identical to the value of the environment variable
1823 $TERMCAP that is set up by
1824 .I screen
1825 for each window. For terminfo based systems you will need to run a converter
1826 like 
1827 .IR captoinfo
1828 and then compile the entry with 
1829 .IR tic .
1831 .ne 3
1832 .BR "echo " [ -n ]
1833 .I message
1835 The echo command may be used to annoy 
1836 .I screen
1837 users with a 'message of the
1838 day'. Typically installed in a global /local/etc/screenrc. 
1839 The option \*Q-n\*U may be used to suppress the line feed.
1840 See also \*Qsleep\*U.
1841 Echo is also useful for online checking of environment variables.
1843 .ne 3
1844 .BI "encoding " enc
1845 .RI [ enc ]
1847 Tell 
1848 .I screen 
1849 how to interpret the input/output. The first argument
1850 sets the encoding of the current window. Each window can emulate
1851 a different encoding. The optional second parameter overwrites
1852 the encoding of the connected terminal. It should never be
1853 needed as screen uses the locale setting to detect the encoding.
1854 There is also a way to select a terminal encoding depending on
1855 the terminal type by using the \*QKJ\*U termcap entry.
1857 Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, GBK, KOI8-R,
1858 CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6,
1859 ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis.
1861 See also \*Qdefencoding\*U, which changes the default setting of a new
1862 window.
1864 .ne 3
1865 .BI "escape " xy
1867 Set the command character to \fIx\fP and the character generating a literal
1868 command character (by triggering the \*Qmeta\*U command) to \fIy\fP (similar
1869 to the \-e option).
1870 Each argument is either a single character, a two-character sequence
1871 of the form \*Q^x\*U (meaning \*QC-x\*U), a backslash followed by an octal
1872 number (specifying the ASCII code of the character), or a backslash followed
1873 by a second character, such as \*Q\e^\*U or \*Q\e\e\*U.
1874 The default is \*Q^Aa\*U.
1876 .ne 3
1877 .B eval
1878 .I command1
1879 .RI [ command2
1880 .IR ... ]
1882 Parses and executes each argument as separate command.
1884 .ne 3
1885 .B exec
1886 .RI [[ fdpat ]
1887 .IR "newcommand " [ "args ..." ]]
1889 Run a unix subprocess (specified by an executable path \fInewcommand\fP and its 
1890 optional arguments) in the current window. The flow of data between 
1891 newcommands stdin/stdout/stderr, the process originally started in the window 
1892 (let us call it "application-process") and screen itself (window) is 
1893 controlled by the file descriptor pattern fdpat.
1894 This pattern is basically a three character sequence representing stdin, stdout
1895 and stderr of newcommand. A dot (.) connects the file descriptor
1897 .IR screen .
1898 An exclamation mark (!) causes the file
1899 descriptor to be connected to the application-process. A colon (:) combines
1900 both.
1901 User input will go to newcommand unless newcommand receives the 
1902 application-process' 
1903 output (fdpats first character is `!' or `:') or a pipe symbol (|) is added 
1904 (as a fourth character) to the end of fdpat.
1906 Invoking `exec' without arguments shows name and arguments of the currently
1907 running subprocess in this window. Only one subprocess a time can be running
1908 in each window.
1910 When a subprocess is running the `kill' command will affect it instead of the
1911 windows process.
1913 Refer to the postscript file `doc/fdpat.ps' for a confusing illustration
1914 of all 21 possible combinations. Each drawing shows the digits 2,1,0
1915 representing the three file descriptors of newcommand. The box marked
1916 `W' is the usual pty that has the application-process on its slave side.
1917 The box marked `P' is the secondary pty that now has
1918 .I screen
1919 at its master side.
1921 Abbreviations: 
1923 Whitespace between the word `exec' and fdpat and the command 
1924 can be omitted. Trailing dots and a fdpat consisting only of dots can be 
1925 omitted. A simple `|' is synonymous for the pattern `!..|'; the word exec can
1926 be omitted here and can always be replaced by `!'.
1928 Examples:
1930 exec ... /bin/sh
1932 exec /bin/sh
1934 !/bin/sh
1936 Creates another shell in the same window, while the original shell is still 
1937 running. Output of both shells is displayed and user input is sent to the new
1938 /bin/sh.
1940 exec !.. stty 19200
1942 exec ! stty 19200
1944 !!stty 19200
1946 Set the speed of the window's tty. If your stty command operates on stdout, 
1947 then add another `!'.
1949 exec !..| less
1951 |less
1953 This adds a pager to the window output. The special character `|' is needed to
1954 give the user control over the pager although it gets its input from the 
1955 window's process. This works, because
1956 .I less
1957 listens on stderr (a behavior that
1958 .I screen
1959 would not expect without the `|') 
1960 when its stdin is not a tty. 
1961 .I Less 
1962 versions newer than 177 fail miserably here; good old
1963 .I pg
1964 still works.
1966 !:sed -n s/.*Error.*/\e007/p
1968 Sends window output to both, the user and the sed command. The sed inserts an
1969 additional bell character (oct. 007) to the window output seen by
1970 .IR screen .
1971 This will cause "Bell in window x" messages, whenever the string "Error"
1972 appears in the window.
1974 .ne 3
1975 .B fit
1977 Change the window size to the size of the current region. This
1978 command is needed because screen doesn't adapt the window size
1979 automatically if the window is displayed more than once.
1981 .ne 3
1982 .B flow
1983 .RB [ on | off | "auto\fR]\fP"
1985 Sets the flow-control mode for this window.
1986 Without parameters it cycles the current window's flow-control setting from 
1987 "automatic" to "on" to "off".
1988 See the discussion on \*QFLOW-CONTROL\*U later on in this document for full 
1989 details and note, that this is subject to change in future releases.
1990 Default is set by `defflow'.
1992 .ne 3
1993 .BR "focus " [ up | down | top | bottom ]
1995 Move the input focus to the next region. This is done in a cyclic
1996 way so that the top region is selected after the bottom one. If
1997 no subcommand is given it defaults to `down'. `up' cycles in the
1998 opposite order, `top' and `bottom' go to the top and bottom
1999 region respectively. Useful bindings are (j and k as in vi)
2001     bind j focus down
2002     bind k focus up
2003     bind t focus top
2004     bind b focus bottom
2006 Note that \fBk\fP is traditionally bound to the \fIkill\fP command.
2008 .ne 3
2009 .BI "focusminsize [ ( " width "|max|_ ) ( " height "|max|_ ) ]"
2011 This forces any currently selected region to be automatically
2012 resized at least a certain \fIwidth\fP and \fIheight\fP. All
2013 other surrounding regions will be resized in order to accommodate.
2014 This constraint follows everytime the \*Qfocus\*U command is
2015 used. The \*Qresize\*U command can be used to increase either
2016 dimension of a region, but never below what is set with
2017 \*Qfocusminsize\*U. The underscore `_' is a synonym for
2018 \fBmax\fP. Setting a \fIwidth\fP and \fIheight\fP of `0 0'
2019 (zero zero) will undo any constraints and allow for manual resizing.
2020 Without any parameters, the minimum width and height is shown.
2022 .ne 3
2023 .BR "gr " [ on | off ]
2025 Turn GR charset switching on/off. Whenever screen sees an input
2026 character with the 8th bit set, it will use the charset stored in the
2027 GR slot and print the character with the 8th bit stripped. The
2028 default (see also \*Qdefgr\*U) is not to process GR switching because
2029 otherwise the ISO88591 charset would not work.
2031 .ne 3
2032 .BI group
2033 .RI [ grouptitle ]
2035 Change or show the group the current window belongs to. Windows can
2036 be moved around between different groups by specifying the name of
2037 the destination group. Without specifying a group, the title of the
2038 current group is displayed.
2040 .ne 3
2041 .B hardcopy
2042 .RB [ -h ]
2043 .RI [ file ]
2045 Writes out the currently displayed image to the file \fIfile\fP,
2046 or, if no filename is specified, to \fIhardcopy.n\fP in the
2047 default directory, where \fIn\fP is the number of the current window. 
2048 This either appends or overwrites the file if it exists. See below.
2049 If the option \fB-h\fP is specified, dump also the contents of the
2050 scrollback buffer.
2052 .ne 3
2053 .BR "hardcopy_append on" | off
2055 If set to "on", 
2056 .I screen
2057 will append to the "hardcopy.n" files created by the command \*QC-a h\*U, 
2058 otherwise these files are overwritten each time.
2059 Default is `off'.
2061 .ne 3
2062 .BI "hardcopydir "directory
2064 Defines a directory where hardcopy files will be placed. If unset, hardcopys
2065 are dumped in
2066 .IR screen 's
2067 current working directory.
2069 .ne 3
2070 .BR "hardstatus " [ on | off ]
2072 .BR "hardstatus \fR[\fBalways\fR]\fBlastline" | message | ignore
2073 .RI [ string ]
2075 .B "hardstatus string"
2076 .RI [ string ]
2078 This command configures the use and emulation of the terminal's
2079 hardstatus line. The first form
2080 toggles whether
2081 .I screen
2082 will use the hardware status line to display messages. If the
2083 flag is set to `off', these messages
2084 are overlaid in reverse video mode at the display line. The default
2085 setting is `on'.
2087 The second form tells 
2088 .I screen 
2089 what to do if the terminal doesn't
2090 have a hardstatus line (i.e. the termcap/terminfo capabilities
2091 "hs", "ts", "fs" and "ds" are not set). If the type
2092 \*Qlastline\*U is used, 
2093 .I screen 
2094 will reserve the last line of the
2095 display for
2096 the hardstatus. \*Qmessage\*U uses 
2097 .I screen's
2098 message mechanism and
2099 \*Qignore\*U tells 
2100 .I screen 
2101 never to display the hardstatus.
2102 If you prepend the word \*Qalways\*U to the type (e.g., \*Qalwayslastline\*U), 
2103 .I screen 
2104 will use the type even if the terminal supports a hardstatus.
2106 The third form specifies the contents of the hardstatus line.  '%h' is
2107 used as default string, i.e., the stored hardstatus of the current
2108 window (settable via \*QESC]0;<string>^G\*U or \*QESC_<string>ESC\e\*U)
2109 is displayed.  You can customize this to any string you like including
2110 the escapes from the \*QSTRING ESCAPES\*U chapter. If you leave out
2111 the argument
2112 .IR string ,
2113 the current string is displayed.
2115 You can mix the second and third form by providing the string as
2116 additional argument.
2118 .ne 3
2119 .B height
2120 .RB [ -w | -d ]
2121 .RI [ lines " [" cols ]]
2123 Set the display height to a specified number of lines. When no argument
2124 is given it toggles between 24 and 42 lines display. You can also
2125 specify a width if you want to change both values.
2127 .B -w
2128 option tells screen to leave the display size unchanged and just set
2129 the window size,
2130 .B -d
2131 vice versa.
2133 .ne 3
2134 .B help
2135 .RB [ -c
2136 .IR class ]
2138 Not really a online help, but 
2139 displays a help 
2140 .I screen 
2141 showing you all the key bindings.
2142 The first pages list all the internal commands followed by their current
2143 bindings.
2144 Subsequent pages will display the custom commands, one command per key.
2145 Press space when you're done reading each page, or return to exit early.
2146 All other characters are ignored. If the \*Q-c\*U option is given,
2147 display all bound commands for the specified command class.
2148 See also \*QDEFAULT KEY BINDINGS\*U section.
2150 .ne 3
2151 .B history
2153 Usually users work with a shell that allows easy access to previous commands.
2154 For example csh has the command \*Q!!\*U to repeat the last command executed. 
2155 .I Screen
2156 allows you to have a primitive way of re-calling \*Qthe command that
2157 started ...\*U: You just type the first letter of that command, then hit
2158 `C-a {' and
2159 .I screen
2160 tries to find a previous line that matches with the `prompt character' 
2161 to the left of the cursor. This line is pasted into this window's input queue.
2162 Thus you have a crude command history (made up by the visible window and its
2163 scrollback buffer). 
2165 .ne 3
2166 .BI "hstatus " status
2168 Change the window's hardstatus line to the string \fIstatus\fP.
2170 .ne 3
2171 .B idle
2172 .RI [ timeout
2173 .RI [ "cmd args" ]]
2175 Sets a command that is run after the specified number of seconds
2176 inactivity is reached. This command will normally be the \*Qblanker\*U
2177 command to create a screen blanker, but it can be any screen command.
2178 If no command is specified, only the timeout is set. A timeout of
2179 zero (or the special timeout \fBoff\fP) disables the timer.
2180 If no arguments are given, the current settings are displayed.
2182 .ne 3
2183 .BR "ignorecase " [ on | off ]
2185 Tell screen to ignore the case of characters in searches. Default is
2186 `off'. Without any options, the state of ignorecase is toggled.
2188 .ne 3
2189 .B info
2191 Uses the message line to display some information about the current window:
2192 the cursor position in the form \*Q(column,row)\*U starting with \*Q(1,1)\*U,
2193 the terminal width and height plus the size of the scrollback buffer in lines, 
2194 like in \*Q(80,24)+50\*U, the current state of window XON/XOFF flow control
2195 is shown like this (See also section FLOW CONTROL):
2198   +flow     automatic flow control, currently on.
2199   -flow     automatic flow control, currently off.
2200   +(+)flow  flow control enabled. Agrees with automatic control.
2201   -(+)flow  flow control disabled. Disagrees with automatic control.
2202   +(-)flow  flow control enabled. Disagrees with automatic control.
2203   -(-)flow  flow control disabled. Agrees with automatic control.
2206 The current line wrap setting (`+wrap' indicates enabled, `\-wrap' not) is
2207 also shown. The flags `ins', `org', `app', `log', `mon' or `nored' are 
2208 displayed when the window is in insert mode, origin mode, 
2209 application-keypad mode, has output logging,
2210 activity monitoring or partial redraw enabled.
2212 The currently active character set (\fIG0\fP, \fIG1\fP, \fIG2\fP,
2213 or \fIG3\fP) and in square brackets the terminal character sets that are
2214 currently designated as \fIG0\fP through \fIG3\fP is shown. If the window
2215 is in UTF-8 mode, the string \*QUTF-8\*U is shown instead.
2217 Additional modes depending on the type of the window are displayed at the end of the status line (See also chapter \*QWINDOW TYPES\*U).
2219 If the state machine of the terminal emulator is in a non-default state,
2220 the info line is started with a string identifying the current state.
2222 For system information use the \*Qtime\*U command.
2224 .ne 3
2225 .BR ins_reg " [" \fIkey ]
2227 No longer exists, use \*Qpaste\*U instead.
2229 .ne 3
2230 .B kill
2232 Kill current window.
2233 .br 
2234 If there is an `exec' command running then it is killed. Otherwise the process
2235 (shell) running in the window receives a HANGUP condition, 
2236 the window structure is removed and 
2237 .I screen 
2238 (your display) switches to another
2239 window.  When the last window is destroyed, 
2240 .I screen
2241 exits.
2242 After a kill 
2243 .I screen 
2244 switches to the previously displayed window.
2246 Note:
2247 .I Emacs
2248 users should keep this command in mind, when killing a line.
2249 It is recommended not to use \*QC-a\*U as the
2250 .I screen
2251 escape key or to rebind kill to \*QC-a K\*U.
2253 .ne 3
2254 .B lastmsg
2256 Redisplay the last contents of the message/status line.
2257 Useful if you're typing when a message appears, because  the message goes 
2258 away when you press a key (unless your terminal has a hardware status line).
2259 Refer to the commands \*Qmsgwait\*U and \*Qmsgminwait\*U for fine tuning.
2261 .ne 3
2262 .BR "layout new " [\fItitle\fP]
2264 Create a new layout. The screen will change to one whole region
2265 and be switched to the blank window. From here, you build the
2266 regions and the windows they show as you desire. The new layout
2267 will be numbered with the smallest available integer, starting
2268 with zero. You can optionally give a title to your new layout.
2269 Otherwise, it will have a default title of \*Qlayout\*U. You
2270 can always change the title later by using the command
2271 \fBlayout title\fP.
2273 .ne 3
2274 .BR "layout remove " [\fIn|title\fP]
2276 Remove, or in other words, delete the specified layout. Either
2277 the number or the title can be specified. Without either
2278 specification, \fIscreen\fP will remove the current layout.
2280 Removing a layout does not affect your set windows or regions.
2282 .ne 3
2283 .B layout next
2285 Switch to the next layout available
2287 .ne 3
2288 .B layout prev
2290 Switch to the previous layout available
2292 .ne 3
2293 .BR "layout select " [\fIn|title\fP]
2295 Select the desired layout. Either the number or the title can
2296 be specified. Without either specification, \fIscreen\fP will
2297 prompt and ask which screen is desired. To see which layouts are
2298 available, use the \fBlayout show\fP command.
2300 .ne 3
2301 .B layout show
2303 List on the message line the number(s) and title(s) of the available
2304 layout(s). The current layout is flagged.
2306 .ne 3
2307 .BR "layout title " [\fItitle\fP]
2309 Change or display the title of the current layout. A string given
2310 will be used to name the layout. Without any options, the current
2311 title and number is displayed on the message line.
2313 .ne 3
2314 .BR "layout number " [\fIn\fP]
2316 Change or display the number of the current layout. An integer given
2317 will be used to number the layout. Without any options, the current
2318 number and title is displayed on the message line.
2320 .ne 3
2321 .BR "layout attach " [\fItitle\fP|\fB:last\fP]
2323 Change or display which layout to reattach back to. The default is
2324 \fB:last\fP, which tells \fIscreen\fP to reattach back to the last
2325 used layout just before detachment. By supplying a title, You can
2326 instruct \fIscreen\fP to reattach to a particular layout regardless
2327 which one was used at the time of detachment. Without any options,
2328 the layout to reattach to will be shown in the message line.
2330 .ne 3
2331 .BR "layout save " [\fIn|title\fP]
2333 Remember the current arrangement of regions. When used, \fIscreen\fP
2334 will remember the arrangement of vertically and horizontally split
2335 regions. This arrangement is restored when a \fIscreen\fP session
2336 is reattached or switched back from a different layout. If the
2337 session ends or the \fIscreen\fP process dies, the layout
2338 arrangements are lost. The \fBlayout dump\fP command should help
2339 in this siutation. If a number
2340 or title is supplied, \fIscreen\fP will remember the arrangement of
2341 that particular layout. Without any options, \fIscreen\fP will
2342 remember the current layout.
2344 Saving your regions can be done automatically by using the
2345 \fBlayout autosave\fP command.
2347 .ne 3
2348 .BR "layout autosave " [\fBon|off\fP]
2350 Change or display the status of automatcally saving layouts. The
2351 default is \fBon\fP, meaning when \fIscreen\fP is detached or
2352 changed to a different layout, the arrangement of regions and windows
2353 will be remembered at the time of change and restored upon return.
2354 If autosave is set to \fBoff\fP, that arrangement will only be
2355 restored to either to the last manual save, using \fBlayout save\fP,
2356 or to when the layout was first created, to a single region with
2357 a single window. Without either an \fBon\fP or \fBoff\fP, the
2358 current status is displayed on the message line.
2360 .ne 3
2361 .BR "layout dump " [\fIfilename\fP]
2363 Write to a file the order of splits made in the current layout. This 
2364 is useful to recreate the order of your regions used in your current
2365 layout. Only the current layout is recorded. While the order of the
2366 regions are recorded, the sizes of those regions and which windows
2367 correspond to which regions are not. If no filename is specified,
2368 the default is \fIlayout-dump\fP, saved in the directory that the
2369 \fIscreen\fP process was started in. If the file already exists,
2370 \fBlayout dump\fP will append to that file. As an example:
2373         C-a : layout dump /home/user/.screenrc
2376 will save or append the layout to the user's \fI.screenrc\fP file.
2378 .ne 3
2379 .B license
2381 Display the disclaimer page. This is done whenever
2382 .I screen
2383 is started without options, which should be often enough. See also 
2384 the \*Qstartup_message\*U command.
2386 .ne 3
2387 .B lockscreen
2389 Lock this display.
2390 Call a screenlock program (/local/bin/lck or /usr/bin/lock or a builtin if no
2391 other is available). Screen does not accept any command keys until this program
2392 terminates. Meanwhile processes in the windows may continue, as the windows 
2393 are in the `detached' state. The screenlock program may be changed through the
2394 environment variable $LOCKPRG (which must be set in the shell from which 
2395 .I screen
2396 is started) and is executed with the user's uid and gid.
2398 Warning: 
2399 When you leave other shells unlocked and you have no password set on           
2400 .IR screen ,
2401 the lock is void: One could easily re-attach from an unlocked
2402 shell. This feature should rather be called `lockterminal'.
2404 .ne 3
2405 .BR "log " [ on | off ]
2407 Start/stop writing output of the current window to a file 
2408 \*Qscreenlog.\fIn\fP\*U in the window's default directory, where \fIn\fP 
2409 is the number of the current window. This filename can be changed with
2410 the `logfile' command. If no parameter is given, the state
2411 of logging is toggled. The session log is appended to the previous contents 
2412 of the file if it already exists. The current contents and the contents 
2413 of the scrollback history are not included in the session log.
2414 Default is `off'.
2416 .ne 3
2417 .BI "logfile " filename
2419 .BI "logfile flush " secs
2421 Defines the name the log files will get. The default is
2422 \*Qscreenlog.%n\*U. The second form changes the number of seconds
2423 .I screen
2424 will wait before flushing the logfile buffer to the file-system. The
2425 default value is 10 seconds.
2427 .ne 3
2428 .BR "login " [ on | off ]
2430 Adds or removes the entry in the utmp database file for the current window.
2431 This controls if the window is `logged in'.
2432 When no parameter is given, the login state of the window is toggled.
2433 Additionally to that toggle, it is convenient having a `log in' and a `log out'
2434 key. E.\|g. `bind I login on' and `bind O login off' will map these
2435 keys to be C-a I and C-a O.
2436 The default setting (in config.h.in) should be \*Qon\*U for a 
2437 .I screen
2438 that runs under suid-root.
2439 Use the \*Qdeflogin\*U command to change the default login state for new 
2440 windows. Both commands are only present when 
2441 .I screen
2442 has been compiled with utmp support.
2444 .ne 3
2445 .BR "logtstamp " [ on | off ]
2447 .B "logtstamp after"
2448 .RI [ secs ]
2450 .B "logtstamp string"
2451 .RI [ string ]
2453 This command controls logfile time-stamp mechanism of 
2454 .I screen.
2456 time-stamps are turned \*Qon\*U, 
2457 .I screen 
2458 adds a string containing
2459 the current time to the logfile after two minutes of inactivity.
2460 When output continues and more than another two minutes have passed,
2461 a second time-stamp is added to document the restart of the
2462 output. You can change this timeout with the second form
2463 of the command. The third form is used for customizing the time-stamp
2464 string (`-- %n:%t -- time-stamp -- %M/%d/%y %c:%s --\\n' by
2465 default).
2467 .ne 3
2468 .B mapdefault
2470 Tell 
2471 .I screen 
2472 that the next input character should only be looked up
2473 in the default bindkey table. See also \*Qbindkey\*U.
2475 .ne 3
2476 .B mapnotnext
2478 Like mapdefault, but don't even look in the default bindkey table.
2480 .ne 3
2481 .B maptimeout
2482 .RI [ timeout ]
2484 Set the inter-character timer for input sequence detection to a timeout
2486 .I timeout
2487 ms. The default timeout is 300ms. Maptimeout with no arguments shows
2488 the current setting.
2489 See also \*Qbindkey\*U.
2491 .ne 3
2492 .BI "markkeys " string
2494 This is a method of changing the keymap used for copy/history mode.
2495 The string is made up of \fIoldchar\fP=\fInewchar\fP pairs which are
2496 separated by `:'. Example: The string \*QB=^B:F=^F\*U will change the 
2497 keys `C-b' and `C-f' to the vi style binding (scroll up/down fill page).
2498 This happens to be the default binding for `B' and `F'.
2499 The command \*Qmarkkeys h=^B:l=^F:$=^E\*U would set the mode for an emacs-style
2500 binding.
2501 If your terminal sends characters, that cause you to abort copy mode,
2502 then this command may help by binding these characters to do nothing.
2503 The no-op character is `@' and is used like this: \*Qmarkkeys
2504 @=L=H\*U if you do not want to use the `H' or `L' commands any longer.
2505 As shown in this example, multiple keys can be assigned to one function in a 
2506 single statement.
2508 .ne 3
2509 .BI "maxwin " num
2511 Set the maximum window number screen will create. Doesn't affect
2512 already existing windows. The number can be increased only when there are no
2513 existing windows.
2515 .ne 3
2516 .B meta
2518 Insert the command character (C-a) in the current window's input stream.
2520 .ne 3
2521 .BR "monitor " [ on | off ]
2523 Toggles activity monitoring of windows.
2524 When monitoring is turned on and an affected window is switched into the
2525 background, you will receive the activity notification message in the
2526 status line at the first sign of output and the window will also be marked
2527 with an `@' in the window-status display.
2528 Monitoring is initially off for all windows.
2530 .ne 3
2531 .BR "mousetrack " [ on | off ]
2533 This command determines whether
2534 .I screen
2535 will watch for
2536 mouse clicks. When this command is enabled, regions that have
2537 been split in various ways can be selected by pointing to them
2538 with a mouse and left-clicking them. Without specifying \fBon\fP
2539 or \fBoff\fP, the current state is displayed. The default state
2540 is determined by the \*Qdefmousetrack\*U command.
2542 .ne 3
2543 .BI "msgminwait " sec
2545 Defines the time 
2546 .I screen 
2547 delays a new message when one message is currently displayed. 
2548 The default is 1 second.
2550 .ne 3
2551 .BI "msgwait " sec
2553 Defines the time a message is displayed if 
2554 .I screen
2555 is not disturbed by other activity. The default is 5 seconds.
2557 .ne 3
2558 .BR "multiuser on" | off
2560 Switch between singleuser and multiuser mode. Standard
2561 .I screen
2562 operation is singleuser. In multiuser mode the commands `acladd',
2563 `aclchg', `aclgrp' and `acldel'
2564 can be used to enable (and disable) other users accessing this 
2565 .I screen
2566 session. 
2568 .ne 3
2569 .BR "nethack on" | off
2571 Changes the kind of error messages used by
2572 .IR screen .
2573 When you are familiar with the game \*Qnethack\*U, you may enjoy the
2574 nethack-style messages which will often blur the facts a little, but are
2575 much funnier to read. Anyway, standard messages often tend to be unclear as
2576 well.
2578 This option is only 
2579 available if
2580 .I screen
2581 was compiled with the NETHACK flag defined. The
2582 default setting is then determined by the presence of the environment 
2583 variable $NETHACKOPTIONS and the file ~/.nethackrc - if either one is present,
2584 the default is \fBon\fP.
2586 .ne 3
2587 .B next
2589 Switch to the next window.
2590 This command can be used repeatedly to cycle through the list of windows.
2592 .ne 3
2593 .B nonblock 
2594 .RB [ on | off | \fInumsecs ]
2596 Tell screen how to deal with user interfaces (displays) that cease to
2597 accept output. This can happen if a user presses ^S or a TCP/modem
2598 connection gets cut but no hangup is received. If nonblock is
2599 \fBoff\fP (this is the default) screen waits until the display
2600 restarts to accept the output. If nonblock is \fBon\fP, screen
2601 waits until the timeout is reached (\fBon\fP is treated as 1s). If the
2602 display still doesn't receive characters, screen will consider
2603 it \*Qblocked\*U and stop sending characters to it. If at
2604 some time it restarts to accept characters, screen will unblock
2605 the display and redisplay the updated window contents.
2607 .ne 3
2608 .BR "number " [[+|-] \fIn ]
2610 Change the current window's number. If the given number \fIn\fP is already 
2611 used by another window, both windows exchange their numbers. If no argument is
2612 specified, the current window number (and title) is shown. Using `+' or `-'
2613 will change the window's number by the relative amount specified.
2615 .ne 3
2616 .BR "obuflimit " [ \fIlimit ]
2618 If the output buffer contains more bytes than the specified limit, no
2619 more data will be
2620 read from the windows. The default value is 256. If you have a fast
2621 display (like xterm), you can set it to some higher value. If no
2622 argument is specified, the current setting is displayed.
2624 .ne 3
2625 .B only
2627 Kill all regions but the current one.
2629 .ne 3
2630 .B other
2632 Switch to the window displayed previously. If this window does no longer exist,
2633 \fIother\fP has the same effect as \fInext\fP.
2635 .ne 3
2636 .BR "partial on" | off
2638 Defines whether the display should be refreshed (as with \fIredisplay\fP) after
2639 switching to the current window. This command only affects the current window.
2640 To immediately affect all windows use the \fIallpartial\fP command.
2641 Default is `off', of course.  This default is fixed, as there is currently no 
2642 \fIdefpartial\fP command.
2644 .ne 3
2645 .BR "password " [ \fIcrypted_pw ]
2647 Present a crypted password in your \*Q.screenrc\*U file and
2648 .I screen
2649 will ask
2650 for it, whenever someone attempts to resume a detached. This is useful
2651 if you have privileged programs running under
2652 .I screen
2653 and you want to protect your session from reattach attempts by another user
2654 masquerading as your uid (i.e. any superuser.)
2655 If no crypted password is specified,
2656 .I screen
2657 prompts twice for typing a
2658 password and places its encryption in the paste buffer.
2659 Default is `none', this disables password checking.
2661 .ne 3
2662 .BR paste
2663 .RI [ registers " [" dest_reg ]]
2665 Write the (concatenated) contents of the specified registers to the stdin queue
2666 of the current window. The register '.' is treated as the
2667 paste buffer. If no parameter is given the user is prompted for a single 
2668 register to paste.
2669 The paste buffer can be filled with the \fIcopy\fP, \fIhistory\fP and 
2670 \fIreadbuf\fP commands. 
2671 Other registers can be filled with the \fIregister\fP, \fIreadreg\fP and 
2672 \fIpaste\fP commands.
2673 If \fIpaste\fP is called with a second argument, the contents of the specified
2674 registers is pasted into the named destination register rather than 
2675 the window. If '.' is used as the second argument, the displays paste buffer is
2676 the destination.
2677 Note, that \*Qpaste\*U uses a wide variety of resources: Whenever a second 
2678 argument is specified no current window is needed. When the source specification
2679 only contains registers (not the paste buffer) then there need not be a current 
2680 display (terminal attached), as the registers are a global resource. The 
2681 paste buffer exists once for every user.
2683 .ne 3
2684 .BR "pastefont " [ on | off ]
2686 Tell 
2687 .I screen 
2688 to include font information in the paste buffer. The
2689 default is not to do so. This command is especially useful for
2690 multi character fonts like kanji.
2692 .ne 3
2693 .B pow_break
2695 Reopen the window's terminal line and send a break condition. See `break'.
2697 .ne 3
2698 .B pow_detach
2700 Power detach. 
2701 Mainly the same as \fIdetach\fP, but also sends a HANGUP signal to
2702 the parent process of
2703 .IR screen .
2704 CAUTION: This will result in a logout, when 
2705 .I screen
2706 was started from your login shell.
2708 .ne 3
2709 .B pow_detach_msg
2710 .RI [ message ]
2712 The \fImessage\fP specified here is output whenever a `Power detach' was
2713 performed. It may be used as a replacement for a logout message or to reset 
2714 baud rate, etc. 
2715 Without parameter, the current message is shown.
2717 .ne 3
2718 .B prev
2720 Switch to the window with the next lower number.
2721 This command can be used repeatedly to cycle through the list of windows.
2723 .ne 3
2724 .B printcmd
2725 .RI [ cmd ]
2728 .I cmd
2729 is not an empty string, 
2730 .I screen 
2731 will not use the terminal capabilities
2732 \*Qpo/pf\*U if it detects an ansi print sequence
2733 .BR "ESC [ 5 i" ,
2734 but pipe the output into
2735 .IR cmd .
2736 This should normally be a command like \*Qlpr\*U or
2737 \*Q'cat > /tmp/scrprint'\*U.
2738 .B printcmd
2739 without a command displays the current setting.
2740 The ansi sequence
2741 .B "ESC \e"
2742 ends printing and closes the pipe.
2744 Warning: Be careful with this command! If other user have write
2745 access to your terminal, they will be able to fire off print commands.
2747 .ne 3
2748 .BR process " [" \fIkey ]
2750 Stuff the contents of the specified register into 
2751 .IR screen 's
2752 input queue. If no argument is given you are prompted for a
2753 register name. The text is parsed as if it had been typed in from the user's
2754 keyboard. This command can be used to bind multiple actions to a single key.
2756 .ne 3
2757 .B quit
2759 Kill all windows and terminate
2760 .IR screen .
2761 Note that on VT100-style terminals the keys C-4 and C-\e are identical.
2762 This makes the default bindings dangerous:
2763 Be careful not to type C-a C-4 when selecting window no. 4.
2764 Use the empty bind command (as in \*Qbind '^\e'\*U) to remove a key binding.
2766 .ne 3
2767 .B readbuf
2768 .RB [ -e
2769 .IR encoding ]
2770 .RI [ filename ]
2772 Reads the contents of the specified file into the paste buffer.
2773 You can tell screen the encoding of the file via the \fB-e\fP option.
2774 If no file is specified, the screen-exchange filename is used.
2775 See also \*Qbufferfile\*U command.
2777 .ne 3
2778 .B readreg 
2779 .RB [ -e
2780 .IR encoding ]
2781 .RI [ register " [" filename ]]
2783 Does one of two things, dependent on number of arguments: with zero or one
2784 arguments it it duplicates the paste buffer contents into the register specified
2785 or entered at the prompt. With two arguments it reads the contents of the named 
2786 file into the register, just as \fIreadbuf\fP reads the screen-exchange file
2787 into the paste buffer.
2788 You can tell screen the encoding of the file via the \fB-e\fP option.
2789 The following example will paste the system's password file into 
2790 the 
2791 .I screen 
2792 window (using register p, where a copy remains):
2795         C-a : readreg p /etc/passwd
2796         C-a : paste p
2799 .ne 3
2800 .B redisplay
2802 Redisplay the current window. Needed to get a full redisplay when in
2803 partial redraw mode.
2805 .ne 3
2806 .B register
2807 .RB [ -e
2808 .IR encoding ]
2809 .I "key string"
2811 Save the specified \fIstring\fP to the register \fIkey\fP.
2812 The encoding of the string can be specified via the \fB-e\fP option.
2813 See also the \*Qpaste\*U command.
2815 .ne 3
2816 .B "remove"
2818 Kill the current region. This is a no-op if there is only one region.
2820 .ne 3
2821 .B "removebuf"
2823 Unlinks the screen-exchange file used by the commands \*Qwritebuf\*U and 
2824 \*Qreadbuf\*U. 
2826 .ne 3
2827 .B "rendition bell" | monitor | silence | so
2828 .RB "\fIattr\fR " [ \fIcolor ]
2830 Change the way
2831 .I screen
2832 renders the titles of windows that have monitor or bell flags set in caption or hardstatus or windowlist. See the \*QSTRING ESCAPES\*U chapter for the syntax of the modifiers.
2833 The default for monitor is currently \*Q=b \*U (bold, active colors), for bell \*Q=ub \*U (underline, bold and active colors), and \*Q=u \*U for silence.
2835 .ne 3
2836 .B "reset"
2837 .PP 
2838 Reset the virtual terminal to its \*Qpower-on\*U values. Useful when strange
2839 settings (like scroll regions or graphics character set) are left over from
2840 an application.
2842 .ne 3
2843 .B "resize"
2844 .PP 
2845 Resize the current region. The space will be removed from or added to
2846 the region below or if there's not enough space from the region above.
2848 resize +N       increase current region height by N
2850 resize -N       decrease current region height by N
2852 resize  N       set current region height to N
2854 resize  =       make all windows equally high
2856 resize  max     maximize current region height
2858 resize  min     minimize current region height
2861 .ne 3
2862 .B "screen \fP[\fI-opts\fP] [\fIn\fP] [\fIcmd\fP [\fIargs\fP]|\fB//group\fP]"
2864 Establish a new window.
2865 The flow-control options (\fB\-f\fP, \fB\-fn\fP and \fB\-fa\fP),
2866 title (a.\|k.\|a.) option (\fB\-t\fP), login options (\fB-l\fP and \fB-ln\fP)
2867 , terminal type option (\fB-T\fP <term>), the all-capability-flag (\fB-a\fP)
2868 and scrollback option (\fB-h\fP <num>) may be specified with each command. 
2869 The option (\fB-M\fP) turns monitoring on for this window.
2870 The option (\fB-L\fP) turns output logging on for this window.
2871 If an optional number \fIn\fP in the range 0..MAXWIN-1 is given,
2872 the window number \fIn\fP is assigned to the newly created window
2873 (or, if this number is already in-use, the next available number).
2874 If a command is specified after \*Qscreen\*U, this command (with the given
2875 arguments) is started in the window; otherwise, a shell is created.
2876 If \fB//group\fP is supplied, a container-type window is created in
2877 which other windows may be created inside it. 
2879 Thus, if your \*Q.screenrc\*U contains the lines
2882         # example for .screenrc:
2883         screen 1
2884         screen -fn -t foobar -L 2 telnet foobar
2887 .I screen
2888 creates a shell window (in window #1) and a window with a TELNET connection
2889 to the machine foobar (with no flow-control using the title \*Qfoobar\*U
2890 in window #2) and will write a logfile (\*Qscreenlog.2\*U) of the telnet 
2891 session.
2892 Note, that unlike previous versions of
2893 .I screen
2894 no additional default window is created when \*Qscreen\*U commands are 
2895 included in your \*Q.screenrc\*U file. When the initialization is completed,
2896 .I screen
2897 switches to the last window specified in your .screenrc file or, if none,
2898 opens a default window #0.
2900 Screen has built in some functionality of \*Qcu\*U and \*Qtelnet\*U.
2901 See also chapter \*QWINDOW TYPES\*U.
2903 .ne 3
2904 .B "scrollback \fP\fInum\fP"
2906 Set the size of the scrollback buffer for the current windows to \fInum\fP 
2907 lines. The default scrollback is 100 lines.
2908 See also the \*Qdefscrollback\*U command and use \*Qinfo\*U to view the
2909 current setting. To access and use the contents in the scrollback buffer,
2910 use the \*Qcopy\*U command.
2912 .ne 3
2913 .BR "select " [ \fIWindowID ]
2915 Switch to the window identified by \fIWindowID\fP.
2916 This can be a prefix of a window title (alphanumeric window name) or a
2917 window number.
2918 The parameter is optional and if omitted, you get prompted for an identifier. 
2919 When a new window is established, the first available number
2920 is assigned to this window.
2921 Thus, the first window can be activated by \*Qselect 0\*U.
2922 The number of windows is limited at compile-time by the MAXWIN
2923 configuration parameter (which defaults to 40).
2924 There are two special WindowIDs, \*Q-\*U selects the
2925 internal blank window and \*Q.\*U selects the current window. The
2926 latter is useful if used with screen's \*Q-X\*U option.
2929 .BR "sessionname " [ \fIname ]
2931 Rename the current session. Note, that for \*Qscreen -list\*U the
2932 name shows up with the process-id prepended. If the argument \*Qname\*U
2933 is omitted, the name of this session is displayed. Caution: The $STY 
2934 environment variables will still reflect the old name in pre-existing
2935 shells. This may result in confusion. Use of this command is generally
2936 discouraged. Use the \*Q-S\*U command-line option if you want to
2937 name a new session.
2938 The default is constructed from the tty and host names.
2940 .ne 3
2941 .B "setenv " 
2942 .RI [ var " [" string ]]
2944 Set the environment variable \fIvar\fP to value \fIstring\fP.
2945 If only \fIvar\fP is specified, the user will be prompted to enter a value.
2946 If no parameters are specified, the user will be prompted for both variable
2947 and value. The environment is inherited by all subsequently forked shells.
2949 .ne 3
2950 .BR "setsid " [ on | off ]
2952 Normally screen uses different sessions and process groups for
2953 the windows. If setsid is turned \fIoff\fP, this is not done
2954 anymore and all windows will be in the same process group as the
2955 screen backend process. This also breaks job-control, so be careful.
2956 The default is \fIon\fP, of course. This command is probably useful
2957 only in rare circumstances.
2959 .ne 3
2960 .B "shell \fIcommand\fP"
2962 Set the command to be used to create a new shell.
2963 This overrides the value of the environment variable $SHELL.
2964 This is useful if you'd like to run a tty-enhancer which is expecting to
2965 execute the program specified in $SHELL. If the command begins with
2966 a '-' character, the shell will be started as a login-shell.
2968 .ne 3
2969 .B "shelltitle \fItitle\fP"
2971 Set the title for all shells created during startup or by
2972 the C-A C-c command.
2973 For details about what a title is, see the discussion
2974 entitled \*QTITLES (naming windows)\*U.
2976 .ne 3
2977 .BR "silence " [ on | off "|\fIsec\fP]"
2979 Toggles silence monitoring of windows.
2980 When silence is turned on and an affected window is switched into the
2981 background, you will receive the silence notification message in the
2982 status line after a specified period of inactivity (silence). The default
2983 timeout can be changed with the `silencewait' command or by specifying a 
2984 number of seconds instead of `on' or `off'.
2985 Silence is initially off for all windows.
2987 .ne 3
2988 .BI "silencewait " sec
2990 Define the time that all windows monitored for silence should wait before
2991 displaying a message. Default 30 seconds.
2994 .B "sleep \fP\fInum\fP"
2996 This command will pause the execution of a .screenrc file for \fInum\fP seconds.
2997 Keyboard activity will end the sleep.
2998 It may be used to give users a chance to read the messages output by \*Qecho\*U.
3000 .ne 3
3001 .B "slowpaste \fImsec\fP"
3003 Define the speed at which text is inserted into the current window by the 
3004 paste ("C-a ]") command. 
3005 If the slowpaste value is nonzero text is written character by character.
3006 .I screen
3007 will make a pause of \fImsec\fP milliseconds after each single character write 
3008 to allow the application to process its input. Only use slowpaste if your 
3009 underlying system exposes flow control problems while pasting large amounts of 
3010 text. 
3012 .ne 3
3013 .BI "source " file
3015 Read and execute commands from file \fIfile\fP. Source commands may
3016 be nested to a maximum recursion level of ten. If file is not an
3017 absolute path and screen is already processing a source command, the
3018 parent directory of the running source command file is used to search
3019 for the new command file before screen's current directory.
3021 Note that termcap/terminfo/termcapinfo commands only work at
3022 startup and reattach time, so they must be reached via the
3023 default screenrc files to have an effect.
3025 .ne 3
3026 .B sorendition
3027 .RB [ "\fIattr\fR " [ \fIcolor ]]
3029 This command is deprecated. See "rendition so" instead.
3031 .ne 3
3032 .B split
3033 .RB [ -v ]
3035 Split the current region into two new ones. All regions on the
3036 display are resized to make room for the new region. The blank
3037 window is displayed on the new region. Splits are made horizontally
3038 unless -v is used. Use the \*Qremove\*U or the \*Qonly\*U command
3039 to delete regions. Use \*Qfocus\*U to toggle between regions.
3041 .ne 3
3042 .B "startup_message on\fP|\fBoff"
3044 Select whether you want to see the copyright notice during startup.
3045 Default is `on', as you probably noticed.
3047 .ne 3
3048 .B stuff 
3049 .RB  [ "\fIstring\fR" ]
3051 Stuff the string
3052 .I string
3053 in the input buffer of the current window.
3054 This is like the \*Qpaste\*U command but with much less overhead.
3055 Without a paramter, screen will prompt for a string to stuff.
3056 You cannot paste
3057 large buffers with the \*Qstuff\*U command. It is most useful for key
3058 bindings. See also \*Qbindkey\*U.
3060 .ne 3
3061 .B su
3062 .RI [ username " [" password
3063 .RI [ password2 ]]]
3065 Substitute the user of a display. The command prompts for all parameters that
3066 are omitted. If passwords are specified as parameters, they have to be
3067 specified un-crypted. The first password is matched against the systems
3068 passwd database, the second password is matched against the 
3069 .I screen
3070 password as set with the commands \*Qacladd\*U or \*Qpassword\*U.
3071 \*QSu\*U may be useful for the 
3072 .I screen
3073 administrator to test multiuser setups.
3074 .\"                                             XXX removed in 3.8.0 XXX
3075 .\" but it is mainly used implicitly
3076 .\" by the \*Qconnect\*U command to identify users that access a remote session.
3077 When the identification fails, the user has access to the commands available
3078 for user
3079 .BR nobody .
3080 These are \*Qdetach\*U, \*Qlicense\*U, \*Qversion\*U, \*Qhelp\*U and
3081 \*Qdisplays\*U.
3083 .ne 3
3084 .B "suspend"
3086 Suspend
3087 .IR screen .
3088 The windows are in the `detached' state, while 
3089 .I screen
3090 is suspended. This feature relies on the shell being able to do job control.
3092 .ne 3
3093 .B "term \fIterm\fP"
3095 In each window's environment
3096 .I screen
3097 opens, the $TERM variable is set to \*Qscreen\*U by default. 
3098 But when no description for \*Qscreen\*U is installed in the local termcap
3099 or terminfo data base, you set $TERM to \- say \-
3100 \*Qvt100\*U. This won't do much harm, as 
3101 .I screen
3102 is VT100/ANSI compatible.
3103 The use of the \*Qterm\*U command is discouraged for non-default purpose.
3104 That is, one may want to specify special $TERM settings (e.g. vt100) for the
3105 next \*Qscreen rlogin othermachine\*U command. Use the command \*Qscreen -T vt100
3106 rlogin othermachine\*U rather than setting and resetting the default.
3108 .ne 3
3109 .BI termcap " term terminal-tweaks"
3110 .RI [ window-tweaks ]
3112 .BI terminfo " term terminal-tweaks"
3113 .RI [ window-tweaks ]
3115 .BI termcapinfo " term terminal-tweaks"
3116 .RI [ window-tweaks ]
3118 Use this command to modify your terminal's termcap entry without going
3119 through all the hassles involved in creating a custom termcap entry.
3120 Plus, you can optionally customize the termcap generated for the windows.
3121 You have to place these commands in one of the screenrc startup files, as
3122 they are meaningless once the terminal emulator is booted.  
3124 If your system works uses the terminfo database rather than termcap, 
3125 .I screen 
3126 will understand the `terminfo' command, which has the same effects as the
3127 `termcap' command.  Two separate commands are provided, as there are subtle
3128 syntactic differences, e.g. when parameter interpolation (using `%') is
3129 required. Note that termcap names of the capabilities have to be used
3130 with the `terminfo' command. 
3132 In many cases, where the arguments are valid in both terminfo and termcap
3133 syntax, you can use the command `termcapinfo', which is just a shorthand
3134 for a pair of `termcap' and `terminfo' commands with identical arguments.
3136 The first argument specifies which terminal(s) should be affected by this
3137 definition.
3138 You can specify multiple terminal names by separating them with `|'s.
3139 Use `*' to match all terminals and `vt*' to match all terminals that begin
3140 with \*Qvt\*U.
3142 Each \fItweak\fP argument contains one or more termcap defines (separated
3143 by `:'s) to be inserted at the start of the appropriate termcap entry,
3144 enhancing it or overriding existing values.
3145 The first tweak modifies your terminal's termcap, and contains definitions
3146 that your terminal uses to perform certain functions.
3147 Specify a null string to leave this unchanged (e.\|g. '').
3148 The second (optional) tweak modifies all the window termcaps, and should
3149 contain definitions that
3150 .I screen
3151 understands (see the \*QVIRTUAL TERMINAL\*U
3152 section).
3154 Some examples:
3156 termcap xterm*  LP:hs@
3158 Informs
3159 .I screen
3160 that all terminals that begin with `xterm' have firm auto-margins that
3161 allow the last position on the screen to be updated (LP), but they don't
3162 really have a status line (no 'hs' \- append `@' to turn entries off).
3163 Note that we assume `LP' for all terminal names that start with \*Qvt\*U,
3164 but only if you don't specify a termcap command for that terminal.
3166 termcap vt*  LP
3168 termcap vt102|vt220  Z0=\eE[?3h:Z1=\eE[?3l
3170 Specifies the firm-margined `LP' capability for all terminals that begin with
3171 `vt', and the second line will also add the escape-sequences to switch
3172 into (Z0) and back out of (Z1) 132-character-per-line mode if this is
3173 a VT102 or VT220.
3174 (You must specify Z0 and Z1 in your termcap to use the width-changing
3175 commands.)
3177 termcap vt100  ""  l0=PF1:l1=PF2:l2=PF3:l3=PF4
3179 This leaves your vt100 termcap alone and adds the function key labels to
3180 each window's termcap entry.
3182 termcap h19|z19  am@:im=\eE@:ei=\eEO  dc=\eE[P
3184 Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables the
3185 insert mode (im) and end-insert (ei) capabilities (the `@' in the `im'
3186 string is after the `=', so it is part of the string).
3187 Having the `im' and `ei' definitions put into your terminal's termcap will
3188 cause
3189 .I screen
3190 to automatically advertise the character-insert capability in
3191 each window's termcap.
3192 Each window will also get the delete-character capability (dc) added to its
3193 termcap, which
3194 .I screen
3195 will translate into a line-update for the terminal
3196 (we're pretending it doesn't support character deletion).
3198 If you would like to fully specify each window's termcap entry, you should
3199 instead set the $SCREENCAP variable prior to running
3200 .IR screen .
3201 See the discussion on the \*QVIRTUAL TERMINAL\*U in this manual, and the termcap(5)
3202 man page for more information on termcap definitions.
3204 .ne 3
3205 .B time
3206 .RI [ string ]
3208 Uses the message line to display the time of day, the host name, and the load
3209 averages over 1, 5, and 15 minutes (if this is available on your system).
3210 For window specific information, use \*Qinfo\*U.
3212 If a string is specified, it changes the format of the time report like it is
3213 described in the \*QSTRING ESCAPES\*U chapter. Screen uses a default of
3214 "%c:%s %M %d %H%? %l%?".
3216 .ne 3
3217 .BR "title " [ \fIwindowtitle ]
3219 Set the name of the current window to \fIwindowtitle\fP. If no name is 
3220 specified,
3221 .I screen
3222 prompts for one. This command was known as `aka' in previous
3223 releases.
3225 .ne 3
3226 .BI "unbindall "
3228 Unbind all the bindings. This can be useful when
3229 screen is used solely for its detaching abilities, such as when
3230 letting a console application run as a daemon. If, for some reason,
3231 it is necessary to bind commands after this, use 'screen -X'.
3233 .ne 3
3234 .BI "unsetenv " var
3236 Unset an environment variable.
3238 .ne 3
3239 .B utf8
3240 .RB [ on | off
3241 .RB [ on | off ]]
3243 Change the encoding used in the current window. If utf8 is enabled, the
3244 strings sent to the window will be UTF-8 encoded and vice versa. Omitting the
3245 parameter toggles the setting. If a second parameter is given, the display's
3246 encoding is also changed (this should rather be done with screen's \*Q-U\*U
3247 option).
3248 See also \*Qdefutf8\*U, which changes the default setting of a new
3249 window.
3251 .ne 3
3252 .B vbell 
3253 .RB [ on | off ]
3255 Sets the visual bell setting for this window. Omitting the parameter
3256 toggles the setting. If vbell is switched on, but your terminal does not 
3257 support a visual bell, a `vbell-message' is displayed in the status line when
3258 the bell character (^G) is received.
3259 Visual bell support of a terminal is defined by the termcap variable `vb' 
3260 (terminfo: 'flash'). 
3262 Per default, vbell is off, thus the audible bell is used. 
3263 See also `bell_msg'.
3265 .ne 3
3266 .B vbell_msg
3267 .RI [ message ]
3269 Sets the visual bell message. \fImessage\fP is printed to the status line if
3270 the window receives a bell character (^G), vbell is set to \*Qon\*U, but the 
3271 terminal does not support a visual bell.
3272 The default message is \*QWuff, Wuff!!\*U.
3273 Without a parameter, the current message is shown.
3275 .ne 3
3276 .BI "vbellwait " sec
3278 Define a delay in seconds after each display of 
3279 .IR screen 's
3280 visual bell message. The default is 1 second.
3282 .ne 3
3283 .B verbose
3284 .RB [ on | off ]
3286 If verbose is switched on, the command name is echoed, whenever a window
3287 is created (or resurrected from zombie state). Default is off.
3288 Without a parameter, the current setting is shown.
3290 .ne 3
3291 .B version
3293 Print the current version and the compile date in the status line.
3295 .ne 3
3296 .BI "wall " "message"
3298 Write a message to all displays. The message will appear in the terminal's
3299 status line.
3301 .ne 3
3302 .B width
3303 .RB [ -w | -d ]
3304 .RI [ cols " [" lines ]]
3306 Toggle the window width between 80 and 132 columns or set it to \fIcols\fP 
3307 columns if an argument is specified. 
3308 This requires a capable terminal and the termcap entries \*QZ0\*U and \*QZ1\*U.
3309 See the \*Qtermcap\*U command for more information. You can also specify
3310 a new height if you want to change both values.
3312 .B -w
3313 option tells screen to leave the display size unchanged and just set
3314 the window size,
3315 .B -d
3316 vice versa.
3318 .ne 3
3319 .B windowlist
3320 .RB [ -b ]
3321 .RB [ -m ]
3322 .RB [ -g ]
3324 .B windowlist
3325 .B string
3326 .RI [ string ]
3328 .B windowlist
3329 .B title
3330 .RI [ title ]
3332 Display all windows in a table for visual window selection.
3333 If screen was in a window group, screen will
3334 back out of the group and then display the windows in that group.
3335 If the 
3336 .B -b
3337 option is given, screen will switch to the blank window before
3338 presenting the list, so that the current window is also selectable.
3340 .B -m
3341 option changes the order of the windows, instead of sorting by
3342 window numbers screen uses its internal most-recently-used list.
3344 .B -g
3345 option will show the windows inside any groups in that level
3346 and downwards.
3348 The following keys are used to navigate in \*Qwindowlist\*U:
3350 .in +4n
3351 .ti -2n
3352 \fBk\fP, \fBC-p\fP, or \fBup\fP Move up one line.
3354 .ti -2n
3355 \fBj\fP, \fBC-n\fP, or \fBdown\fP Move down one line.
3357 .ti -2n
3358 \fBC-g\fP or \fBescape\fP Exit windowlist.
3360 .ti -2n
3361 \fBC-a\fP or \fBhome\fP Move to the first line.
3363 .ti -2n
3364 \fBC-e\fP or \fBend\fP Move to the last line.
3366 .ti -2n
3367 \fBC-u\fP or \fBC-d\fP Move one half page up or down.
3369 .ti -2n
3370 \fBC-b\fP or \fBC-f\fP Move one full page up or down.
3372 .ti -2n
3373 \fB0..9\fP Using the number keys, move to the selected line.
3375 .ti -2n
3376 \fBmouseclick\fP Move to the selected line. Available when
3377 \*Qmousetrack\*U is set to \*Qon\*U
3379 .ti -2n
3380 \fB/\fP Search.
3382 .ti -2n
3383 \fBn\fP Repeat search in the forward direction.
3385 .ti -2n
3386 \fBN\fP Repeat search in the backward direction.
3388 .ti -2n
3389 \fBm\fP Toggle MRU.
3391 .ti -2n
3392 \fBg\fP Toggle group nesting.
3394 .ti -2n
3395 \fBa\fP All window view.
3397 .ti -2n
3398 \fBC-h\fP or backspace Back out the group.
3400 .ti -2n
3401 \fB,\fP Switch numbers with the previous window.
3403 .ti -2n
3404 \fB.\fP Switch numbers with the next window.
3406 .ti -2n
3407 \fBK\fP Kill that window.
3409 .ti -2n
3410 \fBspace\fP or \fBenter\fP Select that window.
3412 .in -4n
3414 The table format can be changed with the \fBstring\fP and
3415 \fBtitle\fP option, the title is displayed as table heading, while
3416 the lines are made by using the string setting. The default
3417 setting is \*QNum Name%=Flags\*U for the title and \*Q%3n %t%=%f\*U
3418 for the lines.
3419 See the \*QSTRING ESCAPES\*U chapter for more codes (e.g. color
3420 settings).
3422 \*QWindowlist\*U needs a region size of at least 10 characters wide
3423 and 6 characters high in order to display.
3425 .ne 3
3426 .B windows
3428 Uses the message line to display a list of all the windows.
3429 Each window is listed by number with the name of process that has been
3430 started in the window (or its title);
3431 the current window is marked with a `*';
3432 the previous window is marked with a `-';
3433 all the windows that are \*Qlogged in\*U are marked with a `$';
3434 a background window that has received a bell is marked with a `!';
3435 a background window that is being monitored and has had activity occur
3436 is marked with an `@';
3437 a window which has output logging turned on is marked with `(L)'; 
3438 windows occupied by other users are marked with `&';
3439 windows in the zombie state are marked with `Z'.
3440 If this list is too long to fit on the terminal's status line only the
3441 portion around the current window is displayed.
3443 .ne 3
3444 .BR "wrap " [ on | off ]
3446 Sets the line-wrap setting for the current window.
3447 When line-wrap is on, the second consecutive printable character output at
3448 the last column of a line will wrap to the start of the following line.
3449 As an added feature, backspace (^H) will also wrap through the left margin
3450 to the previous line.
3451 Default is `on'. Without any options, the state of wrap is toggled.
3453 .ne 3
3454 .B writebuf
3455 .RB [ -e
3456 .IR encoding ]
3457 .RI [ filename ]
3459 Writes the contents of the paste buffer to the specified file, or the public accessible screen-exchange
3460 file if no filename is given. This is thought of as a primitive means of communication between
3461 .I screen
3462 users on the same host. If an encoding is specified the paste buffer
3463 is recoded on the fly to match the encoding.
3464 The filename can be set with the \fIbufferfile\fP
3465 command and defaults to \*Q/tmp/screen-exchange\*U.
3467 .ne 3
3468 .BR "writelock " [ on | "off\fR|\fBauto\fR]"
3470 In addition to access control lists, not all users may be able to write to
3471 the same window at once. Per default, writelock is in `auto' mode and
3472 grants exclusive input permission to the user who is the first to switch
3473 to the particular window. When he leaves the window, other users may obtain
3474 the writelock (automatically). The writelock of the current window is disabled
3475 by the command \*Qwritelock off\*U. If the user issues the command 
3476 \*Qwritelock on\*U he keeps the exclusive write permission while switching
3477 to other windows.
3479 .ne 3
3480 .B xoff
3482 .B xon
3484 Insert a CTRL-s / CTRL-q character to the stdin queue of the
3485 current window.
3487 .ne 3
3488 .B zmodem
3489 .RB [ off\fR|\fPauto\fR|\fPcatch\fR|\fPpass ]
3491 .B "zmodem sendcmd"
3492 .RI [ string ]
3494 .B "zmodem recvcmd"
3495 .RI [ string ]
3497 Define zmodem support for screen. Screen understands two different
3498 modes when it detects a zmodem request: \*Qpass\*U and \*Qcatch\*U.
3499 If the mode is set to \*Qpass\*U, screen will relay all data
3500 to the attacher until the end of the transmission is reached.
3501 In \*Qcatch\*U mode screen acts as a zmodem endpoint and starts
3502 the corresponding rz/sz commands. If the mode is set to \*Qauto\*U,
3503 screen will use \*Qcatch\*U if the window is a tty (e.g. a serial line),
3504 otherwise it will use \*Qpass\*U.
3506 You can define the templates screen uses in \*Qcatch\*U mode
3507 via the second and the third form.
3509 Note also that this is an experimental feature.
3511 .ne 3
3512 .BR "zombie " [\fIkeys\fP [ onerror ] ]
3514 .BR "defzombie " [\fIkeys\fP]
3516 Per default
3517 .I screen 
3518 windows are removed from the window list as soon as
3519 the windows process (e.g. shell) exits. When a string of two keys is 
3520 specified to the zombie command, `dead' windows will remain in the list.
3521 The \fBkill\fP command may be used to remove such a window. Pressing the 
3522 first key in the dead window has the same effect. When pressing the second 
3523 key, 
3524 .I screen 
3525 will attempt to resurrect the window. The process that was 
3526 initially running in the window will be launched again. Calling \fBzombie\fP
3527 without parameters will clear the zombie setting, thus making windows disappear 
3528 when their process exits.
3530 As the zombie-setting is manipulated globally for all windows, this command 
3531 should only be called \fBdefzombie\fP. Until we need this as a per window 
3532 setting, the commands \fBzombie\fP and \fBdefzombie\fP are synonymous.
3534 Optionally you can put the word \*Qonerror\*U after the keys. This will cause screen
3535 to monitor exit status of the process running in the window. If it exits normally ('0'), 
3536 the window disappears. Any other exit value causes the window to become a zombie.
3538 .SH "THE MESSAGE LINE"
3539 .I Screen
3540 displays informational messages and other diagnostics in a \fImessage line\fP.
3541 While this line is distributed to appear at the bottom of the screen,
3542 it can be defined to appear at the top of the screen during compilation.
3543 If your terminal has a status line defined in its termcap,
3544 .I screen
3545 will use this for displaying its messages, otherwise a line of the
3546 current screen will
3547 be temporarily overwritten and output will be momentarily interrupted. The
3548 message line is automatically removed after a few seconds delay, but it
3549 can also be removed early (on terminals without a status line) by beginning
3550 to type.
3552 The message line facility can be used by an application running in
3553 the current window by means of the ANSI \fIPrivacy message\fP
3554 control sequence.
3555 For instance, from within the shell, try something like:
3557 echo '<esc>^Hello world from window '$WINDOW'<esc>\e\e'
3559 where '<esc>' is an \fIescape\fP, '^' is a literal up-arrow,
3560 and '\e\e' turns into a single backslash.
3562 .SH "WINDOW TYPES"
3563 Screen provides three different window types. New windows are created with 
3564 .IR screen 's
3565 .B screen
3566 command (see also the entry in chapter \*QCUSTOMIZATION\*U). The first
3567 parameter to the 
3568 .B screen
3569 command defines which type of window is created. The different window types are
3570 all special cases of the normal type. They have been added in order
3571 to allow 
3572 .I screen 
3573 to be used efficiently as a console multiplexer with 100 or more windows.
3575 .IP \(bu 3
3576 The normal window contains a shell (default, if no parameter is given) or any
3577 other system command that could be executed from a shell (e.g.  
3578 .BR slogin ,
3579 etc...) 
3581 .IP \(bu
3582 If a tty (character special device) name (e.g. \*Q/dev/ttya\*U)
3583 is specified as the first parameter, then the window is directly connected to
3584 this device. 
3585 This window type is similar to \*Qscreen cu -l /dev/ttya\*U.
3586 Read and write access is required on the device node, an exclusive open is
3587 attempted on the node to mark the connection line as busy.
3588 An optional parameter is allowed consisting of a comma separated list of flags
3589 in the notation used by stty(1):
3591 .IP <baud_rate>         
3592 Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed.
3593 .IP "cs8 or cs7"
3594 Specify the transmission of eight (or seven) bits per byte.
3595 .IP "ixon or -ixon"
3596 Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data.
3597 .IP "ixoff or -ixoff"
3598 Enables (or disables) software flow-control for receiving data.
3599 .IP "istrip or -istrip"
3600 Clear (or keep) the eight bit in each received byte.
3602 You may want to specify as many of these options as applicable. Unspecified
3603 options cause the terminal driver to make up the parameter values of the
3604 connection.  These values are system dependent and may be in defaults or values
3605 saved from a previous connection.
3607 For tty windows, the 
3608 .B info
3609 command shows some of the modem control lines
3610 in the status line. These may include `RTS', `CTS', 'DTR', `DSR', `CD' and more.
3611 This depends on the available ioctl()'s and system header files as well as the
3612 on the physical capabilities of the serial board. 
3613 Signals that are logical low (inactive) have their name preceded by
3614 an exclamation mark (!), otherwise the signal is logical high (active).
3615 Signals not supported by the hardware but available to the ioctl() interface
3616 are usually shown low. 
3618 When the CLOCAL status bit is true, the whole set of modem signals is placed 
3619 inside curly braces ({ and }).
3620 When the CRTSCTS or TIOCSOFTCAR bit is set, the signals `CTS' or `CD' 
3621 are shown in parenthesis, respectively. 
3623 For tty windows, the command
3624 .B break
3625 causes the Data transmission line (TxD) to go low for a specified period of
3626 time. This is expected to be interpreted as break signal on the other side.
3627 No data is sent and no modem control line is changed when a 
3628 .B break
3629 is issued.
3632 .IP \(bu
3633 If the first parameter is \*Q//telnet\*U, the second parameter is expected to
3634 be a host name, and an optional third parameter may specify a TCP port number
3635 (default decimal 23).  Screen will connect to a server listening on the remote
3636 host and use the telnet protocol to communicate with that server.
3639 For telnet windows, the command
3640 .B info
3641 shows details about the connection in square brackets ([ and ]) at the end of
3642 the status line. 
3644 .IP b
3645 BINARY. The connection is in binary mode.
3646 .IP e
3647 ECHO. Local echo is disabled.
3648 .IP c
3649 SGA. The connection is in `character mode' (default: `line mode').
3650 .IP t
3651 TTYPE. The terminal type has been requested by the remote host.
3652 Screen sends the name \*Qscreen\*U unless instructed otherwise (see also
3653 the command `term').
3654 .IP w
3655 NAWS. The remote site is notified about window size changes.
3656 .IP f
3657 LFLOW. The remote host will send flow control information.
3658 (Ignored at the moment.)
3660 Additional flags for debugging are x, t and n (XDISPLOC, TSPEED and
3661 NEWENV).
3663 For telnet windows, the command
3664 .B break
3665 sends the telnet code IAC BREAK (decimal 243) to the remote host.
3668 This window type is only available if
3669 .I screen
3670 was compiled with the BUILTIN_TELNET option defined.
3674 .SH "STRING ESCAPES"
3675 Screen provides an escape mechanism to insert information like the
3676 current time into messages or file names. The escape character
3677 is '%' with one exception: inside of a window's hardstatus '^%' ('^E')
3678 is used instead.
3680 Here is the full list of supported escapes:
3681 .IP %
3682 the escape character itself
3683 .IP a
3684 either 'am' or 'pm'
3685 .IP A
3686 either 'AM' or 'PM'
3687 .IP c
3688 current time HH:MM in 24h format
3689 .IP C
3690 current time HH:MM in 12h format
3691 .IP d
3692 day number
3693 .IP D
3694 weekday name
3695 .IP f
3696 flags of the window, see \*Qwindows\*U for meanings of the various flags
3697 .IP F
3698 sets %? to true if the window has the focus
3699 .IP h
3700 hardstatus of the window
3701 .IP H
3702 hostname of the system
3703 .IP l
3704 current load of the system
3705 .IP m
3706 month number
3707 .IP M
3708 month name
3709 .IP n
3710 window number
3711 .IP P
3712 sets %? to true if the current region is in copy/paste mode
3713 .IP S
3714 session name
3715 .IP s
3716 seconds
3717 .IP t
3718 window title
3719 .IP u
3720 all other users on this window
3721 .IP w
3722 all window numbers and names. With '-' qualifier: up to the current
3723 window; with '+' qualifier: starting with the window after the current
3724 one.
3725 .IP W
3726 all window numbers and names except the current one
3727 .IP y
3728 last two digits of the year number
3729 .IP Y
3730 full year number
3731 .IP ?
3732 the part to the next '%?' is displayed only if a '%' escape
3733 inside the part expands to a non-empty string
3734 .IP :
3735 else part of '%?'
3736 .IP =
3737 pad the string to the display's width (like TeX's hfill). If a
3738 number is specified, pad to the percentage of the window's width.
3739 A '0' qualifier tells screen to treat the number as absolute position.
3740 You can specify to pad relative to the last absolute pad position
3741 by adding a '+' qualifier or to pad relative to the right margin
3742 by using '-'. The padding truncates the string if the specified
3743 position lies before the current position. Add the 'L' qualifier
3744 to change this.
3745 .IP <
3746 same as '%=' but just do truncation, do not fill with spaces
3747 .IP >
3748 mark the current text position for the next truncation. When
3749 screen needs to do truncation, it tries to do it in a way that
3750 the marked position gets moved to the specified percentage of
3751 the output area. (The area starts from the last absolute pad
3752 position and ends with the position specified by the truncation
3753 operator.) The 'L' qualifier tells screen to mark the truncated
3754 parts with '...'.
3755 .IP {
3756 attribute/color modifier string terminated by the next \*Q}\*U
3757 .IP `
3758 Substitute with the output of a 'backtick' command. The length
3759 qualifier is misused to identify one of the commands.
3761 The 'c' and 'C' escape may be qualified with a '0' to make 
3762 .I screen 
3763 use zero instead of space as fill character. The '0' qualifier
3764 also makes the '=' escape use absolute positions. The 'n' and '='
3765 escapes understand
3766 a length qualifier (e.g. '%3n'), 'D' and 'M' can be prefixed with 'L'
3767 to generate long names, 'w' and 'W' also show the window flags
3768 if 'L' is given.
3770 An attribute/color modifier is is used to change the attributes or the
3771 color settings. Its format
3772 is \*Q[attribute modifier] [color description]\*U. The attribute modifier
3773 must be prefixed by a change type indicator if it can be confused with
3774 a color description. The following change types are known:
3775 .IP +
3776 add the specified set to the current attributes
3777 .IP -
3778 remove the set from the current attributes
3779 .IP !
3780 invert the set in the current attributes
3781 .IP =
3782 change the current attributes to the specified set
3784 The attribute set can either be specified as a hexadecimal number or
3785 a combination of the following letters:
3786 .IP d
3788 .PD 0
3789 .IP u
3790 underline
3791 .IP b
3792 bold
3793 .IP r
3794 reverse
3795 .IP s
3796 standout
3797 .IP B
3798 blinking
3801 Colors are coded either as a hexadecimal number or two letters specifying
3802 the desired background and foreground color (in that order). The following
3803 colors are known:
3804 .IP k
3805 black
3806 .PD 0
3807 .IP r
3809 .IP g
3810 green
3811 .IP y
3812 yellow
3813 .IP b
3814 blue
3815 .IP m
3816 magenta
3817 .IP c
3818 cyan
3819 .IP w
3820 white
3821 .IP d
3822 default color
3823 .IP .
3824 leave color unchanged
3827 The capitalized versions of the letter specify bright colors. You can also
3828 use the pseudo-color 'i' to set just the brightness and leave the color
3829 unchanged.
3831 A one digit/letter color description is treated as foreground or
3832 background color dependent on the current attributes: if reverse mode is
3833 set, the background color is changed instead of the foreground color.
3834 If you don't like this, prefix the color with a \*Q.\*U. If you want
3835 the same behavior for two-letter color descriptions, also prefix them
3836 with a \*Q.\*U.
3838 As a special case, \*Q%{-}\*U restores the attributes and colors that
3839 were set before the last change was made (i.e., pops one level of the
3840 color-change stack).
3842 Examples:
3843 .IP "\*QG\*U"
3844 set color to bright green
3845 .IP "\*Q+b r\*U"
3846 use bold red
3847 .IP "\*Q= yd\*U"
3848 clear all attributes, write in default color on yellow background.
3849 .IP "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
3850 The available windows centered at the current window and truncated to
3851 the available width. The current window is displayed white on blue.
3852 This can be used with \*Qhardstatus alwayslastline\*U.
3853 .IP "%?%F%{.R.}%?%3n %t%? [%h]%?"
3854 The window number and title and the window's hardstatus, if one is set.
3855 Also use a red background if this is the active focus. Useful for
3856 \*Qcaption string\*U.
3857 .SH "FLOW-CONTROL"
3858 Each window has a flow-control setting that determines how
3859 .I screen
3860 deals with
3861 the XON and XOFF characters (and perhaps the interrupt character).
3862 When flow-control is turned off,
3863 .I screen
3864 ignores the XON and XOFF characters,
3865 which allows the user to send them to the current program by simply typing
3866 them (useful for the \fIemacs\fP editor, for instance).
3867 The trade-off is that it will take longer for output from a \*Qnormal\*U
3868 program to pause in response to an XOFF.
3869 With flow-control turned on, XON and XOFF characters are used to immediately
3870 pause the output of the current window.
3871 You can still send these characters to the current program, but you must use
3872 the appropriate two-character
3873 .I screen
3874 commands (typically \*QC-a q\*U (xon)
3875 and \*QC-a s\*U (xoff)).
3876 The xon/xoff commands are also useful for typing C-s and C-q past a terminal
3877 that intercepts these characters.
3879 Each window has an initial flow-control value set with either the
3880 .B \-f
3881 option or the \*Qdefflow\*U .screenrc command. Per default the windows
3882 are set to automatic flow-switching.
3883 It can then be toggled between the three states 'fixed on', 'fixed off'
3884 and 'automatic' interactively with the \*Qflow\*U command bound to "C-a f".
3886 The automatic flow-switching mode deals with
3887 flow control using the TIOCPKT mode (like \*Qrlogin\*U does). If
3888 the tty driver does not support TIOCPKT,
3889 .I screen
3890 tries to find out
3891 the right mode based on the current setting of the application
3892 keypad \- when it is enabled, flow-control is turned off and visa versa.
3893 Of course, you can still manipulate flow-control manually when needed.
3895 If you're running with flow-control enabled and find that pressing the
3896 interrupt key (usually C-c) does not interrupt the display until another
3897 6-8 lines have scrolled by, try running
3898 .I screen
3899 with the \*Qinterrupt\*U
3900 option (add the \*Qinterrupt\*U flag to the \*Qflow\*U command in
3901 your .screenrc, or use the
3902 .B \-i
3903 command-line option).
3904 This causes the output that
3905 .I screen
3906 has accumulated from the interrupted program to be flushed.
3907 One disadvantage is that the virtual terminal's memory contains the
3908 non-flushed version of the output, which in rare cases can cause
3909 minor inaccuracies in the output.
3910 For example, if you switch screens and return, or update the screen
3911 with \*QC-a l\*U you would see the version of the output you would
3912 have gotten without \*Qinterrupt\*U being on.
3913 Also, you might need to turn off flow-control (or use auto-flow mode to turn
3914 it off automatically) when running a program that expects you to type the
3915 interrupt character as input, as it is possible to interrupt
3916 the output of the virtual terminal to your physical terminal when flow-control
3917 is enabled.
3918 If this happens, a simple refresh of the screen with \*QC-a l\*U will
3919 restore it.
3920 Give each mode a try, and use whichever mode you find more comfortable.
3923 .SH "TITLES (naming windows)"
3924 You can customize each window's name in the window display (viewed with the
3925 \*Qwindows\*U command (C-a w)) by setting it with one of
3926 the title commands.
3927 Normally the name displayed is the actual command name of the program
3928 created in the window.
3929 However, it is sometimes useful to distinguish various programs of the same
3930 name or to change the name on-the-fly to reflect the current state of
3931 the window.
3933 The default name for all shell windows can be set with the \*Qshelltitle\*U
3934 command in the .screenrc file, while all other windows are created with
3935 a \*Qscreen\*U command and thus can have their name set with the
3936 .B \-t
3937 option.
3938 Interactively, there is the title-string escape-sequence
3939 (<esc>k\fIname\fP<esc>\e) and the \*Qtitle\*U command (C-a A).
3940 The former can be output from an application to control the window's name
3941 under software control, and the latter will prompt for a name when typed.
3942 You can also bind pre-defined names to keys with the \*Qtitle\*U command
3943 to set things quickly without prompting.
3945 Finally,
3946 .I screen
3947 has a shell-specific heuristic that is enabled by setting the window's name
3948 to \*Q\fIsearch|name\fP\*U and arranging to have a null title escape-sequence
3949 output as a part of your prompt.
3950 The \fIsearch\fP portion specifies an end-of-prompt search string, while
3951 the \fIname\fP portion specifies the default shell name for the window.
3952 If the \fIname\fP ends in a `:'
3953 .I screen
3954 will add what it believes to be the current command running in the window
3955 to the end of the window's shell name (e.\|g. \*Q\fIname:cmd\fP\*U).
3956 Otherwise the current command name supersedes the shell name while it is
3957 running.
3959 Here's how it works:  you must modify your shell prompt to output a null
3960 title-escape-sequence (<esc>k<esc>\e) as a part of your prompt.
3961 The last part of your prompt must be the same as the string you specified
3962 for the \fIsearch\fP portion of the title.
3963 Once this is set up,
3964 .I screen
3965 will use the title-escape-sequence to clear the previous command name and
3966 get ready for the next command.
3967 Then, when a newline is received from the shell, a search is made for the
3968 end of the prompt.
3969 If found, it will grab the first word after the matched string and use it
3970 as the command name.
3971 If the command name begins with either '!', '%', or '^'
3972 .I screen
3973 will use the first word on the following line (if found) in preference to
3974 the just-found name.
3975 This helps csh users get better command names when using job control or
3976 history recall commands.
3978 Here's some .screenrc examples:
3980 screen -t top 2 nice top
3982 Adding this line to your .screenrc would start a nice-d version of the
3983 \*Qtop\*U command in window 2 named \*Qtop\*U rather than \*Qnice\*U.
3986         shelltitle '> |csh'
3987         screen 1
3990 These commands would start a shell with the given shelltitle.
3991 The title specified is an auto-title that would expect the prompt and
3992 the typed command to look something like the following:
3994 /usr/joe/src/dir> trn
3996 (it looks after the '> ' for the command name).
3997 The window status would show the name \*Qtrn\*U while the command was
3998 running, and revert to \*Qcsh\*U upon completion.
4000 bind R screen -t '% |root:' su
4002 Having this command in your .screenrc would bind the key
4003 sequence \*QC-a R\*U to the \*Qsu\*U command and give it an
4004 auto-title name of \*Qroot:\*U.
4005 For this auto-title to work, the screen could look something
4006 like this:
4009         % !em
4010         emacs file.c
4013 Here the user typed the csh history command \*Q!em\*U which ran the
4014 previously entered \*Qemacs\*U command.
4015 The window status would show \*Qroot:emacs\*U during the execution
4016 of the command, and revert to simply \*Qroot:\*U at its completion.
4019         bind o title
4020         bind E title ""
4021         bind u title (unknown)
4024 The first binding doesn't have any arguments, so it would prompt you
4025 for a title. when you type \*QC-a o\*U.
4026 The second binding would clear an auto-title's current setting (C-a E).
4027 The third binding would set the current window's title to \*Q(unknown)\*U
4028 (C-a u).
4030 One thing to keep in mind when adding a null title-escape-sequence to
4031 your prompt is that some shells (like the csh) count all the non-control
4032 characters as part of the prompt's length.
4033 If these invisible characters aren't a multiple of 8 then backspacing over
4034 a tab will result in an incorrect display.
4035 One way to get around this is to use a prompt like this:
4037 set prompt='^[[0000m^[k^[\e% '
4039 The escape-sequence \*Q<esc>[0000m\*U not only normalizes the character
4040 attributes, but all the zeros round the length of the invisible characters
4041 up to 8.
4042 Bash users will probably want to echo the escape sequence in the
4043 PROMPT_COMMAND:
4045 PROMPT_COMMAND='printf "\e033k\e033\e134"'
4047 (I used \*Q\134\*U to output a `\e' because of a bug in bash v1.04).
4050 .SH "THE VIRTUAL TERMINAL"
4051 Each window in a 
4052 .I screen
4053 session emulates a VT100 terminal, with some extra functions added. The
4054 VT100 emulator is hard-coded, no other terminal types can be emulated.
4056 Usually
4057 .I screen
4058 tries to emulate as much of the VT100/ANSI standard
4059 as possible. But if your terminal lacks certain capabilities,
4060 the emulation may not be complete. In these cases
4061 .I screen
4062 has to tell the applications that some of the features
4063 are missing. This is no problem on machines using termcap,
4064 because
4065 .I screen
4066 can use the $TERMCAP variable to
4067 customize the standard
4068 .I screen
4069 termcap.
4071 But if you do a
4072 rlogin on another machine or your machine supports only
4073 terminfo this method fails. Because of this,
4074 .I screen
4075 offers a way to deal with these cases. 
4076 Here is how it works:
4078 When 
4079 .I screen
4080 tries to figure out a terminal name for itself,
4081 it first looks
4082 for an entry named \*Qscreen.<term>\*U, where <term> is
4083 the contents of your $TERM variable.
4084 If no such entry exists,
4085 .I screen
4086 tries \*Qscreen\*U (or \*Qscreen-w\*U if the terminal is wide
4087 (132 cols or more)).
4088 If even this entry cannot be found, \*Qvt100\*U is used as a
4089 substitute.
4091 The idea is that if you have a terminal which doesn't
4092 support an important feature (e.g. delete char or clear to EOS)
4093 you can build a new termcap/terminfo entry for
4094 .I screen
4095 (named \*Qscreen.<dumbterm>\*U) in which this capability
4096 has been disabled. If this entry is installed on your
4097 machines you are able to do
4098 a rlogin and still keep the correct termcap/terminfo entry.
4099 The terminal name is put in the $TERM variable
4100 of all new windows.
4101 .I Screen
4102 also sets the $TERMCAP variable reflecting the capabilities
4103 of the virtual terminal emulated. Notice that, however, on machines
4104 using the terminfo database this variable has no effect.
4105 Furthermore, the variable $WINDOW is set to the window number
4106 of each window.
4108 The actual set of capabilities supported by the virtual terminal
4109 depends on the capabilities supported by the physical terminal.
4110 If, for instance, the physical terminal does not support underscore mode,
4111 .I screen
4112 does not put the `us' and `ue' capabilities into the window's $TERMCAP
4113 variable, accordingly.
4114 However, a minimum number of capabilities must be supported by a
4115 terminal in order to run
4116 .IR screen ;
4117 namely scrolling, clear screen, and direct cursor addressing
4118 (in addition,
4119 .I screen
4120 does not run on hardcopy terminals or on terminals that over-strike).
4122 Also, you can customize the $TERMCAP value used by
4123 .I screen
4124 by using the \*Qtermcap\*U .screenrc command, or
4125 by defining the variable $SCREENCAP prior to startup.
4126 When the is latter defined, its value will be copied verbatim into each
4127 window's $TERMCAP variable.
4128 This can either be the full terminal definition, or a filename where the
4129 terminal \*Qscreen\*U (and/or \*Qscreen-w\*U) is defined.
4131 Note that 
4132 .I screen
4133 honors the \*Qterminfo\*U .screenrc command if the system uses the
4134 terminfo database rather than termcap.
4136 When the boolean `G0' capability is present in the termcap entry
4137 for the terminal on which
4138 .I screen
4139 has been called, the terminal emulation of
4140 .I screen
4141 supports multiple character sets.
4142 This allows an application to make use of, for instance,
4143 the VT100 graphics character set or national character sets.
4144 The following control functions from ISO 2022 are supported:
4145 \fIlock shift G0\fP (\fISI\fP), \fIlock shift G1\fP (\fISO\fP),
4146 \fIlock shift G2\fP, \fIlock shift G3\fP, \fIsingle shift G2\fP,
4147 and \fIsingle shift G3\fP.
4148 When a virtual terminal is created or reset, the ASCII character
4149 set is designated as \fIG0\fP through \fIG3\fP.
4150 When the `G0' capability is present,
4151 .I screen
4152 evaluates the capabilities
4153 `S0', `E0', and `C0' if present. `S0' is the sequence the terminal uses
4154 to enable and start the graphics character set rather than \fISI\fP. 
4155 `E0' is the corresponding replacement for \fISO\fP. `C0' gives a character
4156 by character translation string that is used during semi-graphics mode. This 
4157 string is built like the `acsc' terminfo capability.
4159 When the `po' and `pf' capabilities are present in the terminal's
4160 termcap entry, applications running in a
4161 .I screen
4162 window can send output to the printer port of the terminal.
4163 This allows a user to have an application in one window
4164 sending output to a printer connected to the terminal, while all
4165 other windows are still active (the printer port is enabled
4166 and disabled again for each chunk of output).
4167 As a side-effect, programs running in different windows can
4168 send output to the printer simultaneously.
4169 Data sent to the printer is not displayed in the window.  The 
4170 .I info
4171 command displays a line starting `PRIN' while the printer is active.
4173 .I Screen
4174 maintains a hardstatus line for every window. If a window
4175 gets selected, the display's hardstatus will be updated to match
4176 the window's hardstatus line. If the display has no hardstatus
4177 the line will be displayed as a standard 
4178 .I screen 
4179 message.
4180 The hardstatus line can be changed with the ANSI Application
4181 Program Command (APC): \*QESC_<string>ESC\e\*U. As a convenience
4182 for xterm users the sequence \*QESC]0..2;<string>^G\*U is
4183 also accepted.
4185 Some capabilities are only put into the $TERMCAP
4186 variable of the virtual terminal if they can be efficiently
4187 implemented by the physical terminal.
4188 For instance, `dl' (delete line) is only put into the $TERMCAP
4189 variable if the terminal supports either delete line itself or
4190 scrolling regions. Note that this may provoke confusion, when 
4191 the session is reattached on a different terminal, as the value
4192 of $TERMCAP cannot be modified by parent processes.
4194 The "alternate screen" capability is not enabled by default.
4195 Set the \fBaltscreen\fP .screenrc command to enable it.
4197 The following is a list of control sequences recognized by
4198 .IR screen .
4199 \*Q(V)\*U and \*Q(A)\*U indicate VT100-specific and ANSI- or
4200 ISO-specific functions, respectively.
4202 .ta 22n
4203 .TP 27
4204 .B "ESC E"
4205 Next Line
4206 .TP 27
4207 .B "ESC D"
4208 Index
4209 .TP 27
4210 .B "ESC M"
4211 Reverse Index
4212 .TP 27
4213 .B "ESC H"
4214 Horizontal Tab Set
4215 .TP 27
4216 .B "ESC Z"
4217 Send VT100 Identification String
4218 .TP 27
4219 .BR "ESC 7" "   (V)"
4220 Save Cursor and Attributes
4221 .TP 27
4222 .BR "ESC 8" "   (V)"
4223 Restore Cursor and Attributes
4224 .TP 27
4225 .BR "ESC [s" "  (A)"
4226 Save Cursor and Attributes
4227 .TP 27
4228 .BR "ESC [u" "  (A)"
4229 Restore Cursor and Attributes
4230 .TP 27
4231 .B "ESC c"
4232 Reset to Initial State
4233 .TP 27
4234 .B "ESC g"
4235 Visual Bell
4236 .TP 27
4237 .B "ESC \fPPn\fB p"
4238 Cursor Visibility (97801)
4239 .TP 27
4240 \h'\w'ESC 'u'Pn = \fB6\fP
4241 Invisible
4242 .TP 27
4243 \h'\w'ESC Pn = 'u'\fB7\fP
4244 Visible
4245 .TP 27
4246 .BR "ESC =" "   (V)"
4247 Application Keypad Mode
4248 .TP 27
4249 .BR "ESC >" "   (V)"
4250 Numeric Keypad Mode
4251 .TP 27
4252 .BR "ESC # 8" " (V)"
4253 Fill Screen with E's
4254 .TP 27
4255 .BR "ESC \e" "  (A)"
4256 String Terminator
4257 .TP 27
4258 .BR "ESC ^" "   (A)"
4259 Privacy Message String (Message Line)
4260 .TP 27
4261 .B "ESC !"
4262 Global Message String (Message Line)
4263 .TP 27
4264 .B "ESC k"
4265 A.\|k.\|a. Definition String
4266 .TP 27
4267 .BR "ESC P" "   (A)"
4268 Device Control String.
4269 Outputs a string directly to the host
4270 terminal without interpretation.
4271 .TP 27
4272 .BR "ESC _" "   (A)"
4273 Application Program Command (Hardstatus)
4274 .TP 27
4275 .BR "ESC ] 0 ; string ^G" "     (A)"
4276 Operating System Command (Hardstatus, xterm title hack)
4277 .TP 27
4278 .BR "ESC ] 83 ; cmd ^G" "       (A)"
4279 Execute screen command. This only works if multi-user support is
4280 compiled into screen. The pseudo-user \*Q:window:\*U is used to
4281 check the access control list. Use \*Qaddacl :window: -rwx #?\*U to
4282 create a user with no rights and allow only the needed commands.
4283 .TP 27
4284 .BR "Control-N" "       (A)"
4285 Lock Shift G1 (SO)
4286 .TP 27
4287 .BR "Control-O" "       (A)"
4288 Lock Shift G0 (SI)
4289 .TP 27
4290 .BR "ESC n" "   (A)"
4291 Lock Shift G2
4292 .TP 27
4293 .BR "ESC o" "   (A)"
4294 Lock Shift G3
4295 .TP 27
4296 .BR "ESC N" "   (A)"
4297 Single Shift G2
4298 .TP 27
4299 .BR "ESC O" "   (A)"
4300 Single Shift G3
4301 .TP 27
4302 .BR "ESC ( \fPPcs" "    (A)"
4303 Designate character set as G0
4304 .TP 27
4305 .BR "ESC ) \fPPcs" "    (A)"
4306 Designate character set as G1
4307 .TP 27
4308 .BR "ESC * \fPPcs" "    (A)"
4309 Designate character set as G2
4310 .TP 27
4311 .BR "ESC + \fPPcs" "    (A)"
4312 Designate character set as G3
4313 .TP 27
4314 .B "ESC [ \fPPn\fB ; \fPPn\fB H"
4315 Direct Cursor Addressing
4316 .TP 27
4317 .B "ESC [ \fPPn\fB ; \fPPn\fB f"
4318 same as above
4319 .TP 27
4320 .B "ESC [ \fPPn\fB J"
4321 Erase in Display
4322 .TP 27
4323 \h'\w'ESC [ 'u'Pn = None or \fB0\fP
4324 From Cursor to End of Screen
4325 .TP 27
4326 \h'\w'ESC [ Pn = 'u'\fB1\fP
4327 From Beginning of Screen to Cursor
4328 .TP 27
4329 \h'\w'ESC [ Pn = 'u'\fB2\fP
4330 Entire Screen
4331 .TP 27
4332 .B "ESC [ \fPPn\fB K"
4333 Erase in Line
4334 .TP 27
4335 \h'\w'ESC [ 'u'Pn = None or \fB0\fP
4336 From Cursor to End of Line
4337 .TP 27
4338 \h'\w'ESC [ Pn = 'u'\fB1\fP
4339 From Beginning of Line to Cursor
4340 .TP 27
4341 \h'\w'ESC [ Pn = 'u'\fB2\fP
4342 Entire Line
4343 .TP 27
4344 .B "ESC [ \fPPn\fB X"
4345 Erase character
4346 .TP 27
4347 .B "ESC [ \fPPn\fB A"
4348 Cursor Up
4349 .TP 27
4350 .B "ESC [ \fPPn\fB B"
4351 Cursor Down
4352 .TP 27
4353 .B "ESC [ \fPPn\fB C"
4354 Cursor Right
4355 .TP 27
4356 .B "ESC [ \fPPn\fB D"
4357 Cursor Left
4358 .TP 27
4359 .B "ESC [ \fPPn\fB E"
4360 Cursor next line
4361 .TP 27
4362 .B "ESC [ \fPPn\fB F"
4363 Cursor previous line
4364 .TP 27
4365 .B "ESC [ \fPPn\fB G"
4366 Cursor horizontal position
4367 .TP 27
4368 .B "ESC [ \fPPn\fB `"
4369 same as above
4370 .TP 27
4371 .B "ESC [ \fPPn\fB d"
4372 Cursor vertical position
4373 .TP 27
4374 .B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB m"
4375 Select Graphic Rendition
4376 .TP 27
4377 \h'\w'ESC [ 'u'Ps = None or \fB0\fP
4378 Default Rendition
4379 .TP 27
4380 \h'\w'ESC [ Ps = 'u'\fB1\fP
4381 Bold
4382 .TP 27
4383 \h'\w'ESC [ Ps = 'u'\fB2\fP     (A)
4384 Faint
4385 .TP 27
4386 \h'\w'ESC [ Ps = 'u'\fB3\fP     (A)
4387 \fIStandout\fP Mode (ANSI: Italicized)
4388 .TP 27
4389 \h'\w'ESC [ Ps = 'u'\fB4\fP
4390 Underlined
4391 .TP 27
4392 \h'\w'ESC [ Ps = 'u'\fB5\fP
4393 Blinking
4394 .TP 27
4395 \h'\w'ESC [ Ps = 'u'\fB7\fP
4396 Negative Image
4397 .TP 27
4398 \h'\w'ESC [ Ps = 'u'\fB22\fP    (A)
4399 Normal Intensity
4400 .TP 27
4401 \h'\w'ESC [ Ps = 'u'\fB23\fP    (A)
4402 \fIStandout\fP Mode off (ANSI: Italicized off)
4403 .TP 27
4404 \h'\w'ESC [ Ps = 'u'\fB24\fP    (A)
4405 Not Underlined
4406 .TP 27
4407 \h'\w'ESC [ Ps = 'u'\fB25\fP    (A)
4408 Not Blinking
4409 .TP 27
4410 \h'\w'ESC [ Ps = 'u'\fB27\fP    (A)
4411 Positive Image
4412 .TP 27
4413 \h'\w'ESC [ Ps = 'u'\fB30\fP    (A)
4414 Foreground Black
4415 .TP 27
4416 \h'\w'ESC [ Ps = 'u'\fB31\fP    (A)
4417 Foreground Red
4418 .TP 27
4419 \h'\w'ESC [ Ps = 'u'\fB32\fP    (A)
4420 Foreground Green
4421 .TP 27
4422 \h'\w'ESC [ Ps = 'u'\fB33\fP    (A)
4423 Foreground Yellow
4424 .TP 27
4425 \h'\w'ESC [ Ps = 'u'\fB34\fP    (A)
4426 Foreground Blue
4427 .TP 27
4428 \h'\w'ESC [ Ps = 'u'\fB35\fP    (A)
4429 Foreground Magenta
4430 .TP 27
4431 \h'\w'ESC [ Ps = 'u'\fB36\fP    (A)
4432 Foreground Cyan
4433 .TP 27
4434 \h'\w'ESC [ Ps = 'u'\fB37\fP    (A)
4435 Foreground White
4436 .TP 27
4437 \h'\w'ESC [ Ps = 'u'\fB39\fP    (A)
4438 Foreground Default
4439 .TP 27
4440 \h'\w'ESC [ Ps = 'u'\fB40\fP    (A)
4441 Background Black
4442 .TP 27
4443 \h'\w'ESC [ Ps = 'u'\fB...\fP
4445 .TP 27
4446 \h'\w'ESC [ Ps = 'u'\fB49\fP    (A)
4447 Background Default
4448 .TP 27
4449 .B "ESC [ \fPPn\fB g"
4450 Tab Clear
4451 .TP 27
4452 \h'\w'ESC [ 'u'Pn = None or \fB0\fP
4453 Clear Tab at Current Position
4454 .TP 27
4455 \h'\w'ESC [ Ps = 'u'\fB3\fP
4456 Clear All Tabs
4457 .TP 27
4458 .BR "ESC [ \fPPn\fB ; \fPPn\fB r" "     (V)"
4459 Set Scrolling Region
4460 .TP 27
4461 .BR "ESC [ \fPPn\fB I" "        (A)"
4462 Horizontal Tab
4463 .TP 27
4464 .BR "ESC [ \fPPn\fB Z" "        (A)"
4465 Backward Tab
4466 .TP 27
4467 .BR "ESC [ \fPPn\fB L" "        (A)"
4468 Insert Line
4469 .TP 27
4470 .BR "ESC [ \fPPn\fB M" "        (A)"
4471 Delete Line
4472 .TP 27
4473 .BR "ESC [ \fPPn\fB @" "        (A)"
4474 Insert Character
4475 .TP 27
4476 .BR "ESC [ \fPPn\fB P" "        (A)"
4477 Delete Character
4478 .TP 27
4479 .B "ESC [ \fPPn\fB S"
4480 Scroll Scrolling Region Up
4481 .TP 27
4482 .B "ESC [ \fPPn\fB T"
4483 Scroll Scrolling Region Down
4484 .TP 27
4485 .B "ESC [ \fPPn\fB ^"
4486 same as above
4487 .TP 27
4488 .B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB h"
4489 Set Mode
4490 .TP 27
4491 .B "ESC [ \fPPs\fB ;\fP...\fB; \fPPs\fB l"
4492 Reset Mode
4493 .TP 27
4494 \h'\w'ESC [ 'u'Ps = \fB4\fP     (A)
4495 Insert Mode
4496 .TP 27
4497 \h'\w'ESC [ Ps = 'u'\fB20\fP    (A)
4498 \fIAutomatic Linefeed\fP Mode
4499 .TP 27
4500 \h'\w'ESC [ Ps = 'u'\fB34\fP
4501 Normal Cursor Visibility
4502 .TP 27
4503 \h'\w'ESC [ Ps = 'u'\fB?1\fP    (V)
4504 Application Cursor Keys
4505 .TP 27
4506 \h'\w'ESC [ Ps = 'u'\fB?3\fP    (V)
4507 Change Terminal Width to 132 columns
4508 .TP 27
4509 \h'\w'ESC [ Ps = 'u'\fB?5\fP    (V)
4510 Reverse Video
4511 .TP 27
4512 \h'\w'ESC [ Ps = 'u'\fB?6\fP    (V)
4513 \fIOrigin\fP Mode
4514 .TP 27
4515 \h'\w'ESC [ Ps = 'u'\fB?7\fP    (V)
4516 \fIWrap\fP Mode
4517 .TP 27
4518 \h'\w'ESC [ Ps = 'u'\fB?9\fP
4519 X10 mouse tracking
4520 .TP 27
4521 \h'\w'ESC [ Ps = 'u'\fB?25\fP   (V)
4522 Visible Cursor
4523 .TP 27
4524 \h'\w'ESC [ Ps = 'u'\fB?47\fP
4525 Alternate Screen (old xterm code)
4526 .TP 27
4527 \h'\w'ESC [ Ps = 'u'\fB?1000\fP (V)
4528 VT200 mouse tracking
4529 .TP 27
4530 \h'\w'ESC [ Ps = 'u'\fB?1047\fP
4531 Alternate Screen (new xterm code)
4532 .TP 27
4533 \h'\w'ESC [ Ps = 'u'\fB?1049\fP
4534 Alternate Screen (new xterm code)
4535 .TP 27
4536 .BR "ESC [ 5 i" "       (A)"
4537 Start relay to printer (ANSI Media Copy)
4538 .TP 27
4539 .BR "ESC [ 4 i" "       (A)"
4540 Stop relay to printer (ANSI Media Copy)
4541 .TP 27
4542 .B "ESC [ 8 ; \fPPh\fB ; \fPPw\fB t"
4543 Resize the window to `Ph' lines and `Pw' columns (SunView special)
4544 .TP 27
4545 .B "ESC [ c"
4546 Send VT100 Identification String
4547 .TP 27
4548 .B "ESC [ x"
4549 Send Terminal Parameter Report
4550 .TP 27
4551 .B "ESC [ > c"
4552 Send VT220 Secondary Device Attributes String
4553 .TP 27
4554 .B "ESC [ 6 n"
4555 Send Cursor Position Report
4558 .SH "INPUT TRANSLATION"
4559 In order to do a full VT100 emulation 
4560 .I screen
4561 has to detect
4562 that a sequence of characters in the input stream was generated
4563 by a keypress on the user's keyboard and insert the VT100
4564 style escape sequence. \fIScreen\fP has a very flexible way of doing
4565 this by making it possible to map arbitrary commands on arbitrary
4566 sequences of characters. For standard VT100 emulation the command
4567 will always insert a string in the input buffer of the window
4568 (see also command \fBstuff\fP in the command table).
4569 Because the sequences generated by a keypress can
4570 change after a reattach from a different terminal type, it is
4571 possible to bind commands to the termcap name of the keys.
4572 \fIScreen\fP will insert the correct binding after each
4573 reattach. See the \fBbindkey\fP command for further details on the
4574 syntax and examples.
4576 Here is the table of the default key bindings. (A) means that the
4577 command is executed if the keyboard is switched into application
4578 mode.
4580 .ta 18n 34n 50n
4582 Key name        Termcap name    Command
4583 \l'54n'
4584 .ta 22n 34n 50n
4585 Cursor up       ku      stuff \e033[A
4586                 stuff \e033OA   (A)
4587 Cursor down     kd      stuff \e033[B
4588                 stuff \e033OB   (A)
4589 Cursor right    kr      stuff \e033[C
4590                 stuff \e033OC   (A)
4591 Cursor left     kl      stuff \e033[D
4592                 stuff \e033OD   (A)
4593 Function key 0  k0      stuff \e033[10~
4594 Function key 1  k1      stuff \e033OP
4595 Function key 2  k2      stuff \e033OQ
4596 Function key 3  k3      stuff \e033OR
4597 Function key 4  k4      stuff \e033OS
4598 Function key 5  k5      stuff \e033[15~
4599 Function key 6  k6      stuff \e033[17~
4600 Function key 7  k7      stuff \e033[18~
4601 Function key 8  k8      stuff \e033[19~
4602 Function key 9  k9      stuff \e033[20~
4603 Function key 10 k;      stuff \e033[21~
4604 Function key 11 F1      stuff \e033[23~
4605 Function key 12 F2      stuff \e033[24~
4606 Home    kh      stuff \e033[1~
4607 End     kH      stuff \e033[4~
4608 Insert  kI      stuff \e033[2~
4609 Delete  kD      stuff \e033[3~
4610 Page up kP      stuff \e033[5~
4611 Page down       kN      stuff \e033[6~
4612 Keypad 0        f0      stuff 0
4613                 stuff \e033Op   (A)
4614 Keypad 1        f1      stuff 1
4615                 stuff \e033Oq   (A)
4616 Keypad 2        f2      stuff 2
4617                 stuff \e033Or   (A)
4618 Keypad 3        f3      stuff 3
4619                 stuff \e033Os   (A)
4620 Keypad 4        f4      stuff 4
4621                 stuff \e033Ot   (A)
4622 Keypad 5        f5      stuff 5
4623                 stuff \e033Ou   (A)
4624 Keypad 6        f6      stuff 6
4625                 stuff \e033Ov   (A)
4626 Keypad 7        f7      stuff 7
4627                 stuff \e033Ow   (A)
4628 Keypad 8        f8      stuff 8
4629                 stuff \e033Ox   (A)
4630 Keypad 9        f9      stuff 9
4631                 stuff \e033Oy   (A)
4632 Keypad +        f+      stuff +
4633                 stuff \e033Ok   (A)
4634 Keypad -        f-      stuff -
4635                 stuff \e033Om   (A)
4636 Keypad *        f*      stuff *
4637                 stuff \e033Oj   (A)
4638 Keypad /        f/      stuff /
4639                 stuff \e033Oo   (A)
4640 Keypad =        fq      stuff =
4641                 stuff \e033OX   (A)
4642 Keypad .        f.      stuff .
4643                 stuff \e033On   (A)
4644 Keypad ,        f,      stuff ,
4645                 stuff \e033Ol   (A)
4646 Keypad enter    fe      stuff \e015
4647                 stuff \e033OM   (A)
4651 .SH SPECIAL TERMINAL CAPABILITIES
4652 The following table describes all terminal capabilities
4653 that are recognized by 
4654 .I screen
4655 and are not in the termcap(5) manual.
4656 You can place these capabilities in your termcap entries (in
4657 `/etc/termcap') or use them with the commands `termcap', `terminfo' and
4658 `termcapinfo' in your screenrc files. It is often not possible to place
4659 these capabilities in the terminfo database.
4661 .ta 5n
4662 .TP 13
4663 .BI LP "        (bool)"
4664 Terminal has VT100 style margins (`magic margins'). Note that
4665 this capability is obsolete because 
4666 .I screen
4667 uses the standard 'xn' instead.
4668 .TP 13
4669 .BI Z0 "        (str)"
4670 Change width to 132 columns.
4671 .TP 13
4672 .BI Z1 "        (str)"
4673 Change width to 80 columns.
4674 .TP 13
4675 .BI WS "        (str)"
4676 Resize display. This capability has the desired width and height as
4677 arguments. \fISunView(tm)\fP example: '\eE[8;%d;%dt'.
4678 .TP 13
4679 .BI NF "        (bool)"
4680 Terminal doesn't need flow control. Send ^S and ^Q direct to
4681 the application. Same as 'flow off'. The opposite of this
4682 capability is 'nx'.
4683 .TP 13
4684 .BI G0 "        (bool)"
4685 Terminal can deal with ISO 2022 font selection sequences.
4686 .TP 13
4687 .BI S0 "        (str)"
4688 Switch charset 'G0' to the specified charset. Default
4689 is '\eE(%.'.
4690 .TP 13
4691 .BI E0 "        (str)"
4692 Switch charset 'G0' back to standard charset. Default
4693 is '\eE(B'.
4694 .TP 13
4695 .BI C0 "        (str)"
4696 Use the string as a conversion table for font '0'. See
4697 the 'ac' capability for more details.
4698 .TP 13
4699 .BI CS "        (str)"
4700 Switch cursor-keys to application mode.
4701 .TP 13
4702 .BI CE "        (str)"
4703 Switch cursor-keys back to normal mode.
4704 .TP 13
4705 .BI AN "        (bool)"
4706 Turn on autonuke. See the 'autonuke' command for more details.
4707 .TP 13
4708 .BI OL "        (num)"
4709 Set the output buffer limit. See the 'obuflimit' command for more details.
4710 .TP 13
4711 .BI KJ "        (str)"
4712 Set the encoding of the terminal. See the 'encoding' command for
4713 valid encodings.
4714 .TP 13
4715 .BI AF "        (str)"
4716 Change character foreground color in an ANSI conform way. This
4717 capability will almost always be set to '\eE[3%dm' ('\eE[3%p1%dm'
4718 on terminfo machines).
4719 .TP 13
4720 .BI AB "        (str)"
4721 Same as 'AF', but change background color.
4722 .TP 13
4723 .BI AX "        (bool)"
4724 Does understand ANSI set default fg/bg color (\eE[39m / \eE[49m).
4725 .TP 13
4726 .BI XC "        (str)"
4727 Describe a translation of characters to strings depending on the
4728 current font. More details follow in the next section.
4729 .TP 13
4730 .BI XT "        (bool)"
4731 Terminal understands special xterm sequences (OSC, mouse tracking).
4732 .TP 13
4733 .BI C8 "        (bool)"
4734 Terminal needs bold to display high-intensity colors (e.g. Eterm).
4735 .TP 13
4736 .BI TF "        (bool)"
4737 Add missing capabilities to the termcap/info entry. (Set by default).
4739 .SH CHARACTER TRANSLATION
4740 \fIScreen\fP has a powerful mechanism to translate characters to arbitrary
4741 strings depending on the current font and terminal type.
4742 Use this feature if you want to work with a common standard character
4743 set (say ISO8851-latin1) even on terminals that scatter the more
4744 unusual characters over several national language font pages.
4746 Syntax:
4748     \fBXC=\fP\fI<charset-mapping>\fP{\fB,,\fP\fI<charset-mapping>\fP}
4749     \fI<charset-mapping>\fP := \fI<designator><template>\fP{\fB,\fP\fI<mapping>\fP}
4750     \fI<mapping>\fP := \fI<char-to-be-mapped><template-arg>\fP
4753 The things in braces may be repeated any number of times.
4755 A \fI<charset-mapping>\fP tells 
4756 .I screen
4757 how to map characters
4758 in font \fI<designator>\fP ('B': Ascii, 'A': UK, 'K': German, etc.)
4759 to strings. Every \fI<mapping>\fP describes to what string a single
4760 character will be translated. A template mechanism is used, as 
4761 most of the time the codes have a lot in common (for example
4762 strings to switch to and from another charset). Each occurrence
4763 of '%' in \fI<template>\fP gets substituted with the \fI<template-arg>\fP
4764 specified together with the character. If your strings are not
4765 similar at all, then use '%' as a template and place the full
4766 string in \fI<template-arg>\fP. A quoting mechanism was added to make
4767 it possible to use a real '%'. The '\e' character quotes the
4768 special characters '\e', '%', and ','.
4770 Here is an example:
4772     termcap hp700 'XC=B\eE(K%\eE(B,\e304[,\e326\e\e\e\e,\e334]'
4774 This tells
4775 .I screen
4776 how to translate ISOlatin1 (charset 'B')
4777 upper case umlaut characters on a hp700 terminal that has a
4778 German charset. '\e304' gets translated to '\eE(K[\eE(B' and so on.
4779 Note that this line gets parsed *three* times before the internal
4780 lookup table is built, therefore a lot of quoting is needed to
4781 create a single '\e'.
4783 Another extension was added to allow more emulation: If a mapping
4784 translates the unquoted '%' char, it will be sent to the terminal
4785 whenever 
4786 .I screen
4787 switches to the corresponding \fI<designator>\fP. In this
4788 special case the template is assumed to be just '%' because
4789 the charset switch sequence and the character mappings normally
4790 haven't much in common.
4792 This example shows one use of the extension:
4794     termcap xterm 'XC=K%,%\eE(B,[\e304,\e\e\e\e\e326,]\e334'
4796 Here, a part of the German ('K') charset is emulated on an xterm.
4797 If 
4798 .I screen
4799 has to change to the 'K' charset, '\eE(B' will be sent
4800 to the terminal, i.e. the ASCII charset is used instead. The
4801 template is just '%', so the mapping is straightforward: '['
4802 to '\e304', '\e' to '\e326', and ']' to '\e334'.
4804 .SH ENVIRONMENT
4805 .PD 0
4806 .IP COLUMNS 15
4807 Number of columns on the terminal (overrides termcap entry).
4808 .IP HOME
4809 Directory in which to look for .screenrc.
4810 .IP LINES 
4811 Number of lines on the terminal (overrides termcap entry).
4812 .IP LOCKPRG
4813 Screen lock program.
4814 .IP NETHACKOPTIONS
4815 Turns on nethack option.
4816 .IP PATH
4817 Used for locating programs to run.
4818 .IP SCREENCAP
4819 For customizing a terminal's TERMCAP value.
4820 .IP SCREENDIR
4821 Alternate socket directory.
4822 .IP SCREENRC
4823 Alternate user screenrc file.
4824 .IP SHELL
4825 Default shell program for opening windows (default \*Q/bin/sh\*U).
4826 .IP STY
4827 Alternate socket name.
4828 .IP SYSSCREENRC
4829 Alternate system screenrc file.
4830 .IP TERM
4831 Terminal name.
4832 .IP TERMCAP
4833 Terminal description.
4834 .IP WINDOW
4835 Window number of a window (at creation time).
4837 .SH FILES
4838 .PD 0
4839 .IP .../screen-4.?.??/etc/screenrc 34
4840 .IP .../screen-4.?.??/etc/etcscreenrc
4841 Examples in the 
4842 .I screen
4843 distribution package for private and global initialization files.
4844 .IP $SYSSCREENRC 
4845 .IP /usr/local/etc/screenrc
4846 .I screen
4847 initialization commands
4848 .IP $SCREENRC
4849 .IP $HOME/.screenrc
4850 Read in after /usr/local/etc/screenrc
4851 .IP $SCREENDIR/S-<login>
4852 .IP /local/screens/S-<login>
4853 Socket directories (default)
4854 .IP /usr/tmp/screens/S-<login>
4855 Alternate socket directories.
4856 .IP "<socket directory>/.termcap"
4857 Written by the "termcap" output function
4858 .IP /usr/tmp/screens/screen-exchange
4860 .IP /tmp/screen-exchange
4861 .I screen
4862 `interprocess communication buffer'
4863 .IP hardcopy.[0-9]
4864 Screen images created by the hardcopy function
4865 .IP screenlog.[0-9]
4866 Output log files created by the log function
4867 .IP /usr/lib/terminfo/?/*
4869 .IP /etc/termcap
4870 Terminal capability databases
4871 .IP /etc/utmp
4872 Login records
4873 .IP $LOCKPRG
4874 Program that locks a terminal.
4877 .SH "SEE ALSO"
4878 termcap(5), utmp(5), vi(1), captoinfo(1), tic(1)
4881 .SH AUTHORS
4882 Originally created by Oliver Laumann, this latest version was
4883 produced by Juergen Weigert, Michael Schroeder, Micah Cowan and
4884 Sadrul Habib Chowdhury.
4886 .SH COPYLEFT
4888 Copyright (c) 2010
4889         Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
4890         Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
4891 Copyright (c) 2008, 2009
4892         Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
4893         Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
4894         Micah Cowan (micah@cowan.name)
4895         Sadrul Habib Chowdhury (sadrul@users.sourceforge.net)
4896 Copyright (C) 1993-2003
4897         Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
4898         Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
4899 Copyright (C) 1987 Oliver Laumann
4902 This program is free software; you can redistribute it and/or modify
4903 it under the terms of the GNU General Public License as published by
4904 the Free Software Foundation; either version 3, or (at your option)
4905 any later version.
4907 This program is distributed in the hope that it will be useful,
4908 but WITHOUT ANY WARRANTY; without even the implied warranty of
4909 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4910 GNU General Public License for more details.
4912 You should have received a copy of the GNU General Public License
4913 along with this program (see the file COPYING); if not, write to the
4914 Free Software Foundation, Inc.,
4915 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
4917 .SH CONTRIBUTORS
4919 Ken Beal (kbeal@amber.ssd.csd.harris.com),
4920 Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de),
4921 Toerless Eckert (eckert@immd4.informatik.uni-erlangen.de), 
4922 Wayne Davison (davison@borland.com),
4923 Patrick Wolfe (pat@kai.com, kailand!pat),
4924 Bart Schaefer (schaefer@cse.ogi.edu),
4925 Nathan Glasser (nathan@brokaw.lcs.mit.edu),
4926 Larry W. Virden (lvirden@cas.org),
4927 Howard Chu (hyc@hanauma.jpl.nasa.gov),
4928 Tim MacKenzie (tym@dibbler.cs.monash.edu.au),
4929 Markku Jarvinen (mta@{cc,cs,ee}.tut.fi),
4930 Marc Boucher (marc@CAM.ORG),
4931 Doug Siebert (dsiebert@isca.uiowa.edu),
4932 Ken Stillson (stillson@tsfsrv.mitre.org),
4933 Ian Frechett (frechett@spot.Colorado.EDU),
4934 Brian Koehmstedt (bpk@gnu.ai.mit.edu),
4935 Don Smith (djs6015@ultb.isc.rit.edu),
4936 Frank van der Linden (vdlinden@fwi.uva.nl),
4937 Martin Schweikert (schweik@cpp.ob.open.de),
4938 David Vrona (dave@sashimi.lcu.com),
4939 E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net),
4940 Matthew Green (mrg@eterna.com.au),
4941 Christopher Williams (cgw@pobox.com),
4942 Matt Mosley (mattm@access.digex.net),
4943 Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU),
4944 Johannes Zellner (johannes@zellner.org),
4945 Pablo Averbuj (pablo@averbuj.com).
4949 .SH VERSION
4950 This is version 4.1.0. Its roots are a merge of a custom version
4951 2.3PR7 by Wayne Davison
4952 and several enhancements to Oliver Laumann's version 2.0. Note that all versions
4953 numbered 2.x are copyright by Oliver Laumann. 
4955 .SH AVAILABILITY
4956 The latest official release of 
4957 .I screen
4958 available via anonymous ftp from gnudist.gnu.org, nic.funet.fi or any other 
4959 .I GNU 
4960 distribution site. The home site of
4961 .I screen
4962 is ftp.uni-erlangen.de, in the directory
4963 pub/utilities/screen. The subdirectory `private' contains the latest beta
4964 testing release. If you want to help, send a note to
4965 screen@uni-erlangen.de.
4967 .SH BUGS
4969 .IP \(bu 3
4970 `dm' (delete mode) and `xs' are not handled
4971 correctly (they are ignored). `xn' is treated as a magic-margin
4972 indicator.
4973 .IP \(bu
4974 .I Screen
4975 has no clue about double-high or double-wide characters.         
4976 But this is the only area where 
4977 .I vttest
4978 is allowed to fail.
4979 .IP \(bu
4980 It is not possible to change the environment variable $TERMCAP when 
4981 reattaching under a different terminal type.
4982 .IP \(bu
4983 The support of terminfo based systems is very limited. Adding extra
4984 capabilities to $TERMCAP may not have any effects.
4985 .IP \(bu
4986 .I Screen
4987 does not make use of hardware tabs.
4988 .IP \(bu
4989 .I Screen
4990 must be installed as set-uid with owner root on most systems in order
4991 to be able to correctly change the owner of the tty device file for
4992 each window.
4993 Special permission may also be required to write the file \*Q/etc/utmp\*U.
4994 .IP \(bu
4995 Entries in \*Q/etc/utmp\*U are not removed when
4996 .I screen
4997 is killed with SIGKILL.
4998 This will cause some programs (like "w" or "rwho")
4999 to advertise that a user is logged on who really isn't.
5000 .IP \(bu
5001 .I Screen
5002 may give a strange warning when your tty has no utmp entry.
5003 .IP \(bu
5004 When the modem line was hung up, 
5005 .I screen
5006 may not automatically detach (or quit)
5007 unless the device driver is configured to send a HANGUP signal. 
5008 To detach a 
5009 .I screen
5010 session use the -D or -d command line option.
5011 .IP \(bu
5012 If a password is set, the command line options -d and -D still detach a 
5013 session without asking.
5014 .IP \(bu
5015 Both \*Qbreaktype\*U and \*Qdefbreaktype\*U change the break generating
5016 method used by all terminal devices. The first should change a window
5017 specific setting, where the latter should change only the default for new 
5018 windows.
5019 .IP \(bu
5020 When attaching to a multiuser session, the user's .screenrc file is not
5021 sourced. Each user's personal settings have to be included in the .screenrc
5022 file from which the session is booted, or have to be changed manually.
5023 .IP \(bu
5024 A weird imagination is most useful to gain full advantage of all the features.
5025 .IP \(bu
5026 Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza to
5027 .BR screen@uni-erlangen.de .