How to disable ^C from being echoed on Linux on Ctrl-C

Posted by pts on Super User See other posts from Super User or by pts
Published on 2010-05-30T17:54:07Z Indexed on 2010/05/30 18:03 UTC
Read the original article Hit count: 220

Filed under:
|
|
|
|

When I press Ctrl-C in any pseudoterminal (xterm, gnome-terminal, rxvt, text console and SSH) in Karmic Koala, the string ^C gets echoed to the terminal in Ubuntu Karmic Koala. This hasn't happened in Ubuntu Jaunty Jackalope. I'd like to get rid of the extra ^C. Example:

$ cat
foo
foo
^C
$ _

I got the above by typing C, A, T, Enter, F, O, O, Enter, Ctrl-C. I want to get rid of the ^C, and get this for the same keypresses:

$ cat
foo
foo

$ _

I tried setting stty -echoctl, which created a single-character HT (or a box with Unicode 0003 in it) instead of the ^C. I want to see absolutely nothing when I press Ctrl-C. I'm using

Linux linux 2.6.31-20-generic-pae #57-Ubuntu SMP Mon Feb 8 10:23:59 UTC 2010 i686 GNU/Linux

© Super User or respective owner

Related posts about linux

Related posts about terminal