How to disable ^C from being echoed on Linux on Ctrl-C
- by pts
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