Some projects keep surprising me with their “solutions,” and this is one of those cases. A proposal under review by developers from GNOME and Mozilla could change how middle-mouse-button paste behaves on Linux and other Unix-like systems.
The discussions, visible in Mozilla’s Phabricator revision D277804 and a linked GNOME gsettings-desktop-schemas merge request, focus on disabling the traditional primary selection paste by default.
Mozilla proposes changing the default behavior of the Firefox browser on Unix builds so that pressing the middle mouse button no longer pastes text by default. The author of the revision frames the current behavior as a source of confusion and accidental pastes, especially when users press the middle button without expecting the clipboard contents to be inserted into text fields.



I actually did not know there are two clipboards. Why/how do they work?
They’re called “selections”, the main ones being
PRIMARYandCLIPBOARD, and it’s effectively a form of IPC mediated by X. When you select something, that goes into thePRIMARYselection, while when you copy something, it goes into bothPRIMARYandCLIPBOARD.The problem is that “middle mouse click” isn’t actually paste, it’s “insert primary selection”. As long as they’re in sync you won’t notice any issue (Ctrl+V and MMB will both insert the same content), as soon as they’re out of sync you’re suddenly exposed to an implementation detail of the X11 protocol.
And it’s easy to go out of sync, simply copy something and then select unrelated text, now Ctrl+V and MMB will output different things. It can be useful, e.g. if you’re having to copy a bunch of different pieces of text from one window to another, you can simply select and MMB, no keyboard needed, but it’s not intuitive IMO, and conflicts with modern usage of the middle mouse button (Get it wrong when trying to open a link in a new tab and you’ll dump whatever text you last selected into the site instantly)
Also, these selections aren’t a thing under Wayland, it’s been re-implemented as a normal paste operation there. The question is actually whether the middle mouse button should be treated like any other mouse button or have this special behaviour by default. My vote is to expose it via the mouse settings applet and leave it up to users, like any other special mouse button.
You select the text and it magically is in this second (or actually first) clipboard. I have a habit of selecting the text I’m reading, so this selection is always something, and sometimes contains sensitive data. There were countless of situations when I was composing a long message, scrolling it and accidentally, not even noticing (it’s long already), pasted the contents. I hate this ‘feature’ and in general don’t understand who wants it and why. Disabling it would be a huge improvement for everyone, as those who need it usually know they need it, so there’s no difficulty in enabling it back.