On 2024-05-15, Michael <confabul...@kintzios.com> wrote:
> On Wednesday, 15 May 2024 15:37:22 BST Grant Edwards wrote:
>> On 2024-05-15, Michael <confabul...@kintzios.com> wrote:
>
>> > The Clipboard may be stored in RAM or cache of any applications
>> > which use this method.
>> 
>> AFAICT, the clipboard contents is stored in the X server. When you
>> cut/copy something, the application sends that something to the X
>> server where it's stored.  When that application exits, the clipboard
>> contents are still there in the X server, and can still be requested
>> by other applications who want to do a "paste".
>
> What you write makes sense.

I got curious, and did some more Googling. It looks like the clipboard
contents only survive application exit if the application explicitly
tells the server it wants the clipboard contents to persist.  But,
AFIACT, that's what all apps do.

> I am not sure what happens in Wayland, where application windows are
> supposed to be isolated.

I try not to think about Wayland and dread the day when I'm forced to switch. :)

It's taken me 40 years to figure out X (most-sort-of)...

> I recall in earlier days the Primary selection would not work
> between windows, which was rather frustrating.  I think at present
> the Plasma desktop clipboard application acts as a mediator,
> probably engaging Xwayland - but I am not sure.
>
> There are quite a few settings in Plasma's clipboard application to
> configure interoperability between Primary & Clipboard selection and
> can be set to save the Primary selection in the Clipboard section
> and its history if so desired.
>
> With my current settings I can middle click to paste a Primary
> selection into Konsole, but Shift+Insert which works with Xterm &
> friends does not work with Konsole.

There probably should have been a section on cutbuffers, selections,
and clipboards in the X11 section of the Unix Hater's Handbook.

.... which I highly recommend, BTW:

  https://web.mit.edu/~simsong/www/ugh.pdf
  https://en.wikipedia.org/wiki/The_UNIX-HATERS_Handbook





Reply via email to