6 ms·
Ask HN: What happend to center mouse cut and paste in Linux?
Been captive on RHEL 6 for a long time. Installed a new linux distribution (fedora) and found that center button cut and paste does not work. Installed ubuntu, same thing. Google search seems to tell me "that is the way it is", and you can only cut and past like that inside a single application (which for me means an xterm). What has happened? Why would something like this that has been around for 30+ years across ever unix / window manager environment not be supported?
- deleted 8y ago[deleted]
- y4mi 8y agoUh, if still works though? On both fedora and Ubuntu. Ah, on second thought: it might be because of Wayland. I've been using i3 so haven't been able to switch from x-land... So I wouldn't have encountered that problem
- marmaduke 8y agoWorks on CentOS 7 and recent Ubuntus. Might be an issue with GNOME 3 getting dumbed down and all.
- seba_dos1 8y agoGNOME 3 session uses Wayland now by default, so I wouldn't be surprised if it worked only for X11 clients or so.
- loeg 8y agoFedora uses Wayland if your drivers support it (i.e., i915 Intel does, Nvidia blob does not). As a result different users may have a different experience. FWIW, CentOS 7 is ancient and long predates Wayland in Fedora.
- geofft 8y agoIt still works for me in Debian stable, with either GNOME 3 or MATE. I'd be sort of surprised if both Fedora and Ubuntu disabled it by default but it's possible. One thing to remember is that the middle-click clipboard it's a separate clipboard from the Ctrl-C/Ctrl-V one. It's called the "primary selection", and as the name implies, it's updated if you select something new or even unselect the old selection. And nothing automatically synchronized with the Ctrl-C/Ctrl-V clipboard, so if you select something, copy it, and unselect it, middle-click won't work to paste any more but Ctrl-V (or Edit | Paste) still will. If you want them synchronized you can use two autocutsel processes to do this (autocutsel synchronizes between either the "primary selection" or the "clipboard selection," and yet another type of X11 clipboard called the "cut buffer", so you need two to sync each selection with the cut buffer). https://blog.nelhage.com/2008/09/autocutsel/ https://blog.nelhage.com/2008/09/autocutsel/ describes how to do it. You might have had something like this in your RHEL 6 dotfiles that didn't get copied over to your new system.
- purerandomness 8y agoWorks on Arch Linux, like it should
- c0l0 8y agoSupport for the often confusing X11 clipboard - aka CLIPBOARD/PRIMARY - predominantly depends on the toolkit (think GTK, Qt) your particular application uses. I'm very fond of Mark=Copy and Ctrl+Insert/MiddleClick=Paste, and to teach all the (modern) applications I also use to honor my preferences, I have a clipboard manager installed. My choice is XFCE's `clipman`, but all the popular and big desktop environments offer their own, functionally at least equivalent application for the purpose: KDE has "klipper", for example, while GNOME probably sports an extension that does the job. There are more standalone implementations, too, that don't target a specific DE at all. Running one in your session allows to sync the toolkits' clipboards with X11's clipboard, which is what I choose to do - you only have one (history-enabled) clipboard that way, but it keeps the surprise effect ("Oh... I wasn't aware I was gonna paste _that_...") to a minimum, too :)
- tjoff 8y agoAnd here I thought that clicking a mouse button to paste must have been one of the greatest mishaps in computer history. I hate that thing with deep passion, I don't want to think about the number of secrets and inconvenience that thing has led to for misclicking in an IRC-window or something like that. Sorry for the non-constructive comment, I guess it is nice to know that some appreciate it.
- jamieweb 8y agoThe worst thing is when whatever you're pasting has a newline attached, so pasting it also 'presses' return.
- himlion 8y agoI hate that with a passion.
- antoineMoPa 8y agoThats useful for pasting many command lines though.
- tjoff 8y agoTrue, but that's yet another reason as to why a mouse click for paste is a bad idea.
- IshKebab 8y agoAgreed. It's confusing and unexpected for the vast majority of users.
- beatgammit 8y agoThat in itself isn't a problem, but I hate the feature that Firefox has where middle clicking will navigate to the site in your clipboard if it looks like a URL. I often have links in my clipboard, but I rarely want to navigate to it.
- Ologn 8y agoUbuntu did away with the default behavior to make it "more Mac-like". Although in my experience, the majority of people who want a more Mac-like experience go out and buy a Mac. I set it back to default behavior on Ubuntu. https://askubuntu.com/a/1028857 https://askubuntu.com/a/1028857 (Another Ubuntu annoyance - in "improving things" by switching from X11 to Wayland, they did away with the Gnome terminal tooltip which shows me how many characters I am resizing my Gnome terminal to. So it is now a rigmarole to set that up each time. Although they seem to turn that on and off at random, some random Ubuntu releases still seem to have it on by default).
- loeg 8y agoX11 -> Wayland.
- zzo38computer 8y agoI still prefer X instead of Wayland. I do not use a desktop environment, and I also think X is a better design (although many of the extensions are not so helpful I think). (Also, I like the middle mouse cut and paste, too. I still use it in xterm)
- jakeogh 8y agoFor ref, the 3 clipboards in X are: xclip -o -selection clipboard # XA_CLIPBOARD xclip -o -selection primary # XA_PRIMARY xclip -o -selection secondary # XA_SECONDARY
- david75 8y agoJust install gnome-tweaks then launch it and in the subsection Mouse and Keyboard you will find everything to get back your middle button to copy/paste. Additionally you can also install the gnome shell extension Mousetweaks to enable gestures with a laptop trackpad.
- anotheryou 8y agoIs there something emulating this under windows? I love how that clipboard is more fragile: any selection fills it and it doesn't touch my main clipboard.