When I am using emacs under GNU Screen, if I call C-x C-s screen hangs and does not respond to any keyboard input.

I can't reproduce this, but at least one time per day I have to kill my screen session and restart it.

How can I solve this?

Thanks

link|improve this question

50% accept rate
Which Unix? There are many differences in terminal device handling between Linux, BSD, Solaris, ... – grawity Feb 28 '11 at 17:24
I am actually using Putty to ssh into a Ubuntu Server LTS instance. – simao Feb 28 '11 at 18:12
feedback

1 Answer

up vote 6 down vote accepted

^S is the "Pause transmission" (XOFF) flow control character. Usually it's handled by the tty driver, or in this case Screen.

When you launch Emacs, it normally takes over most of the special characters (not just flow control, but also the usual ^C "Interrupt", for example).

  • Use C-a :flow off to disable flow-control for this Screen window.

    Confirm with C-a :info (look for -flow in the pop-up).

  • If it doesn't help, try stty -ixon or stty stop undef.

    (You can do it from a separate window using stty -f /dev/tty1 or stty </dev/tty1.)

On my system (Linux), Screen does notice when flow control is disabled for the tty. Your OS might have some limitations, though.

link|improve this answer
:flow off worked. thanks! any way I can make it permanent? – simao Feb 28 '11 at 18:17
@simao: See defflow in the manual page of screen. – grawity Feb 28 '11 at 18:52
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.