/home/thumbnails

User created HOW-TOs, guides and workarounds.

Moderators: aysabzevar, mandog, alan, bkashaf, xet7, cmost, blix

/home/thumbnails

Postby mandog » Wed Aug 13, 2008 9:31 pm

Can somebody explain why thumbnails are auto saved to this folder but not deleted upon shutdown?, I deleted 16,000+ thumbnails from this folder, this all has to load every time I startup. Sidux with gnome does the same and massive amount of thumbnails surely does not speed up file browsing!
Parsix running AMD FX(tm)-6100 Six-Core Processor, Gigabyte mother board 8gb ram, Nvidia graphic card 1gb unboard ram, Plextor PX760, EPSON R300, 2x 500gb hds, sata+3x 500gb, 1x2tb Hardrives, 23" AOC monitor 1980X1080 Resolution
mandog
Forum Moderator
Forum Moderator
 
Posts: 483
Joined: Fri Jan 25, 2008 3:08 pm
Location: Peru

RE: /home/thumbnails

Postby cmost » Thu Aug 14, 2008 12:05 am

You could always create a little script that automatically deletes this directory and all of its contents and have it execute either before you shut down or (easier) when you log in. This way they're cleaned up on a regular basis. An example script might be made like this:

1. Create a new text file
2. Copy and paste the following (change "username" to your appropriate username):

#!/bin/bash
#cleanup the ./thumbnails directory in Gnome
rm -r /home/username/.thumbnails

3. Save the file as delete_thumbnails (no extension required.)
4. Right-click on the file, select properties and then the permissons tab. Tick the box next to 'allow executing file as program'
5. Click 'ok'

Now the fun part...
6. To make the file run every time you log in, simply go to 'System' --> 'preferences' --> 'Sessions'. Add a new entry and browse to the location of your script for the command. Close. Viola! (pun intended!)

Alternately, you can make the script run every time you shut down. This is a bit trickier but not too bad if you're careful.
One way is to copy the file (as root) into /etc/rc0.d with a name like "Snndelete_thumbnails" where "nn" is a number. This will cause it to run as the nn'th item when entering runlevel 0 (ie, shutdown).

While the above will work, it is a bit hackish. The correct way would be to drop the script into /etc/init.d/delete_thumbnails; then use
"sudo update-rc.d" to insert your script at the correct places:

$sudo update-rc.d delete_thumbnails start nn 0

(Again, where "nn" is the order you want to run your script. If you want it to run on BOTH shutdown and reboot (run levels 0 and 6
respectively) then append "6" to the upate-rc.d line above. Be careful about where you run your script (the "nn") as it may rely on services that get stopped during shutdown/reboot. In this case, I don't think it matters since you're just deleting a directory but for other scripts this may be important! Conversely, some script's changes may be over-written by a process after your script has run.

Let me know if this has helped! Good luck!
AMD Phenom II 64 X6 1090T Black Edition Hexa-Core
8192 MB DDR2 RAM
nVidia GeForce GTX 660 w 2048 MB DDR5
Linux Mint Debian Edition 64 Bit
Parsix (Debian Testing) GNU/Linux 64 Bit
Liquorix Kernel 3.12.x
cmost
Forum Moderator
Forum Moderator
 
Posts: 212
Joined: Tue Feb 19, 2008 4:16 am
Location: Cincinnati, Ohio

Postby mandog » Fri Aug 15, 2008 8:37 am

Cmost
I.m going the let the thumbnail folder build up a bit then do some testing at the moment I just delete the whole folder and it recreates it self empty upon reboot. I do a lot of photo work some 100gb so you can see the problem thousands of thumbnails being saved.
Parsix running AMD FX(tm)-6100 Six-Core Processor, Gigabyte mother board 8gb ram, Nvidia graphic card 1gb unboard ram, Plextor PX760, EPSON R300, 2x 500gb hds, sata+3x 500gb, 1x2tb Hardrives, 23" AOC monitor 1980X1080 Resolution
mandog
Forum Moderator
Forum Moderator
 
Posts: 483
Joined: Fri Jan 25, 2008 3:08 pm
Location: Peru

Postby xet7 » Fri Aug 15, 2008 7:13 pm

I have added this to the wiki to keep track of it:

Fixes for everything we know of
=> Temp files taking too much disk space
http://www.parsix.org/html/PNphpBB2-vie ... t-414.html
xet7
Forum Moderator
Forum Moderator
 
Posts: 205
Joined: Wed Feb 20, 2008 12:22 pm
Location: Finland


Return to HOW-TOs - English

Who is online

Users browsing this forum: No registered users and 1 guest

cron