Hacker News new | ask | show | jobs
by voxic11 972 days ago
So in X11 if you select something then close the application then middle click paste into another application nothing will happen?
5 comments

There are "clipboard managers" that will internally copy the last copied thing as best it can from the clipboard owner, and then when the application exits, will mark its copy as the clipboard owner going forward. If you aren't running a clipboard manager, then yes, nothing will happen.
Yep.

Lose selection === unable to copy. And it's at all times up to source app to decide what it will allow to be copied.

Some programs (such as xterm) will also use "cut buffers" (in addition to the primary selection, which is what is usually used for the middle button paste) which are retained even if the program is terminated. (Cut buffers are properties of the root window.)
The same thing happens with normal ctrl c + ctrl v. One of the oddities of the Linux desktop of X and Wayland is that for some reason the display server is also in charge of letting people use the clipboard instead of it being done by a dedicated clipboard service.
Correct