| Summary: | Option to auto erase content after a certain amount of time | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Atle <atle.pedersen> |
| Component: | Clipboard widget & pop-up | Assignee: | Esben Mose Hansen <kde> |
| Status: | RESOLVED INTENTIONAL | ||
| Severity: | wishlist | CC: | adaptee, htpha, mike.pike, nate, niccolo, unix1 |
| Priority: | NOR | ||
| Version First Reported In: | 5.15.3 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Gentoo Packages | ||
| OS: | Unspecified | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | script to clear kde/klipper clipboard after n seconds of last 'copy' action | ||
|
Description
Atle
2009-02-23 10:07:51 UTC
I think "saving password in some file for copying later" is insecure by nature. Klipper just increases the chance that other see your password accidentally.
> Usually the content is needed within a very few seconds anyway.
For this password case, it is true. But for general cases, that 'auto erasing' feature is essentially against the goal of Klipper: track the clipboard history for later use. I know many users set large size for the clipboard history, and they probably won't like or be interested with this option.
An possible solution for this password problem is allow users to delete some history item manually, for example, by pressing the 'Delete' key on it.
*** Bug 351659 has been marked as a duplicate of this bug. *** Created attachment 156935 [details]
script to clear kde/klipper clipboard after n seconds of last 'copy' action
I would like to see this request revisited. With the popularity of password managers and the increasing use of pseudorandom strings as identifiers for things like crypto wallets, the clipboard is increasingly used to hold highly sensitive information. This has also been a lure for malicious actors. And while the overwhelming majority, of those malicious actors target Windows users, I would prefer we not become victims of our own hubris :) Currently I manage this with a script that runs from .config/autostart and checks org.kde.klipper.klipper.getClipboardContents once per minute. Then, when extant data in the clipboard is unchanged for >10 minutes, it runs clearClipboardHistory. A more perfect (for me) solution would watch for clipboard activity (copy AND paste), then clear the contents if there is no activity for x seconds. Seeing a check box for "Automatically clear clipboard history when inactive?" and a box to specify how many seconds after the last copy/paste action to wait near 'Clipboard history' in the Klipper configuration applet seems to make perfect sense. :) (In reply to Mike from comment #3) > Created attachment 156935 [details] > script to clear kde/klipper clipboard after n seconds of last 'copy' action (In reply to Mike from comment #4) > Currently I manage this with a script that runs from .config/autostart and > checks org.kde.klipper.klipper.getClipboardContents once per minute. Then, > when extant data in the clipboard is unchanged for >10 minutes, it runs > clearClipboardHistory. > > A more perfect (for me) solution would watch for clipboard activity (copy > AND paste), then clear the contents if there is no activity for x seconds. Hi! I might have a solution/workaround for you :^) I was working on a solution to open mpv on copying youtube urls. I am using Klippers Action Menu for this to pass all urls matching my pattern to mpv but this will clutter Klipper with youtube links after a while. Therefore I wanted these Klipper entries to be removed on triggering my Klipper action. If you suppress the output of your command or your command doesn't write to stdout and select "Replace current clipboard" for "Output from command:" this entry will be removed from Klippers list. So here is something you can try: 1. Create a new Klipper Action: Configure Clipboard > Actions Configuration > Add Action 2. Action Properties: Enter your regex pattern and description, ie. "Clear clipboard history in ... secs after this copy" > Add Command 3. Command Properties: Command: sleep $YOUR_X_SECS && qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory 4. Command Properties: Output from command: Replace current clipboard (if you want this specific entry to be deleted instead of whole history) 4. ?? 5. Profit With this you have control over when the history should be cleared instead of relying on a timer. In my case only entries I want to be removed will be affected and everything else stays. I don't use any delay, only surpressing mpv's output is enough. You can do something similar for anything you don't want to stay in the history. Name the Action something like "Delete this in 10secs" and as Command only use sleep. I also ticked "Show action popup menu:" to "Immediately on selection" or you can press your shortcut to trigger the Action menu. I believe Meta+Ctrl+R is the default. At nate@kde.org: what is the purpose of org.kde.klipper.klipper.clearClipboardContents? It doesn't seem to do anything.. Sounds like a solution was provided? Also the ability to lock certain items was recently implemented too. (In reply to Niccolò Venerandi from comment #6) > Sounds like a solution was provided? Also the ability to lock certain items > was recently implemented too. These are workarounds. Workarounds are not solutions to a feature request. |