[Tip] Clear Clipboard on Plasma from the Terminal

Another terminal-centric tip, I spent a couple of hours today looking for how to do this and finally figured it out.

Suppose you want to copy a password or something sensitive. On Plasma you have Klipper, a pretty solid clipboard manager, but in order to clear history, you have to click on its icon on the tray, which displays your clipboard history to everyone standing behind you :male_detective: just so you can click on the little broom icon. Not to mention, you can easily forget to do that.

Wouldn’t it be great if the script that copied that sensitive information to clipboard also cleared your clipboard after, say 10 seconds? Well this is how you do it:

qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory

You can use it in a script, or alias it. If you put the script in ~/.config/plasma-workspace/shutdown it will clear the clipboard every time you log out of a Plasma session.




BLOAT :joy:


So, @keybreak , when are you binning EnOS and building your LFS machine?

It’s coming…soon ™ (see GNU/Hurd for more clues on how soon :upside_down_face:)

1 Like

Are you sure you don’t wanna just run machine code eg 0’s and 1’s? :wink: :rofl:

1 Like