Fixed clipboard v2#96
Conversation
|
The fix provided does not fix the issue in a flatpak. Sorry, I forgot to mention that testing local is fine for initial testing but should also be tested within a flatpak afterwards as this project is largely used via flatpak. This has been a struggle since the start of this project - not everything works as expected in flatpak so workarounds are sometimes needed. Just a quick look at the code - I believe the removal of wl-clipboard-rs (this is what I was using to read the clipboard in sandboxed environment) - CONFIRMED IN LOGS I have built-in an opt-in logger for flatpak that logs the kdeconnect-service and the applet. This has been helpful to figure out these issues. Command to enable: flatpak override --user --env=RUST_LOG=info --env=KDECONNECT_LOG_FILE=1 io.github.hepp3n.kdeconnectCommand to disable: flatpak override --user --unset-env=RUST_LOG --unset-env=KDECONNECT_LOG_FILE io.github.hepp3n.kdeconnectLogs will be generated in NOTE killall cosmic-panelYou can always use flatpak kill commands as well as a safer alternative. Let me know if you want to continue to pursue this fix. Please close PR if not. One last thing, if send a PR that is AI generated please put in commit message: Thanks. |
|
Looks like I fixed it, now more testing |
|
No, do not remove that. This is needed for building the flatpak correctly and keeps the flatpak size small. So not useless. |
|
Ok! |

Summary
This PR moves clipboard synchronization into the background service and implements reliable bidirectional text clipboard sharing.
Changes
The initial clipboard discovered when the service starts receives timestamp 0, because its actual age is unknown. It is cached for manual sharing but does not incorrectly override a newer remote clipboard.
This PR currently handles text clipboard content only. File and image clipboard transfer is intentionally out of scope.
Testing
My own tests
Ai usage