A terminal which provides select-to-copy and right-click-to-paste

In putty/cygwin my config is:

  • select in console -> copies to clipboard
  • right click -> pastes from clipboard.

Was after a terminal in Linux which might provide me with both of these features? I haven’t been able to find one.

Any help would be appreciated.

Asked By: Ben

||

Not sure which terminal you’re using right now but the default terminal in Ubuntu allows you to copy and paste. In your desktop environment select the text you want to copy and press ctrl+shift+c. If you have something in your clipboard that you want to paste, put the cursor in the right position and press ctrl+shift+v.

The other option is as Dr_Bunsen comments above says, both options are available in the right mouse button dropdown list.

Answered By: CHolmstedt

I use a non-free application with exactly that feature:

VanDyke.com > Products > SecureCRT

It support left-button select or CtrlShiftC (to clipboard), and right-button or CtrlShiftV (to paste). I use either, depending on how keyboard- or mouse- centric the task is.

SecureCRT also supports pre-configured login (scripts), multiple sessions (tabs/windows), and full scripting (extensibility). I find that when doing a lot of remote support, across multiple sites, these extra features are critical.

I have used it for years on Windows (or under Ubuntu + Wine), but it was ported to Linux in early 2011. I have not yet found a free alternate with all the features it offers.

Answered By: david6

Most of the terminals seem to use copy on select and middle-button to paste selection, or emulated middle-button to paste (using both mouse buttons at once). This is typical Unix behavior, and the emulation is the updated usage required by Microsoft-type mice with only two buttons or two buttons and a scrollwheel.

The mouse buttons could be remapped with xinput or other means. This will differ from version to version and on different mouse models. See the Ubuntu community documentation for that.

Also see this question, which is the reverse of the procedure you’d need.

Terminals I have that use select to copy and middle to paste include Gnome terminal, xfce terminal, Eterm, plain xterm, uxterm, rxvt, mrxvt, and aterm. I’m sure there are others.

My primary terminal, terminator (use apt-get or the software center to install), lets you choose copy on select as an option (with a single click):

Open preference and click the ‘copy on select’ box :

terminator preferences

Answered By: belacqua

To save some time for those who are checking, the terminals below don’t support this feature.

Answered By: anatoly techtonik

Solution with Terminator from this site.

sudo vi /usr/share/terminator/terminatorlib/terminal.py

Look for function : on_buttonpress

Revert button test (contextual menu go to middle click, paste on right click) :

def on_buttonpress(self, widget, event):
    ...
    if event.button == 1:
        ...
    elif event.button == 3:
        ...
    elif event.button == 2:
        ...

    return(False)

Now waiting for the feature request on Terminator 🙂

Answered By: pleutre

I’m using Ubuntu 14.04. Using the default Gnome terminal, if I highlight text then press my mouse wheel it will paste whatever is highlighted.

Hope this works for others. I liked this feature when I was (forced) to use a Windows desktop and putty.

Answered By: Parm Patram

press the middle scroll wheel, man.

Answered By: user455700

It’s not everything you want, but a middle-click in Gnome Terminal takes the place of the right-click – it does a copy-and-paste (using the clipboard) on selected text, and pastes otherwise.

I don’t think there’s any equivalent way to just copy though – the right-click context menu seems to be the closest option.

Answered By: mwfearnley

Another terminal that would work and hasn’t been mentioned here is Gnome Connection Manager: http://kuthulu.com/gcm/

This is actually my personal favourite because it allows you to connect to multiple machines in a very user friendly way.

You can set it up to automatically copy selected text, and text can be pasted using right click.

Answered By: Xavier Alvarez

If right-click paste in your terminal accidentally broken, this could happens after updating gnome >=3.9

Solution is here: https://wiki.gnome.org/Apps/Terminal/FAQ#How_can_I_make_middle-click_paste_the_primary_selection.3F

# ~/.config/gtk-3.0/settings.ini
[Settings]
gtk-enable-primary-paste=true
Answered By: gaRex

For gnome-terminal a patch exists: https://github.com/jrnewell/ubuntu-gnome-terminal-patch to copy-paste in putty-style.

Tested on Ubuntu 16.04 + GNOME Shell 3.18.5 with LightDm. It works!

Upd: Updated for Ubuntu 18 here: https://github.com/sasha-ch/ubuntu-gnome-terminal-patch . Feedback are welcome!

Answered By: sasha-ch

Tested in terminator installation on top of cgywin, the “terminal.py” is located in /usr/lib/python2.7/site-packages/terminatorlib/terminal.py

search for “rightclick” and change elif options as follow will do the same as mentioned in the early post.

elif event.button == 3:
    # rightclick should paste the clipboard
    self.paste_clipboard(True)
    return(True)
elif event.button == 2:
    # middleclick should display a context menu if Ctrl is  not pressed
    if event.state & gtk.gdk.CONTROL_MASK == 0:
        self.popup_menu(widget, event)
        return(True)
Answered By: Ye Guan

This is an old thread, but newer versions of Terminator support putty-style behaviour. Right-click –> Preferences –> Putty style paste.

Remember that you will no longer be able to right-click to get to Preferences since that is now mapped to paste. To open Preferences, use Shift-middle button.

HTH.

Answered By: Hopping Bunny

mate-terminal is very similar to the stock gnome-terminal, and it supports shift-highlighting + middle click.

Then, afterwards, do yourself a favour and install a Base16 color package. Personally, I like this one with the Solar Flare Dark profile loaded.

Answered By: skupjoe
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.