Ubuntu: Ctrl-C no longer works in terminal
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!
Related posts
Linux: Bash Scripting: Search Bash History
Faster internet connection with a local DNS cache
How to temporarily disable the touchpad while typing
Recursive Find and Replace in Multiple Files
How to stop Spotify on Linux audio skipping
May 14th, 2009 at 11:59 am
When I read the headline I thought I the classic use of Ctrl-C had changed, i.e. sending SIGINT signal.
I’m using Ubuntu 9.04 with default keyboard shortcuts and nothing appears to have changed for me. Ctrl-C sends SIGINT whether I have text selected or not and Shift-Ctrl-C copies any highlighted as expected.
Are you saying the behaviour of Ctrl-C has changed just for users who are using it for copy to clipboard purposes?
May 15th, 2009 at 3:28 am
The latter - this only affects people who have changed their keyboard shortcut for “copying to clipboard” to ctrl-c:
Before 9.04, if you used ctrl-c to copy to clipboard then SIGINT would be sent if you didn’t have text selected, but since 9.04 if you have ctrl-c set to “copy to clipboard” it won’t send the SIGINT at all regardless of whether you have text selected or not.
Subtle change, but annoying for those of us who want ctrl-c to be consistent with the rest of the OS and yet allow SIGINT if we have no text selected in gnome-terminal.
May 15th, 2009 at 3:29 am
Yes, perhaps the headline is a bit misleading!
May 15th, 2009 at 10:48 am
Cheers for the clarification.
The headline was borderline tabloid style, almost! hehe.
May 15th, 2009 at 1:05 pm
ha!
May 29th, 2009 at 11:34 am
It is driving me nuts…i keep closing programs while trying to copy something and forgetting to use Shift-Ctrl-C instead.
Is there any chance it will be fixed?
May 29th, 2009 at 10:48 pm
It is hard to say. Some of the developers think that this is fixing a bug, but I think most people are used to copying text if they have text selected:
http://bugzilla.gnome.org/show_bug.cgi?id=579022
June 4th, 2009 at 11:43 am
Agree, it is so annoying to be forced to use SHIFT+CTRL+C. I want the old behavior back!
June 8th, 2009 at 6:17 pm
how about making ctrl-c be customizable under keyboard shortcuts? problem solved