Ubuntu: Can not paste into Gnome Terminal from Netbeans


When I copy something from another window then my terminal and want to paste it into my terminal (on the command line) the paste option in Edit is grayed out. Ctrl+V does not work in GNOME Terminal 2.29.6.

I try to copy form netbeans into a terminal. If I paste it somewhere else, in gedit for example, it gets pasted. So it is copied.

Using Ctrl+Shift+C/V does not work.

Is this a settings of from some sort?


You need to append a Shift when pasting into the Terminal: Ctrl+Shift+V Same with copying a selection only using a C instead:


Shift is the escape sequence for shortcuts when using the Gnome Terminal.

Alternatively you can Right Click->Paste


I have the same problem with copying from Netbeans to terminal. It seems that when you Ctrl+C in Netbeans, it isn't copied in pure text format, so you can't paste it in terminal which require that kind of format (this is an assumption based on my experience ;) ).

So, how do I do it? Just copy from Netbeans, then paste it in some text editior, on example gedit, then copy it again and just paste in terminal.


Ctrl+V is not a bound combination in terminals. The terminal application ignores the keyboard event and passes it onto whatever's running. This is desirable because you don't really want the terminal window interfering with your keyboard events.

Right-click and click paste. Or use Primary Selection (highlight some text and middle-click).

Edit: I've just learned something! Shift+Insert will work if you want a keyboard input method. It's a primary-selection-based insert method, so just highlight and go.

Edit 2: I can't stop learning new things! As ændrük says, Ctrl+Shift+V works as a proper clipboard paste. So you've got lots of options. They're just not the standard key-combos.


Oli and user1974 suggested using Primary Selection (an X-Windows feature), but I needed these details to do so:

1.) Highlight text in NetBeans (don't worry about copying it)

2.) Middle-click in GNOME Terminal to paste it there

No other suggestions worked for me, but this worked like a charm. There is a bug entered at netbeans.org for this.


tldr- use Shift+Insert

Ctrl+C and Ctrl+V were keyboard shortcuts created for GUI applications. Apparently has something to do with Xerox.

Before there was Ctrl+C, Ctrl+X, and Ctrl+V.. there was

Ctrl+Insert, Shift+Delete, and Shift+Insert

They were defined in 1987 by the IBM Common User Access

These shortcuts often work in cases where the modern ones do not.. ie, in a terminal.


I had this same problem with Rubymine, where I was unable to copy from Rubymine and paste into terminal with CTRL-SHIFT-V. Given that I do this tens of times daily, I had little interest in copying to gedit every time and then copying to terminal, so I figured out a solution that doesn't require it:


Short story: OpenJDK doesn't play nice with the clipboard. I am guessing that this would apply to Netbeans as well as Rubymine since both run via a Java VM.


Copy text by highlighting it with your mouse. Usually you can use Ctl+C or right click the selection select "copy" from the popup menu as well.

Paste text by clicking your middle mouse button. Ctl+V also works in many places and so does Shift+Insert.

What to do when that doesn't work

The problem occurs when different applications use different clipboards. You will successfully copy the text to a clipboard in Application A, but when you go to Application B to paste, it will try paste from a different clipboard. In Windows all applications use the same clipboard.

There are several solutions. Probably the easiest one to get working is to install Parcellite.

Install parcellite

sudo apt-get install parcellite  

Run parcellite


A clipboard icon will show up in the system tray.

Use parcellite

  1. Copy some text.
  2. Click the clipboard icon in the system tray and select what you want from the menu.
  3. Paste your text.


You can also change the system default keymappings - so you can ctrl+v into terminal.

Edit->Keyboard Shortcuts


There is a bug in Linux that sometimes de-selects copied information when trying to copy/paste between 2 different applications. I recommend installing a clipboard manager, then you will see this bug in action. Parcellite is my favorite. If you are using Debian/Ubuntu paste "sudo apt-get install parcellite" (no quotes) into a terminal (ha,ha) or use Synaptic to install it. This bug affects all programs, not just the terminal.

After you install and start Parcellite (Applications -> Accessories -> Parcellite) you will see a clipboard icon in your systray. Recreate the bug, and then click the tray icon. You will see that the info was copied but is grayed-out, i.e., not selected. Click it to select it and then you can paste to your heart's content. This is one of the most annoying bugs of all time and has been around for years.


It's a bug in gnome-terminal. You can try xfce4-terminal.


It sounds like the text was not actually copied in the first place. If there is anything available to paste on the clipboard, then Edit -> Paste will be clickable.

In Gnome Terminal, the keyboard shortcut for pasting is usually Ctrl+Shift+V.


highlight text, middle click.

That's my favorite, quick, easy, works with other apps too. You just have to be careful with your clicks as you can mess up the highlight. (ie, you can't highlight the text, click around, highlight other text, and then hope to middle click the text from earlier.)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »