Why does pasting sometimes not work in gnome-terminal?

This is a bug in gnome-terminal, the bug report is here with a patch:

https://bugzilla.gnome.org/show_bug.cgi?id=600876

Gnome has not fixed the problem though.

Ubuntu has fixed it independently of Gnome. The detailed bug report is here:

https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/630383

According to the bug report, the fixed Ubuntu package is gnome-terminal version 2.32.1-0ubuntu3. It is currently in the upload queue of maverick-proposed repository (with unapproved status). The upload queue is here:

http://launchpad.net/ubuntu/maverick/+queue

You could download the source package and build it yourself with debuild.

Hopefully it will be soon pushed to normal update repositories.


It has to do, as you suspect, with "vi" mode.

"vi" mode has separate insert and command modes, as you know. When in command mode, all text sent to the terminal is interpreted as a command.

To convice yourself do this:

  • copy somewhere a string containing "isometext"
  • go to the terminal and press ESC to go to command mode
  • paste

you should see only "sometext", because the initial "i" has been interpreted as the insert command.

Solution: if in command mode, press "i" before inserting. If not sure, press ESC and "i" before inserting.


Using the terminal copy and paste utilizes two different methods based on which way you perform the copy and paste. If you use the highlight and paste-with-third-button, you are utilizing one of the buffers in X to do the work. If you use the menu or right-click to copy and paste, you are utilizing a different buffer.

Thus, if you copy with a selection from the menu, then you must either paste using the menu or use the right-click menu. You can't select using Edit > Copy and then use the third mouse button to paste.

This is also the reason you can't copy by highlighting then going to another application and using Edit > Paste.