User Tools

Site Tools


system:console:stty

This is an old revision of the document!


stty

stty gives control over the terminal settings.

To view the running settings, use:

stty -a

Custimization

Defining Control Sequences

The syntax is:

stty <Signal> <Sequence>
  • Signal is one of the predefined ones, see stty(1).
  • Sequence maybe anything possible, but a good choice is defining an Escape Sequence (beginning with ^).

Example:

 stty stop ^Y

NB: normal Sequences are interpreted case sensitive, but Escape Sequences not!

The ''^S''-Problem

You typed C-s? Terminal hangs? No wonder, you sent a stop signal to it.

Do not even try, typing reset does not help you.

To get the solution watch at stty -a:

% stty -a
speed 38400 baud; rows 51; columns 89; line = 54;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany
imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke 

Interesting are the values for stop and start:

start = ^Q; 
stop = ^S;

So, typing C-q should suffice to rescue your terminal session.

system/console/stty.1179412351.txt.gz · Last modified: 2007/05/17 14:32 by 127.0.0.1