Pretty sure most of you already know this but for those who don’t: you have two clipboards in Linux. One is the traditional clipboard where you copy with control c and paste with control v. The other one is when you highlight text and use the mouse middle click to paste text.

More details here.

    • @[email protected]M
      link
      fedilink
      15
      edit-2
      9 months ago

      Is this applicable for Wayland as well? That link makes several references to X and its ecosystem of tools.

      • Chewy
        link
        fedilink
        149 months ago

        If I understand it correctly, Wayland only specifies a single clipboard but no primary. But most (all?) wayland compositors implement an additional protocol that’s also supported by the toolkits (gtk, qt, …) and programs like wl-clipboard.

        So yes, wayland also has clipboard + primary. But no secondary, as far as I found. Though I never used secondary on X anyway.

  • @[email protected]
    link
    fedilink
    English
    469 months ago

    Ironically neither GNU nor Linux has a clipboard (well GNU Emacs probably has like 37 of them for some reason). “Primary selection” (the other clipboard that people don’t tell you about) started off on X11, which of course had to implement by XFree86, which became Xorg, and then it copied (ha ha) by other non-X-related software like gpm and toolkits like GTK when using Wayland.

    • @[email protected]
      link
      fedilink
      59 months ago

      Emacs’s regular clipboard is the “kill ring” which also allows you to retrieve any previously cut/copied text. It also has “registers” where you can store and retrieve snippets of text, which can be considered clipboards when used for this purpose. Registers can be referenced by any character you can type on your keyboard, including control characters like ^D.

      This totals… a lot of clipboards.

  • @[email protected]
    link
    fedilink
    309 months ago

    Not going to lie, I hate the middle click clipboard and disable it ASAP. I really dislike the idea that it copies things without my explicit permission.

      • Turun
        link
        fedilink
        109 months ago

        Yes. You can test this by selecting something, closing that window and attempting to paste. It won’t work. Closing the window removes the information about what was highlighted, so there is nothing to paste. If it were to copy upon selection you’d still be able to paste.

    • @[email protected]
      link
      fedilink
      229 months ago

      It’s one of the things that I hated at first when moving from Windows, but then I got so used to it I just can’t live without it. Whenever I use Windows, I would try to quickly copypaste text using selection, doing so for 5-10 seconds, until I realise this is not a thing on this OS.

      • Lvxferre
        link
        fedilink
        149 months ago

        Ditto. And sometimes I use both the Ctrl+C and middle-click clipboards at the same time, when I want to copy two chunks of text. Like this:

        • Select chunk A, press Ctrl+C
        • Select chunk B
        • Shift window
        • Paste chunk B through middle-click
        • Paste chunk A through Ctrl+V
        • Dandroid
          link
          fedilink
          59 months ago

          Windows and KDE Plasma both have CMD + V to show a list of all things that have been copied. So I always just do Ctrl + C, Ctrl + C, Ctrl + V, CMD + V -> down arrow -> enter. Though on KDE Plasma you will need another Ctrl + V to actually do the pasting after you have selected the value to paste, whereas on Windows selecting the value also pastes it. But the workflows are very similar.

          • arglebargle
            link
            fedilink
            English
            19 months ago

            Huh, I do not have CMD + V for clipboard contents in Plasma with Klipper. What distro is configuring that?

            I am assuming by CMD you mean Superkey. If not, I would like to know. I looked at Klipper shortcuts and didnt find it in there either.

            • Dandroid
              link
              fedilink
              19 months ago

              By CMD, I mean the windows key. I am using Opensuse Tumbleweed. I thought I was just using the default clipboard, but I guess I’m not 100% sure.

              • arglebargle
                link
                fedilink
                English
                19 months ago

                I will give it a look an check it out. Been awhile since I used Suse. Totally cool. Oh and I meant the windows key. A lot of Linux folks call it the super key.

                • Dandroid
                  link
                  fedilink
                  19 months ago

                  I guess I was using the Mac term for it. I use all three heavily, so they all get mixed up on my head.

              • arglebargle
                link
                fedilink
                English
                19 months ago

                Well I guess it is configured that way on my EndeavorOS laptop, so I wonder what I need to do to enable it. My desktop has been rolling for 4 years, maybe they added that at some point along the way.

    • @[email protected]
      link
      fedilink
      49 months ago

      I actually like the feature but could you explain how you disabled it? I’ve tried to merge all three clipboards into one a few years ago and couldn’t make it work

      • @[email protected]
        link
        fedilink
        19 months ago

        Whenever I use a touchpad without physical buttons, I usually disable the middle button entirely. It’s more of a hammer-to-mosquito solution than what you were asking, but it’s as easy as adding this command to the autostart file (on Xorg): xinput set-button-map "Name-of-your-Touchpad-goes-here" 1 0 3 4 5 6 7, where “Name-of-your-Touchpad-goes-here” can be found with xinput list --name-only.

    • @mindbleach
      link
      19 months ago

      … and it’s not like other uses of middle-click are exotic.

  • NaN
    link
    fedilink
    English
    289 months ago

    I use auto scroll a lot, middle click paste is generally an immediate no for me.

    • pinchcramp
      link
      fedilink
      English
      109 months ago

      How do middle-click-to-paste and middle-click-to-scroll conflict? In Firefox I can click-to-paste if the cursor is over an input field and click-to-scroll anywhere else. Never had any problem with this behavior.

      • JWBananas
        link
        fedilink
        English
        79 months ago

        How do middle-click-to-paste and middle-click-to-scroll conflict?

        Some of us are clumsy.

        • pinchcramp
          link
          fedilink
          English
          19 months ago

          That’s not something I thought about. Good thing that you can disable the feature then

  • Quazatron
    link
    fedilink
    149 months ago

    Neat, he?

    It’s a pain when you switch between Windows and Linux all the time and you can’t do the middle click in Windows.

    • @Murdoc
      link
      169 months ago

      Tbf, lots of things in Windows are a pain when you’re used to Linux.

      Correction: Lots more things are a pain…

      • xigoi
        link
        fedilink
        119 months ago

        But on the other hand, many things that you take for granted on Windows are a pain on Linux. For example, if you want to see advertisements, you can’t just open the Start menu.

        • Paul Sutton
          link
          fedilink
          19 months ago

          @xigoi @Murdoc

          Great point, to add if you want cloud services just sign up to Microsoft as you set up a new computer, no choice, unless you look up how to bypass. In fact that no choice is presented as part of this process as it won’t let you carry on.

          To be fair you do get subject to 3 pages of questions as to what you want to sign up for, e.g ads, I just clicked no to everythibg, got it set up, dualbooted to Linuxmint and have no looked back at windows.

          With Linuxmint (or at least with the cinnamon desktop) there is an online services tool that allows you to sign up to the service of your choice, what IS nice is that they respect the fact MS offer these services and there is an option for Microsoft.

      • Captain Aggravated
        link
        59 months ago

        Just simply…At least in Cinnamon, I can mouse over the audio icon on the panel and roll the scroll wheel to change the volume. Last time I tried it on Windows, you had to click the icon first. While that alone doesn’t sound like much, the whole OS is like that, needing extra little interactions for basically everything. Now that I’m used to using Cinnamon, using Windows feels like walking in beach sand.

          • Captain Aggravated
            link
            29 months ago

            I’ll admit the “last time I tried it on Windows” has been at least two major versions ago. I’ve never owned a computer with Windows 10 and never used a computer with Windows 11.

  • @[email protected]
    link
    fedilink
    English
    129 months ago

    Is it possible to have have a Windows 10-like clipboard in Mint? Where you can copy multiple stuff with ctrl+c and then press super+v to have a dropdown of things that you copied with a possiblity to pin some of them?

  • @[email protected]
    link
    fedilink
    119 months ago

    Oh, that explains why my steamdeck layout randomly pastes text when I’m trying to use a mmb shortcut on my dang browser

  • @[email protected]
    link
    fedilink
    109 months ago

    And then there is the “clipboard” (copy paste function) in the nano text editor being a third

  • @[email protected]
    link
    fedilink
    99 months ago

    I knew and use this, but I never thought to call it two clipboards :)

    Plus I’d never heard of shift-ins, I just used ctrl-shift-c/v in graphic terminals :P

  • @[email protected]
    link
    fedilink
    69 months ago

    This user, at least, has not touched a mouse in a decade. Young people do not even know what a mouse is.

    • @[email protected]
      link
      fedilink
      3
      edit-2
      9 months ago

      It’s like a rat but cute, right??

      btw do you know how to press Ctrl on my keyboard? I have already found the key of C, they’re all white and sound good, kind of like an organ, but I can’t see any Ctrl key. Also, do I need to press the entire key of C at once to copy? It’s gonna sound intense! But I haven’t learned using all 10 fingers yet for the keyboard. I only use two, so it will be hard to press them all at once while also pressing Ctrl once I find it! Is it one of those black keys? Actually I haven’t even heard about the key of V yet… So I can’t paste before I’ve learned a lot more! I’ve only learned A to D by now. And btw how do I compile in C#? Is keyboard really supposed to be so hard to use???

  • @[email protected]
    link
    fedilink
    5
    edit-2
    9 months ago

    On my arch install with hyperland, clip boards have been by far the hardest thing to setup. I finally got a basic clipboard manger working using clipman and wofi. But tbh I don’t really understand how that’s working.

    My main issues though have been trying to copy from one with vim open to other terminal with vim. Copying from vim elsewhere using y(yank) works fine. Copying elsewhere into vim works great. But vim to vim will not work for me.

    Also trying to find a way to make copying text out of a terminal running tmux not so overly complex and tedious.

    • @[email protected]
      link
      fedilink
      39 months ago

      For copying from Tmux, I recommend tmux-yank. There are also multiple plugins allowing you to copy predefined set of text types (IP adresses, URLs, etc…). I’m currently using tmux-thumbs. Note that you have to set custom command in tmux-thums to actually copy the text to xclip or whatever you are using. example in my dotfiles

      • @[email protected]
        link
        fedilink
        29 months ago

        I have tmux-thumbs, but only been able to use it a few times. Apparently most of what I need to copy is not ip’s and URLs. But this tmux-yank looks like what I’m looking for. I’ll give it a try. Thanks.