[PATCH] clip: Add Qt6 D-Bus support to fix "klipper" clipboard clearing
g-a-d at web.de
g-a-d at web.de
Wed Jul 16 12:42:54 UTC 2025
From: "Gerhard A. Dittes" <maestro.gerardo at gmail.com>
This change addresses the issue where the "klipper" clipboard manager
history is no longer cleared under newer Qt environments.
Background:
Most distributions have now switched to Plasma 6 and Qt 6.
As a result, the "Qt D-Bus" binary is no longer available as "qdbus"
(at least not in the executable path). Instead, the binaries are now
named "qdbus6" (on Debian- or Arch-based distributions) or "qdbus-qt6"
(on Red Hat-based systems).
Ideally, distributions should provide a generic "qdbus" call that points
to the correct version. But since no known distribution has implemented
this since the introduction of Qt 6, this fix serves as a simple and
quick workaround.
---
src/password-store.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/password-store.sh b/src/password-store.sh
index 22e818f..e05a2e2 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -190,7 +190,7 @@ clip() {
#
# Clipboard managers frequently write their history out in plaintext,
# so we axe it here:
- qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
+ $(command -v qdbus6 || command -v qdbus-qt6 || echo qdbus) org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null
echo "$before" | $BASE64 -d | "${copy_cmd[@]}"
) >/dev/null 2>&1 & disown
--
2.47.2
More information about the Password-Store
mailing list