Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2022-04

Lazarus GTK clears clipboard on exit

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

History:

I'm fighting with google-chrome-stable on Manjaro Linux XFCE that clears clipboard history when closed.

Searched in vain with google but just noticed: gtk applications as lazarus-ide does it also and clears history on exit. Same with apps developed with lazarus.

I rember, but not shure, that this behaviour of an application is? "usual" on linux??

Firefox for example is not doing this ...

Info:

Lazarus 2.3.0 (rev main-2_3-1125-g468f788b36) FPC 3.2.2 x86_64-linux-gtk2

Why do i asked this? Makes me crazy if i searched with google , found something useful, copied, closed Chrome and shit: its gone. I have a clipboard manager copyq where i can activate this item again ... annoying :-(

Tipps are welcome

John

Reply by email

Fred van Stappen
to John Landmesser

Hello.

GTK uses X11 and under X, there isn't really a clipboard.

See https://unix.stackexchange.com/questions/450508/how-to-keep-clipboard-content-from-xterm-after-closing-it-like-firefox-or-le

Firefox has his own clipboard manager.

The easiest is to use a clipboard manager, for example with XFCE: xfce4-clipman ( To install : sudo apt-get install clipman and to run : xfce4-clipman )

Just run it before your application and use it after close your application.

If you want create your own clipboard manager, like Firefox does, it is more tricky...

________________________________
De : lazarus de la part de John Landmesser via lazarus Envoy? : vendredi 22 avril 2022 12:54
? :
Cc : John Landmesser
Objet : [Lazarus] Lazarus GTK clears clipboard on exit

History:

I'm fighting with google-chrome-stable on Manjaro Linux XFCE that clears clipboard history when closed.

Searched in vain with google but just noticed: gtk applications as lazarus-ide does it also and clears history on exit. Same with apps developed with lazarus.

I rember, but not shure, that this behaviour of an application is "usual" on linux??

Firefox for example is not doing this ...

Info:

Lazarus 2.3.0 (rev main-2_3-1125-g468f788b36) FPC 3.2.2 x86_64-linux-gtk2

Why do i asked this? Makes me crazy if i searched with google , found something useful, copied, closed Chrome and shit: its gone. I have a clipboard manager copyq where i can activate this item again ... annoying :-(

Tipps are welcome

John

Reply by email

R.Smith
to John Landmesser: History: I'm fighting with google-chrome-stable on Manjaro Linux XFCE that clears…
John Landmesser wrote 5 lines
I'm fighting with google-chrome-stable on Manjaro Linux XFCE that clears clipboard history when closed. ... I rember, but not shure, that this behaviour of an application is "usual" on linux??

It's Arch + X11, so yes, because of this:
https://wiki.archlinux.org/title/clipboard

i.e. There is no real "clipbaord" space, "Copy" is handled more like a "Promise-to-send-if-asked", but if asked after you are dead, then fulfilling that promise is hard.

Best option is to install one of the myriad of clipboard managers. They persist the copied data in local buffers and promise it forward.

Firefox for example is not doing this ...

That's because Firefox never really fully exits, its clipboard manager remains, I believe. They solved this their way because they encountered this same problem even on Ubuntu some years ago, used to be a known irritating bug that Firefox specifically "lost the clipboard contents" after exiting.
Ref: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/21202

Tipps are welcome

As stated before, a clipboard maanger is the only real option. A Google search for this specifically should be very fruitful.

Reply by email

John Landmesser
to R.Smith
R.Smith wrote
As stated before, a clipboard maanger is the only real option. A Google search for this specifically should be very fruitful.

Thanks for these? informations!

I use a really useful clipboard manager "copyq" and there i noticed. strange: clipboard ist empty ... and there my search started.!

Now i have to hit two key strokes to activate the copied item in copyq history ... thats ok.

Plus i learned something about clipboards in Linux ... thank you!

Reply by email