this post was submitted on 02 Jun 2025
25 points (90.3% liked)

Rant

431 readers
21 users here now

A place where you can rant to your heart's content.

Rules :
  1. Follow all of Lemmy code of conduct.
  2. Be respectful to others, even if they're the subject of your rant. Realize that you can be angry at someone without denigrating them.
  3. Keep it on Topic. Memes about ranting are allowed for now, but will be banned if they start to become more prevalent than actual rants.

founded 2 years ago
MODERATORS
 

I cannot believe that in this the year of our lord 2025 we still have two separate clipboard buffers on desktop Linux.

There are very few cases where I will execute a paste (whether it is with middle click or Ctrl-V) and I will want the resulting paste to be anything other than the last thing I copied. Whatever X11 subcommittee came up with the idea that users would want to juggle stuff between the two buffers, or whatever the fuck the thinking was, needs to be punished physically. It's not enough to tell them: They need to remember, so that they will know what they did was wrong, and get fearful in the future if they ever think of doing anything like that again. Their names should be made public, so that people in the future who might want to hire them will know what they did. (I tried to find out who it was, but Google is drunk again and couldn't really tell me all that much.)

I am already aware that the X11 people spent a lot of time huffing glue in between creating overly complicated standards documents. So maybe the fact that they made some baffling and wrong decisions for literally no reason isn't surprising. It was a long time ago, a lot of bad things happened back then. What I really cannot understand is why Wayland looked at that decision, and the long history of pain and suffering it had caused over the years, and decided, "You know what? Let's keep that around. What harm could it do? And anyway... it's compatible!"

Having two clipboards is literally just worse. Even if we go back to the pre-Wayland days, before the singular clipboard each app chooses to interact with became a mutually incompatible happenstance that depends on the toolkit and historical lineage of that particular tool, so that it's often simply impossible to copy and paste between two extra tools before you do the standard ritual of installing some "make my clipboard work please" incantations into your system setup that don't fully work but close enough to stop you complaining, it was still worse. Even back in the X11 days, when all the users just ignored the Ctrl-C clipboard and used the middle-click clipboard, it was still just extra work for no reason. Now, it's become completely unforgivable. I want to take away these people's car keys and replace them with a pair of identical keys and tell them that one or the other will randomly work, each morning, and they have to try it and find out, every time. I want to replace one of their morning yogurts with Elmer's glue, and tell them they should install a Yogurt sync tool if they don't want the glue, because it's important to be kind and accommodating to the people who need glue in the morning and that's what's important right now.

If anyone knows of something I can run that will just do a simple bidirectional sync between the two clipboards, so I can just pretend to myself that all of this isn't happening, please tell me. I tried to find a solution for half the morning so far, because I finally just got enraged by it, and I couldn't find one.

If I imagine hard to myself, I can maybe imagine a scenario where I might want to hit Ctrl-C, then I would accidentally highlight something right after, and then I would want to paste the thing I did Ctrl-C for. But surely that use case isn't the one that we need to wrap the whole desktop Linux clipboard situation around, to make sure that Fat-Finger Freddy can still get his pasting done, all while the rest of us have to go around saying things like "wl-paste -p -w 'wl-copy'" and everyone has to do a bunch of extra work whenever they want to do the already difficult task of making pasting work in an editor over SSH or something.

I literally can't believe how bad it is. It's like a prank. It's like one of those imaginary programming languages where someone invented a deliberately malicious feature and then implemented it to a T to be funny.

I do not like it. Not one bit.

Also: Did you know the are three clipboards? The third clipboard is called the "secondary selection," in keeping with the impeccable human logic that runs all through the X11 codebase like cordyceps through a staggering, dying ant.

Emacs is only editor in history that does anything with the third clipboard. Hold down "alt" and drag with the left button to highlight something, and that thing will go into the special top secret clipboard, where nothing will ever see it.

OH HOW USEFUL

SAID NO ONE EVER

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 2 weeks ago (5 children)

ctrl-shift-v

ctrl-shift-c

Well, today I learned something new, that's pretty useful.

I might use the clipboard to store a path I need to use in multiple places, maybe in multiple tools, and the selection for ephemeral data like a snippet of output from the last command, or an ID value from a web page, something like that. It’s a bit tricky to explain, it’s just the way it’s always worked on unix and linux UIs, and it just becomes second nature to think with those tools.

Yeah, I get that. IDK, it's just bizarre to me. It does make sense. I still maintain that it would make a little more sense, if you're going to teach all your tools how to use multiple shortcuts and interact with a complex clipboard situation, to do the same thing by just having them able to look back an arbitrary distance in the history of a single clipboard, like M-y in emacs.

[–] [email protected] 1 points 2 weeks ago (4 children)

if you’re going to teach all your tools how to use multiple shortcuts and interact with a complex clipboard situation

The people writing the tools don't have to do this, it 'just works' as it's functionality the UI framework provides. It used to be that whether you used Tk, GTK, Qt or any of the others, you still ended up with X11 components on screen, and those components handled the UI interactions like middle click paste from selection or 'ctrl-v' paste form clipboard, but then we got a few UIs that tried to draw themselves (Java apps were terrible for this). I don't know what it's like on wayland, I suppose it could be different per compositor. I'll get around to testing it at some point, but I'm in no hurry to leave X11 behind.

just having them able to look back an arbitrary distance in the history of a single clipboard, like M-y in emacs.

You'll get no argument fro me, that would be a more intuitive approach, although rather than just a stack like that, I'd probably prefer to have a set of registers to yank to and paste from too like vi. That way I can put the information I want to keep using at a specific location, and just use the rolling stack for the more ephemeral stuff.

[–] [email protected] 1 points 2 weeks ago (3 children)

The people writing the tools don’t have to do this, it ‘just works’ as it’s functionality the UI framework provides.

Read it as "if you're going to teach all your UI frameworks to do this," then. My point is, the people who write the software that handles clipboards are having to deal with multiple clipboard. If that's invisible to the app author because it's in a toolkit, then great. The people that wrote the toolkit still had to worry about it. To me it would have been preferable if what they're supporting was a different and more sensible paradigm.

[–] [email protected] 1 points 2 weeks ago (2 children)

The thing is, in X11 that clipboard behaviour was written once, and that made it work everywhere. Obviously there'll have been work done on it over time, and non-native frameworks (java UIs and such) would have had to do it themselves, but for the vast majority of programs the author, and indeed the author of the toolkit probably didn't have to think about it at all. It's one of the nice things about the X11 architecture that I think we lose with the wayland approach, everything that should work the same everywhere is written once. I suspect that over time we'll see only a few wayland compositors really lasting and being maintained, and we'll start to get back to that common architecture.

I can definitely understand your frustration with the clipboard situation, but it's a decades old paradigm, and I'm used to it, so it seems reasonable to me. That said, I do use clipman to automatically store the text I've copied to the clipboard, and let me switch to previous values, so maybe that sort of thing would at least help you a bit?

[–] [email protected] 1 points 2 weeks ago

The thing is, in X11 that clipboard behaviour was written once, and that made it work everywhere.

Dude it just doesn't work this way. People write apps and they choose keyboard shortcuts, people port applications and frameworks from one place to another. I randomly fired up the first non native program that came to mind, hit ctrl-shift-c, and it didn't copy stuff to CLIPBOARD. I get what you're saying but the keyboard shortcuts simply aren't going to be defined unilaterally by the one and only author of the only allowed windowing toolkit and then everyone's going to use that for all time. It just doesn't work that way. Software is a social contract. Actually, I would hold up the MacOS "Ctrl-C versus Cmd-C" paradigm as a golden example of how it should be: The paradigm is clear and easily defined, and obviously makes sense, so of course everyone who's dealing with some kind of software on Mac is going to adhere to it. It's easy and sensible, and then the fact that there's a standard toolkit that provides it out-of-the-box becomes icing on the cake instead of being the only thing holding back dysfunction.

Look at my list of fixes for finally making my clipboard work sort-of the way I wanted it to. Only one of them had anything even vaguely to do with the windowing toolkit. It's an issue of the fundamental paradigms at work. My complaint was a little bit more focused on X11 introducing a new (and, I would argue, largely pointless) paradigm that now everyone needs to be aware of and adhere to. The people implementing clipboard-provider = "termcode" in Helix aren't going to benefit from any X11 toolkit regardless of what software is on the desktop that runs the ssh session connecting to the headless computer where Helix is running. But do they have to think about whether the stuff that gets copied from a remote session is going to go to PRIMARY or CLIPBOARD? Do the people who write the protocol that sends clipboard stuff over xterm terminals? I mean, I would hope they do, otherwise we're back at the issue of randomly choosing one clipboard or another, which was a big part of what I was saying people would (and did) do in practice and why I levied criticism at the original paradigm for introducing that stupid choice to their programming.

I can definitely understand your frustration with the clipboard situation, but it’s a decades old paradigm, and I’m used to it, so it seems reasonable to me.

I mean people said the same thing about slavery. Now that I got it out of my system by whining about it on Lemmy and then took some time to set things up how I want them, I'm pretty much fine with the behavior on my system now. The frustration basically came from (a) things don't work for me and (b) the reasons why seem stupid, and then coupled up also with (c) I'm having trouble making it work in a way I am happy with. Now that (a) and (c) are taken care of by running wl-paste (which I guess is doing what the xfce person was saying their system does, just on the side instead of out-of-the-box), I'm not embittered about it anymore. But it just still seems silly.

[–] [email protected] 0 points 2 weeks ago* (last edited 2 weeks ago)

Oh, also, update: I found a thing with the new setup that still doesn't work. Highlighting stuff in Colab doesn't put it into PRIMARY, and I can't even really seem to copy into CLIPBOARD since Colab overrides the right-click to offer me a menu that doesn't give me "Copy" as one of the options.

I mean Colab is shit, that's not surprising. I just wanted to add one more data point that making a strange paradigm is going to cause issues down the road, whereas simple paradigms have power and can survive.

Edit: Literally right after I sent this message, I needed to copy one thing and then log in to somewhere in order to send it, and I did the thing of highlighting the password in the password manager, middle-clicking to paste it, and then did Ctrl-V to paste the thing I had needed to copy previously and it was more convenient because I didn't have to go back and copy it again. So yes today it worked out slightly better in that one specific situation.