14 May 2009

Ctrl-C no longer works in terminal on Ubuntu

The programmers behind gnome-terminal seem to have changed something to do with the way ctrl-c works. Now if you want to cancel a program that has the focus of the terminal and you hit ctrl-c then nothing will happen. That’s because the gnome terminal is trying to copy text to the clipboard - perhaps your gnome-terminal’s “copy to clipboard” command is set to ctrl-shift-c in which case you won’t notice this problem!

The gnome-terminal used to “copy to clipboard” only if you had text selected and would issue a ctrl-c (and abort/cancel) if you had none selected. Now it always attempts to “copy to clipboard” regardless of whether you have text selected or not. The only way around this right now is to go into your keyboard shortcuts (in the Edit menu) and set Edit | Copy to something other than ctrl-c, I suggest the original gnome-terminal default of shift-ctrl-c.

Shame, since ctrl-c is used everywhere else for copy!

Alternatively, some programs will also abort if you use ctrl-\ (that’s a backslash) and some with ctrl-d, other than that you’ll have to learn each program’s individual quit command (if they have one). For “top” it is q.

Hope that helps!

comments powered by Disqus