Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do i copy text that includes tab characters from a text editor, let's say gedit into a terminal session on ubuntu/gnome? I am on ubuntu 12.0.4 using gnome classic.

UPDATE This same issue happens in CentOs - basically seems to apply to any gnome.

share|improve this question

Just select the text you want to copy, and then middle click on the terminal. On most *nix systems, selecting copies and middle click pastes.

Alternatively, you can select => right click=>copy => terminal => right click=> paste

Or, simply Ctrl+C,Ctrl+V

Have a look here for a short explanation of the Linux/Unix clipboard and the X buffer.

share|improve this answer
I neglected to mention the problem focuses on tab characters getting lost. – javadba Jun 14 '13 at 14:38
@javadba selecting and middle clicking should copy tabs across correctly. In fact all of them should. – terdon Jun 14 '13 at 14:47
Tabs definitely get lost with control c: pls test yourself - does "middle click" keep the tabs? i have 2 button mouse only – javadba Jun 14 '13 at 15:00
@javadba if you have a two button mouse, you can emulate the middle click by clicking both buttons at the same time. I did try it and both Ctrl+V and Middle click copy the tabs correctly on my system. Are you sure you have tabs there? You can check with od -c file.txt. – terdon Jun 14 '13 at 16:27
(a) clicking both left and right is not working (b) I usually do not have an external mouse anyways and no middle click on trackpad. So in the end I still do not have a solution. I came back here to my own question via googling over a year later. – javadba Jul 25 '14 at 5:01
up vote 0 down vote accepted

There does not appear to be any solution to this.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .