Skip to content

v1.3.1 — fix silent image-paste failure on Linux

Latest

Choose a tag to compare

@rayss868 rayss868 released this 14 Oct 09:22

Fixes Linux image pastes failing silently when no clipboard helper is installed.

The bug

The WebKitGTK paste bridge (WebKit strips image payloads from paste events, so the app reads them back from the OS clipboard through xclip or wl-paste) returned an empty result with no signal at all when neither helper was installed. The .deb only listed them under Recommends, so on a fresh install the helper was often absent — pasting a screenshot simply did nothing, with no error, no notification, nothing to go on.

The fix

  • xclip | wl-clipboard promoted from Recommends to Depends — the paste bridge now always has a clipboard helper.
  • New paste.ClipboardTool/InstallHint/WarningText/WarningScript: when no helper is found the app shows a dismissible in-page banner and a tray balloon naming the exact package to install. When a helper is present, nothing is injected — the healthy path costs nothing.
  • Windows keeps a no-op stub, so internal/paste stays platform-paired (//go:build linux / //go:build windows).

Verified

  • go build / go vet / go test green on GOOS=linux and GOOS=windows
  • 7 tests in internal/paste pass, including two new regression guards: warning present when the helper is missing, and nothing injected when it is present
  • Warning behaviour confirmed live: xclip present → no warning; PATH stripped → tool="" warn="Paste gambar nonaktif: paket \"xclip\" belum terpasang. Jalankan: sudo apt install xclip"
  • Generated banner script passes node --check (valid JS)
  • End-to-end paste bridge re-verified on WebKitGTK 2.52.6: an empty-DataTransfer paste produces a ClipboardEvent carrying clipboard.png (type=image/png)

Assets

  • WaGramDeskLite.exe — Windows (PE32+, VERSIONINFO 1.3.1)
  • WaGramDeskLite-linux-amd64 — standalone Linux binary
  • wagramdesklite_1.3.1_amd64.deb — Debian/Ubuntu package, now Depends: ... , xclip | wl-clipboard
  • SHA256SUMS.txt

If you already have 1.3.0 installed: sudo dpkg -i wagramdesklite_1.3.1_amd64.deb pulls the clipboard helper automatically and the banner will not appear.