2

I use Ubuntu 20.04. I have read that Linux uses two clipboards:

  • copy/paste using a mouse context menu
  • copy/paste using keys: ctrl + c/ctrl + v

Here is my example usage (actions are performed in the Firefox):

  • select a text using mouse and select from the mouse context menu "copy"
  • select a text using mouse and press ctrl + c
  • paste the text using mouse context menu
  • paste the text using keys ctrl + v

I get the same paste result - the text copied using the last copy operation. Shouldn't I get different paste results ? How does it work ?

1 Answer 1

2

Yes, there are two buffers that store something that can be pasted. These are:

  • Primary

    You copy by selecting text, nothing else, simply selecting. The selected text can then be pasted by pressing the middle button (the wheel, on most modern mice) of the mouse. No Ctrl+C, no Ctrl+V, no right click copy, no nothing. Just select and then middle-click to paste.

  • Clipboard

    This is the one you will be familiar with from other operating systems. This is what Ctrl+C/Ctrl+V copies and pastes. This is what right click -> copy and right click -> paste use.

Some useful links:

4
  • You can also paste by using Shift + Insert instead of clicking mouse wheel ;) Feb 2 at 12:37
  • @FilipKubicz yes, but why would you want to do that? You already have your hand on the mouse to select, why would you move to the keyboard and use a two-key shortcut instead of simply middle clicking? But yes, sure, it is indeed another way.
    – terdon
    Feb 2 at 13:48
  • I just added it here for completeness. But I happen to use it often, especially if I move around terminals/screens and decide to paste much later, when I no longer have the mouse in hand. Feb 2 at 15:28
  • @FilipKubicz ah yes, fair enough, that makes sense.
    – terdon
    Feb 2 at 15:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .