Copy/paste text in Urxvt (rxvt-unicode) using keyboard

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.

About Gaurav Trivedi

Gaurav Trivedi is a Gnu/Linux user, geek and technology enthusiast. He loves to play FPS games and travelling.
This entry was posted in HowTo`s and tagged , , , , , . Bookmark the permalink.

17 Responses to Copy/paste text in Urxvt (rxvt-unicode) using keyboard

  1. Allain says:

    Can someone post this script ? The URL is not working. Thanks

  2. Gabriel says:

    Hi, I appreciated the article. Unfortunately the dropbox link to the perl script has broken (from point #2).

  3. redstoneguy12 says:

    The link to that perl script is 404

  4. Ramdziana says:

    2016, it works like a charm. Thank you!

  5. Thank you for this, been trying forever for something simple, this totally works and is dead simple.

  6. NomreReal says:

    Thanks!

  7. Paul says:

    Thanks for this… One that actually works.

  8. andreasdl says:

    Thanks! finally one that works!

  9. Rebeka says:

    Really awesome ! Thank you very much 🙂

  10. This seems like a more mature version of the above Perl script: https://github.com/muennich/urxvt-perls

  11. Alexander says:

    Thank you so much!

  12. Jon says:

    Thanks for this.

    Copying from a rvxt-unicode terminal wasn’t working and now it does!

  13. Erna says:

    helpful! i love reading your articles, thanks for all.

Leave a comment