Is there a way to auto-delete the clipboard history? I have some users which really don’t check the clipboard app and for security it would be nice to auto-delete entries of a certain age.
thru the gui you can only limit the number of entries … so presumably, anything sensitive would eventually roll off the back of the desk as the user keeps adding things to the clipboard.
there is no timer or as far as i know any time stamp related to each entry to judge it’s age… only its’ position in the que.
Got it, I just set it to 1 which should be good enough
Thanks - I just set it to 1 which should be safe enough
~/.local/share/klipper/history2.lst
seems to be where the contents of the clipboard are kept.
i suppose it would be possible to monitor that somehow for changes over time.
for now I think the simplest thing is to simply change the history to a single itme
thank, now I see it, I had changed the setting to only show it if it had content which is why I couldn’t see it.
Bzzzzz, sorry, wrong Had a look myself and on my machine history2.lst is dated from back in February and none of the contents looked familiar. I then fired up dBeaver and had a look at history3.sqlite and there is the data.
As suggested to the original poster, I’ve set my entry count to 1 and then looking at the db, it reflects this. I changed the entry count a few times, up and down, and copied a few things and yes, it tracks the number to keep.
Having said that, I am a bit concerned, please bear in mind I have no idea as to the inner workings of SQLite, that the history3 file is almost 1MB in size and there are two other history3 files, sqlite-shm, 32KB, & sqlite-wal, 4MB. There is also a data dir that contains stuff. As to what is in these files I have no idea hence I would not look at setting the count to 1 as a secure method of autodelete unless the person who actually wrote the code can give a quick, 20 words or less, outline of how this works.
Regards,
Andrew
You can set up a cron script to run this every minute:
qdbus6 org.kde.klipper /klipper clearClipboardHistory
The package is usually available, if not, try looking for:
qdbus-qt6/noble
(on the unrelated note I am becoming a master of running dbus commands manually )
That might be on older KDE. There is no such file on new KDE / Plasma 6.
ah, i also got the path wrong (fixed).
yes, i’m on plasma 5 so who knows what plasma 6 is doing with all those databases.
maybe they are putting timestamps on the contents of klipper do that an age limit time out is possible.
btw, nice dBeaver.