Registered Member
|
How can I clear the clipboard history from the command line on Plasma 5?
I'm copying some sensitive information from a file using `xclip -sel c` and I would like to clear the clipboard when my script exits, but I can't find how to do that anywhere in the documentation...
Currently running Plasma 5.26.3 on Arch Linux (as of November 2022, the signature could be outdated by now).
|
Manager
|
Click on the Clipboard icon in the System Tray and use the "Clean history" button at the top right
Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ... |
Registered Member
|
It is regrettable you haven't even bothered to read my post. It would have been better if you hadn't replied at all: now the post no longer appears in the unanswered posts, and the likelihood of someone replying with something useful is diminished.
Currently running Plasma 5.26.3 on Arch Linux (as of November 2022, the signature could be outdated by now).
|
Registered Member
|
If you are using klipper, QDbusViewer shows that org.kde.klipper has a clearClipboardContents and clearClipboardHistory method that you should be able to invoke using dbus.
I haven't done enough dbus scripting to post the exact syntax here, I think there are examples online. |
Registered Member
|
Thanks!
The exact command is:
Works like a charm!
Currently running Plasma 5.26.3 on Arch Linux (as of November 2022, the signature could be outdated by now).
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]