I want my PRIMARY SELECTION back

2

1

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?

Martin L.

Posted 2019-11-16T09:42:56.910

Reputation: 33

1Are you sure you're not running a clipboard manager that synchronizes primary and clipboard? I have never seen selecting text automatically overwrite the clipboard in any X11 desktop environment so far. – user1686 – 2019-11-16T10:01:09.297

@grawity: I have seen this in some flavors of Linux. For every Linux distribution or version the behavior might differ, which is really bothersome. – harrymc – 2019-11-16T10:48:48.567

@MartinL.: Which Linux version, also is it KDE or Gnome or else and which version. – harrymc – 2019-11-16T10:49:46.810

@harrymc I had the first really annoying issues with GNOME. A few weeks ago I switched to cinnamon because I got tired of GNOMEs "easy for the user" thinking. – Martin L. – 2019-11-16T13:31:36.570

@grawity I certainly diden't install one and did my best to find out whether the desktop manager has one enabled somewhere under the hood. – Martin L. – 2019-11-16T13:33:13.483

Answers

0

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).

harrymc

Posted 2019-11-16T09:42:56.910

Reputation: 306 093

Actually I do not want the PRIMARY selection and the CLIPBOARD to be synchronized but I experience that it sometimes happens and leads to annoyingly inconistent behaviour of middle-click or Ctrl-V – Martin L. – 2019-11-16T17:07:33.173

These products have options that may help. Unfortunately, I never used them myself. – harrymc – 2019-11-16T17:11:10.357

autocutsel does not help here It is designed to "Keep the X clipboard and the cutbuffer in sync" [wow, I could paste this description into the textfield with middle-click from the terminal] – Martin L. – 2019-11-16T17:19:47.550

ClipIT is just another manager for Clipboard history. It can watch the primary and the clipboard and also offers a "synchronize" feature, but it does not solve my problem – Martin L. – 2019-11-16T17:23:20.950