screen
can trap flow control characters or pass them to the
program, as you see fit. This is useful when your terminal wants to use
XON/XOFF flow control and you are running a program which wants to use
^S/^Q for other purposes (i.e. emacs
).
screen
flow control
screen
flow control settings
Each window has a flow-control setting that determines how screen deals
with the XON and XOFF characters (and perhaps the interrupt character).
When flow-control is turned off, screen ignores the XON and XOFF
characters, which allows the user to send them to the current program by
simply typing them (useful for the emacs
editor, for instance).
The trade-off is that it will take longer for output from a
"normal" program to pause in response to an XOFF. With
flow-control turned on, XON and XOFF characters are used to immediately
pause the output of the current window. You can still send these
characters to the current program, but you must use the appropriate
two-character screen commands (typically C-a q (xon) and C-a
s (xoff)). The xon/xoff commands are also useful for typing C-s and
C-q past a terminal that intercepts these characters.
Each window has an initial flow-control value set with either the
`-f' option or the defflow
command. By default the
windows are set to automatic flow-switching. It can then be toggled
between the three states 'fixed on', 'fixed off' and 'automatic'
interactively with the flow
command bound to C-a f.
The automatic flow-switching mode deals with flow control using the
TIOCPKT mode (like rlogin
does). If the tty driver does not
support TIOCPKT, screen tries to determine the right mode based on the
current setting of the application keypad -- when it is enabled,
flow-control is turned off and visa versa. Of course, you can still
manipulate flow-control manually when needed.
If you're running with flow-control enabled and find that pressing the
interrupt key (usually C-c) does not interrupt the display until another
6-8 lines have scrolled by, try running screen with the `interrupt'
option (add the `interrupt' flag to the flow
command in your
.screenrc, or use the `-i' command-line option). This causes the
output that screen
has accumulated from the interrupted program
to be flushed. One disadvantage is that the virtual terminal's memory
contains the non-flushed version of the output, which in rare cases can
cause minor inaccuracies in the output. For example, if you switch
screens and return, or update the screen with C-a l you would see
the version of the output you would have gotten without `interrupt'
being on. Also, you might need to turn off flow-control (or use
auto-flow mode to turn it off automatically) when running a program that
expects you to type the interrupt character as input, as the
`interrupt' parameter only takes effect when flow-control is
enabled. If your program's output is interrupted by mistake, a simple
refresh of the screen with C-a l will restore it. Give each mode
a try, and use whichever mode you find more comfortable.
flow
command except that the default setting for new
windows is changed. Initial setting is `auto'.
Specifying flow auto interrupt
has the same effect as the
command-line options `-fa' and `-i'.
Note that if `interrupt' is enabled, all existing displays are
changed immediately to forward interrupt signals.