I want the PRIMARY SELECTION back

copy/pasteuser interfacewaylandxorg

I've been using the primary selection since I installed my very first Linux on a Computer in 1994.

It's so simple: Select text, change window, middle-click, happy

With the latest updates – it started when I first tried out wayland and quickly switched back to X11 because wayland diden't support primary selection – the primary selection bekame more and more flaky.

  • It is no longer clear, which text you paste when middle-clicking. Might be a selection you had long forgotten about turns up …
  • Some programs (firefox and thunderbird are the most prominent) don't allow selections to go into the primary buffer at all
  • Some programs ignore middle-click (again firefox and thunderbird are the most prominent)
  • making use of the clipboard AND the primary selection nowadays is virtually impossible, as you cannot be sure, the clipboard keeps its text when you select another to overwrite it with the clipboards content

there are a lot more annoyances I observed in the last months that have their origin in my habbit to rely on using the clipboard and the primary selection as two distinct operating principles.

Is there a way to make sure, primary selection and clipboard reliably work as they did for decades?

Best Answer

I mostly use KDE (when I can), where the default in terminal and in Ubuntu in general, is that selecting text means "copy" ("X selection" which is different from "clipboard copy"), which can then be pasted via middle mouse click.

If in your preferred graphical manager this does not happen automatically, you might try to use packages whose purpose is to synchronize the three clipboards of Linux.

Some packages that you may try for a more stable experience:

The packages may exist in your repository, or may be downloaded from the links for compilation and installation.

If middle mouse click does not work in your terminal, you might use another one. Or ask here how to enable it (if possible).