This is generally a topic of discussion between new Urxvt users that how do you copy/paste text in Urxvt terminal emulator. The forums and discussion boards are filled with hundreds of topics of this kind and the methods described there not always work for every user. So today I am posting the method which I am using for a long time, it always works for me and it is easier to use too.
1. Install xclip:
Since I use Archlinux
#pacman -S xclip
For CentOS/RHEL users “xclip” is in RPMforge repository.
For Ubuntu/Debian users it is in your official repositories.
2. Copy this perl script in your /usr/lib/urxvt/perl/ with the “clipboard” name :
#cp urxvtclip /usr/lib/urxvt/perl/clipboard
NOTE: If you are using a 64 bit operating system chances are that your perl library path may be /usr/lib64 instead of /usr/lib. So double check your path before proceeding.
3. Now add these lines to your .Xdefaults or .Xresources (whatever you use) :
URxvt.keysym.Shift-Control-V: perl:clipboard:paste URxvt.iso14755: False URxvt.perl-ext-common: default,clipboard
The first line binds ^+shift+V to “clipboard” extension and the second line disables iso14755 mode. Look at the last line in the above code make sure that your .Xdefaults or .Xresources does not already contain URxvt.perl-ext-common line. If it does then just add “clipboard” to it, copy rest of the lines and you are done.
Copying text :
To copy the text just select the text with mouse and it will automatically be copied to your clipboard then you can paste the text anywhere you want with Coltrol + V.
Pasting text :
To paste the text in URxvt simply use Control + Shift + V.
If you have any comment or suggestion let me know and leave a reply.