Today I came across the “primary selection” / “clipboard selection” (in regard to Helix registers). I know it has its origin in X11 and it made me wonder whether my Wayland setup with the Sway Spin uses something like this, too. Which led me down a bit of a rabbit hole.
Things I came across:
- There is wl-clipboard (I think installed by default), which comes with two command:
wl-copy
andwl-paste
. I think it’s no integral part of Wayland and just some CLI utility to access the system clipboard (among other tools with the same purpose). - There is Clipman (I think installed by default), which is a “full” clipboard manager. Among other things, it allows for copied text to persist even if the source application closes.
ps aux
tells me thatwl-copy
,wl-paste
andclipman
are running.- There are different ways to interact with the clipboard (or various clipboards).
wl-copy
andwl-paste
are a CLI way to do it. Helix register commands another. Many applications have key combinations likeCTRL+C
andCTRL+V
.
What I was not able to figure out:
- What application or kind of application is starting the clipboard in the first place, thus making it possible for the other applications to do their clipboard work? Is it Sway? Is it the Linux kernel?
- What application is starting the
wl-copy
/wl-paste
andClipman
processes? - What does it even mean for
wl-copy
andwl-paste
to run in the background? - If I copy something in (say) LibreOffice by pressing CTRL-C and I paste in (say) Firefox by selecting the option from the right-click menu, I think both are interacting with some “external” clipboard and not with each other?
I wasn’t able to figure out if these things are specific to Fedora Sway (a specific set of pre-installed applications), Sway, or just Wayland in general. I hope this thread isn’t completely off-topic.
In any case, thanks if you took the time to read this lengthy opening post or even to answer a question!