2

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?

  • 1
    Are 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 Nov 16 '19 at 10:01
  • @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 Nov 16 '19 at 10:48
  • @MartinL.: Which Linux version, also is it KDE or Gnome or else and which version. – harrymc Nov 16 '19 at 10:49
  • @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. Nov 16 '19 at 13:31
  • @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. Nov 16 '19 at 13:33
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).

  • 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. Nov 16 '19 at 17:07
  • These products have options that may help. Unfortunately, I never used them myself. – harrymc Nov 16 '19 at 17:11
  • 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. Nov 16 '19 at 17:19
  • 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. Nov 16 '19 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.