Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Trying to cut + copy + paste from the standard urxvt shell in Puppy Linux Wary 5.3.

If I follow this post on http://crunchbang.org/forums/viewtopic.php?id=15085 and I press:

  • in urxvt: ctrl + insert = copy
  • in abiword: shift + insert = paste

It doesn't work. Please suggest, what's the shortcut? Or the menu command?

share|improve this question
    
Try middle click (mouse wheel click) to paste from urxvt. –  don_crissti May 29 '13 at 19:26
    
Try shift-ctrl-c for copy and shift-ctrl-v for paste –  Michael Durrant May 30 '13 at 1:31
add comment

1 Answer

For historical reasons, there are two selections¹, with different usage conventions:

  • The PRIMARY selection automatically changes when you highlight some text with the mouse. There is no “copy” command, it's automatic.
  • The CLIPBOARD selection changes only when you issue a “copy” command (keyboard shortcut or icon or menu entry).

Classic X11 applications such as urxvt support PRIMARY only. Modern X11 applications such as anything using Gtk/Gnome or Qt/KDE support CLIPBOARD and often, but not always, PRIMARY. The unfortunate consequence is that you can't directly copy-paste between CLIPBOARD-only applications and PRIMARY-only applications, and you can't easily copy-paste between CLIPBOARD-preferring applications and PRIMARY-only applications.

If you highlight text with the mouse in urxvt, you can paste it in Abiword with the middle mouse button (whereas the keyboard shortcut would paste the CLIPBOARD).

If you need to transfer text between selections, you have several methods:

  • Use a GUI clipboard manager (Autocutsel, XFCE Clipmap, Gnome Glipper, KDE Klipper, Parcellite, …).
  • Paste into an intermediate application that supports both and copy again.
  • Use the command-line program xclip or xsel to copy the PRIMARY selection into the CLIPBOARD or vice versa.

    xclip -selection primary -o | xclip -selection clipboard -i
    xsel | xsel -b
    xclip -selection clipboard -o | xclip -selection primary -i
    xsel -b | xsel
    

¹ Even more, in fact, but only two that you'd encounter on a regular basis.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.