- The clipboard is a facility used for short-term data storage and/or data transfer between documents or applications, via copy and paste operations.
In X10, "cut buffers" were introduced. These were limited buffers that stored arbitrary text and were used by most applications. However, they were inefficient and implementation of them varied, so selections were introduced. Cut buffers are long deprecated, and although some applications (such as xterm) may have legacy support for them, it is both not likely and not recommended that they be used.
The ICCCM (Inter-Client Communication Conventions Manual) standard defines three "selections": PRIMARY, SECONDARY, and CLIPBOARD. Despite the naming, all three are basically "clipboards". Rather than the old "cut buffers" system where arbitrary applications could modify data stored in the cut buffers, only one application may control or "own" a selection at one time. This prevents inconsistencies in the operation of the selections. However, in some cases, this can produce strange outcomes, such as a bidirectional shared clipboard with Windows (which uses a single-clipboard system) in a virtual machine.
Of the three selections, users should only be concerned with PRIMARY and CLIPBOARD. SECONDARY is only used inconsistently and was intended as an alternate to PRIMARY. When some applications treat PRIMARY and CLIPBOARD differently, this can cause confusion and, in some cases, inconsistent or undesirable results, but the majority of applications shows the behaviour detailed in the next section.
How to use the selections (clipboards)
There are two common selections (clipboards), which can have different values stored in them. Synchronization of both is possible with clipboard managers.
The CLIPBOARD selection is accessed using keyboard shortcuts, while application specific, these are most commonly
ctrl+c for copying,
ctrl+v for pasting and
ctlr+x for cutting.
The PRIMARY selection speeds up the copying task by copying the text to the clipboard as soon as it was selected with the mouse, without the need for entering a keyboard shortcut. Pasting is triggered by pressing the middle mouse button (or some emulation of it).
Application specific notes
ctl+c both for copying text and for stopping commands. The behaviour depends on whether there is something selected or not.
CLIPBOARD in Gvim
Disable paste on middle mouse click
Currently the only simple way to completely disable pasting with the middle mouse button across all applications is to disable the middle mouse button, which then also loses its other functions such as closing tabs. The applications listed below have specific settings to disable it.
To stop firefox from acting on middle mouse clicks, set the following options in
middlemouse.contentLoadURL false middlemouse.paste false
List of clipboard managers
Clipboard managers are applications that enable users to manipulate the clipboard. Note that many of these programs can also synchronize the previously mentioned clipboards.
- Anamnesis — Clipboard manager that stores all the clipboard history and offers an interface to do a full-text search. It has both a command line and GUI mode available.
- Autocutsel — Command line and daemon interfaces to synchronize PRIMARY,
CLIPBOARDand cut buffer selections.
- Clipboard Indicator — Clipboard manager extension for GNOME Shell. Adds a clipboard indicator to the top panel, and caches clipboard history.
- https://extensions.gnome.org/extension/779/clipboard-indicator/ || https://github.com/Tudmotu/gnome-shell-extension-clipboard-indicator
- ClipIt — Fork of Parcellite.It has both a command line and GUI mode available.
- Clipman — A clipboard manager for Xfce. It keeps the clipboard contents around while it is usually lost when you close an application. It is able to handle text and images, and has a feature to execute actions on specific text selections by matching them against regular expressions.
- Clipmenu — Dmenu based clipboard manager
- Clipster — A lightweight, command-line-driven clipboard manager, written in Python.
- CopyQ — Clever clipboard manager with searchable and editable history, custom actions on items and command line support.
- Glipper — Clipboard manager for the GNOME desktop with many features and plugin support.
- GPaste — Clipboard management system that aims at being a new generation Parcellite, with a modular structure split in a couple of libraries and a daemon for adaptability. Offers a GNOME Shell extension and a CLI interface.
- Keepboard — Cross-platform clipboard manager. Saves text, image and file clipboard items.
- Klipper — Full featured clipboard manager for the KDE desktop.
- Parcellite — Lightweight yet feature-rich clipboard manager. It has both a command line and GUI mode available.
- Pasteall — Clipboard monitor simple and functional (with notifications in Portuguese).
- Qlipper — Lightweight and cross-platform clipboard history applet based on Qt.
- Xclip — A lightweight, command-line based interface to the clipboard.
- xcmenu — Clipboard synchronizer developed for window manager users.
- xsel — Command-line program for getting and setting the contents of the X selection.