My automatic thumbnail deletion approach is failing

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Laura-LM
Level 1
Level 1
Posts: 3
Joined: Tue Nov 23, 2021 7:09 pm

My automatic thumbnail deletion approach is failing

Post by Laura-LM »

System: Mint 20.1 / Cinnamon v4.8.6 / 64bit


Hello everyone! :)

I've been tinkering a little bit and unfortunately got stuck in spite of my best efforts.

What I intended to do was to make it so that thumbnails generated in Nemo no longer get stored on my hard drive.
I still want the thumbnail feature as it's very useful, I just don't want that thumbnail data to be stored.

After some research I found that one way of achieving this should be to create a symlink from the thumbnail cache to /dev/shm/, which should send any thumbnails created into RAM, causing them to be deleted after a poweroff.

So I deleted the thumbnail folder, created the symlink and it worked.
The thumbnails were verifiably being sent to /dev/shm/, which also resulted in a noticable speed increase when generating thumbnails.
Although Nemo started throwing the error:
"A problem has been detected with your thumbnail cache. Fixing it will require administrative privileges."


After restarting though, thumbnails were no longer being generated at all for some reason.
The symlink was still there and working, so were write permissions and nothing was preventing me from manually generating files in that folder.

I did eventually clear the system cache and thereby also restore the original functuality of the thumbnail cache, but when I made my changes again, the same thing happened.

Sending the thumbnails to /dev/shm/ worked once again prior, but not after the restart.


I appreciate any help I can get on this :)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
acerimusdux
Level 5
Level 5
Posts: 633
Joined: Sat Dec 26, 2009 3:36 pm

Re: My automatic thumbnail deletion approach is failing

Post by acerimusdux »

One thought is that you could set it up to mount that directory automatically in ram at boot, in the /etc/fstab file. Now I don't know where the thumbnail cache is located, but you seem to have already figured that out. I'll pretend for a moment though that your username is laura and the directory is /home/laura/.cache/nemo/thumbs. In that case, all you would need to add to the fstab is the following:

Code: Select all

tmpfs      /home/laura/.cache/nemo/thumbs      tmpfs
That should mount that directory in ram at boot using tmpfs.
Laura-LM
Level 1
Level 1
Posts: 3
Joined: Tue Nov 23, 2021 7:09 pm

Re: My automatic thumbnail deletion approach is failing

Post by Laura-LM »

Thank you for your response.


So I tried adding this line to /etc/fstab/, replacing my user name and the correct thumbnail directory, which is /home/username/.cache/thumbnails, but it appears that this isn't working as the files are once again being saved on my hard drive.

Tmpfs doesn't appear to be mounted properly, though I don't know how to verify or correct this.
acerimusdux
Level 5
Level 5
Posts: 633
Joined: Sat Dec 26, 2009 3:36 pm

Re: My automatic thumbnail deletion approach is failing

Post by acerimusdux »

try:

Code: Select all

df -h
That should tell you how things are mounted.

(Also, it won't mount from the fstab file until you reboot, in case I didn't make that clear.)
Laura-LM
Level 1
Level 1
Posts: 3
Joined: Tue Nov 23, 2021 7:09 pm

Re: My automatic thumbnail deletion approach is failing

Post by Laura-LM »

Yes, I had rebooted, but upon running df -h I can see that it wasn't mounted as I suspected.

This is the line I added at the end of fstab:

Code: Select all

tmpfs	/home/username/.cache/thumbnails	tmpfs
I don't know whether there was something else I should've done as I never edited fstab before, but it didn't work doing it this way.


Last bumped by Laura-LM on Sat Nov 27, 2021 5:18 pm.
Locked

Return to “Software & Applications”