Trying to write script to erase "recently used" logs

Hi, I'm trying to write a little script that keeps apps in Ubuntu Mate from showing what files I recently used in them. I've got the impression that in Mate, the main track record of what files I've accessed (aside from the files' own "last modified" and "last accessed" information, which I'm not dealing with) is in files in the .local/share directory that have names starting with "recently-used.xbel", so I'm focusing on those, but I'm sure that I've overlooked something.

For the record, I'm not trying to fool forensics experts, just people who might be looking over my shoulder while I'm doing stuff on my computer. Also for the record, I've already set Firefox to delete my history every time I close it. To simplify things, I've put a starter button for the script into my panel.

Here's what I've got so far:

#!/bin/bash
echo 'Trying to remove flash directories...'
rm -rv /home/(myusername)/.adobe/ /home/(myusername)/.macromedia/
echo 'Trying to clear clipboard'
touch blank
xclip -selection clipboard blank
xclip -i /dev/null
echo 'Trying to delete recently-used'
rm -rv /home/(myusername)/.local/share/recently-used.xb*
echo 'Finishing script...'
aplay /home/(myusername)/soft.wav
echo 'Done'

Any ideas on what else might belong in a script like this, in Mate? Again, it's not meant to provide professional-level security, just some basic protection from people having a quick look at my screen.

Hi, maybe you want to delete ~/.bash_history and ~/.cache/thumbnails/ as well.

1 Like

You can do some cleaning inside /tmp if some of your apps have mess there.
Additionally you can clear some logs or force them to rotate in order not to be easy to check.

sudo dmesg clear
logrotate <whatyouwant>

1 Like