Clipboard – Copying & Pasting with URxvt

clipboardrxvt

I'm using URxvt 9.20 on debian jessie and I'm looking for a way to copy & paste text like I was used to with the gnome-terminal (Ctrl+Insert for copying, Shift+Insert for pasting).

It works within different urxvt consoles, it does not work between e.g. urxvt and iceweasel though.

I tried according to the manual on archlinux, but it won't work (even though I actually don't want to use Shift+Ctrl+C/V it was worth a try).

.Xresources:

! ******************
! urxvt config
! ******************

! Disable Perl extension
! If you do not use the Perl extension features, you can improve the security
! and speed by disabling Perl extensions completely. 
URxvt.perl-ext:
URxvt.perl-ext-common:

! Font spacing
! By default the distance between characters can feel too wide. It's controlled
! by this entry: 
! URxvt.letterSpace: -1

! -- Fonts -- !
URxvt.font:xft:Monospace:pixelsize=13
URxvt.boldfont:xft:Monospace-Bold:pixelsize=13
!URxvt*font:  -xos4-terminus-medium-*-*-*-14-*-*-*-*-*-iso8859-15,xft:terminus:pixelsize:12
!URxvt*boldFont:  -xos4-terminus-bold-*-*-*-14-*-*-*-*-*-iso8859-15,xft:terminus:bold:pixelsize:12
!URxvt*italicFont:  xft:Bitstream Vera Sans Mono:italic:autohint=true:pixelsize=12
!URxvt*boldItalicFont:  xft:Bitstream Vera Sans Mono:bold:italic:autohint=true:pixelsize=12

! Disable scrollbar
!URxvt*scrollBar: false

! Scrollbar style - rxvt (default), plain (most compact), next, or xterm
URxvt.scrollstyle: plain

! Background color
!URxvt*background: black
URxvt*background: #1B1B1B

! Font color
!URxvt*foreground: white
URxvt*foreground: #00FF00

! Other colors
URxvt*color0: black
!URxvt*color1: red3
URxvt*color1: #CD0000
URxvt*color2: green3
!URxvt*color3: yellow3
URxvt*color3: #C4A000
URxvt*color4: blue2
!URxvt*color4: #3465A4
URxvt*color5: magenta3
URxvt*color6: cyan3
URxvt*color7: gray90
URxvt*color8: grey50
URxvt*color9: red
URxvt*color10: green
URxvt*color11: yellow
!URxvt*color12: blue
URxvt*color12: #3465A4
URxvt*color13: magenta
URxvt*color14: cyan
URxvt*color15: white
! ******************
! /urxvt config
! ******************

Best Answer

Unfortunately, the X window system has several different copy-paste mechanisms.

Rxvt, like most old-school X applications, uses the primary selection. Generally, when you select something with the mouse, it's automatically copied to the primary selection, and when you middle-click to paste, that pastes the primary selection.

Ctrl+C and Ctrl+V (or other key bindings) in applications using modern GUI toolkits, such as Gnome-terminal and Firefox, copy/paste from the clipboard.

There are tools to facilitate working with the selections. In particular, if you just want to have a single selection that's copied to whether you select with the mouse or press Ctrl+C, you can run autocutsel (start it from your .xinitrc or from your desktop environment's startup programs), which detects when something is copied to one of the selections and automatically copies it to the other.

Related Question