Ubuntu – Where are the contents of the clipboard stored

clipboard

Since they are "saved to clipboard", the contents must be stored somewhere.

Are they stored in a file?

Best Answer

  • You seem to be lacking an understanding of clipboards in Linux. There are 3 usually available to users.

    These clipboards are called "Selections"

    There is:

    • PRIMARY - This is normally used for middle mouse button = copy/paste
    • SECONDARY - Normally not used by much, but it exists. Usually as an in app specific copy and paste.
    • CLIPBOARD - Usually Ctrl+c and Ctrl+v style copy and paste.

    All of them are stored, by default in memory of the controlling application (usually Xorg, but not always). And every child application has access to it.

    Clipboard monitors and managers exist that can monitor the clipboards and store their contents in a file, or more commonly, let you review your clipboard history.

  • Related Question