this post was submitted on 21 Jan 2026
33 points (97.1% liked)

Linux

11254 readers
439 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
 

While fixing a problem with a Wayland app I noticed that the programm got a notification from a Wayland fd whenever I selected some text in any other window (not belonging to the app) and was able to read the contents of the selection.

As I'm not a fan of sharing data without explicit actions (so Ctrl+C, Ctrl+V), is there a way to disable this behaviour of Wayland?

OS info: Fedora 43 KDE

top 6 comments
sorted by: hot top controversial new old
[–] Telorand@reddthat.com 7 points 1 day ago (1 children)

I thought this was an old feature of Linux (maybe Unix?). Highlighted text gets copied to the buffer, which is useful when you're on the command line (because Ctrl+C ends the current process).

I don't know how you'd change this, but maybe that can give you some clues on what to do.

[–] dohpaz42@lemmy.world 2 points 1 day ago (1 children)

It’s been a hot minute, but wasn’t what you’re referring to done by a third-party app? The original consoles had no real concept of a mouse by default, let alone copy/paste from highlighted text. Any highlighting inside an app (e.g. vi/m) was buffered by the app and not the OS?

[–] Telorand@reddthat.com 2 points 1 day ago

I thought text selection was handled via keyboard. Also been a hot minute since I first learned about this, and not using that buffer has not exactly been a common discussion point, since being able to reuse text is typically a desirable trait!

[–] TheV2@programming.dev 5 points 1 day ago* (last edited 1 day ago) (1 children)

What is the application and did you notice similar behavior outside of it, e.g. being able to paste the currently selected text? I would also check your clipboard manager's configuration. Clipboards (usually) have a clipboard buffer (for CTRL + C -> CTRL + V) and a primary buffer (for selected text -> mouse middle button paste). Some problems arise from the confusing default settings of some clipboard managers, e.g. the synchronization of both buffers.

[–] BlueKey@fedia.io 2 points 1 day ago

The application was MPV. At random time it started consuming 100% of one core for a long time. I could track it down to the clipboard thread where a loop polls Wayland to get the latest content of the clipboard (selected text). Seems like a bug in some other application spamms this clipboard buffer from time to time and so caused the MPV loop to run continously.

This way I learned about that Wayland API and as MPV can emit logs whenever the poll loop got new data, I was able to see that it fired whenever I selected text in some application.

Good to know the name of this feature; primary buffer. Now I need to find a way to disable it.

What are the apps, exactly?