So I’ve been wondering why some copy-and-paste actions “don’t work” on Wayland. Turns out, in Wayland there’s only one clipboard (like in probably most other OSes): The one where you select something and then hit ^C to copy it (it’s called the CLIPBOARD selection). They have intentionally not included the PRIMARY selection of X11 where you can just select some text to copy it and use the middle-mouse button to paste it.

Almost 10 years ago, they started an initiative to bring back PRIMARY:

That protocol is still “unstable” and thus not every Wayland client supports it:

I honestly didn’t really look into this before and I didn’t know that it’s still unstable/unsupported, hence my confusion. (To be fair, I don’t know for certain if that particular protocol is already 10 years old. It looks like it because the copyright notice at the bottom says so, but no idea if that’s a reliable source.)

This is one of those things that are very subjective. The Wayland guys apparently thought that it was a “usability problem” to have two clipboards, so they removed one of them. Actually, the mechanism of X11 is totally generic, there are an “infinite” number of clipboards and we have just settled on using only two.

This is an interesting topic because Wayland is so old now that it looks like it has missed the developments of the last ~10 years or more: Way back in the past, I was indeed very confused about the different X11 clipboards because some clients used CLIPBOARD (hit ^C) and others only used PRIMARY (middle-mouse) – but this has long settled down. Most clients now have something like ^C to explicitly copy data into CLIPBOARD and ^V to paste it. It’s the standard thing now. And then on top of that power-users can additionally use PRIMARY where you just select text. This is a good and powerful thing, if you ask me.

I use both clipboards all the time. My mental model knows where the data goes. PRIMARY is like a short-term clipboard and CLIPBOARD is long-term. I think this is much better than just having one clipboard and I kind of feel like making good use of this is what keeps me from having to install a clipboard manager.

⤋ Read More

(I’m not necessarily trying to rant against Wayland, btw. I just started using it more often lately, so I’m noticing more of the quirks. And I’m noticing all the little things that X11 did and that I used, and that now work differently on Wayland or not at all. Just trying to make sense of all of this and writing it down helps.)

⤋ Read More Yeah, it’s super handy, right? Especially when copying text between terminals.

It looks like this protocol has been sitting in “unstable” for at least 5 years now:

Some months ago, they tried to move it (and others) to “staging”:

And that’s where it is now.

I’m not sure what “unstable” actually means in this context, nor “staging”/“stable”. Is there someone actively working on this? How bad is it really if it just sits in “unstable” for years? What are the consequences of a move to “stable” – do clients need to be updated to request the new version? 🤔

⤋ Read More


Login to join in on this yarn.