Sorry, you need to enable JavaScript to visit this website.

Firefox / Icecat Tips

Homer's picture

Kill that damned "urlclassifier3.sqlite" problem once and for all

Turn off (uncheck) "Block reported attack sites" and "Block reported web forgeries" in Firefox/Icecat security preferences. Unless you're an idiot, or running Windows, then you probably don't need this.

Then quit Firefox/Icecat, and:

cd "$HOME"
find . -name urlclassifier3.sqlite -exec rm -f {} ';' -exec touch {} ';'
su -c "find . -name urlclassifier3.sqlite -exec chattr +i {} ';'"

"chattr +i" means "change the file attributes to immutable", meaning "can't change or delete".

This will now ensure urlclassifier3.sqlite remains a zero byte file forever.

If you ever want to delete or change that file in the future, you'll need to do this first:

su -c "find . -name urlclassifier3.sqlite -exec chattr -i {} ';'"

Note: You'll need extended attributes enabled on the filesystem (most distros have this by default). If you're unlucky enough to not have this, then you'll need to set "CONFIG_EXT3_FS_XATTR=y" (and similarly for EXT2 and EXT4, if you use them) in your kernel config, then rebuild and install it.

Move the cache to memory

Speed up the browser and improve your privacy:

Again, this requires kernel support for SHM ("CONFIG_SHMEM=y").

cd "$HOME"
find .{gnu,mo}zilla 2>/dev/null -maxdepth 3 -name prefs.js
# Edit that file(s) with your favourite text editor
# Find the string "browser.cache.disk.parent_directory"
# If it's not there, then add the following
user_pref("browser.cache.disk.parent_directory", "/dev/shm/userid/icecat");
# If it is there, then edit it to read as above.
# Replace "userid" with your actual username, (and "icecat" with firefox if appropriate)
# Save and quit
# Then edit /etc/rc.local (or /etc/conf.d/local.start on Gentoo)
# Add the following:
mkdir -p /dev/shm/userid/{.adobe,.macromedia,icecat}
chown -R userid:userid /dev/shm/userid
# Again, replacing "userid" with your actual username (and "icecat" with firefox if appropriate)
# Run that now, for the current session (remember to edit where necessary):
mkdir -p /dev/shm/userid/{.adobe,.macromedia,icecat}
find .{gnu,mo}zilla 2>/dev/null -maxdepth 3 -type d -name Cache
# "rm -rf" that directory

This will ensure your cache is wiped every time you reboot.

Stop Adobe Flash tracking your Web browsing (Flash cookies)

cd "$HOME"
rm -rf .adobe .macromedia
# Note the leading dots in the above names. These are hidden dotfiles.
ln -s /dev/shm/userid/.adobe .
ln -s /dev/shm/userid/.macromedia .
# Again, note the leading dots in the names, and especially the trailing space + dot (meaning current directory).

Flash will still work, but when you reboot all the tracking data is automatically wiped.

Or ... for the really paranoid:

ln -s /dev/null .adobe
ln -s /dev/null .macromedia

Another method is to use xattrs, as done earlier with urlclassifier3.sqlite:

touch .adobe .macromedia
su -c "chattr +i .adobe .macromedia"

Personally, I'd just leave them linked to SHM, as some sites tend to not work very well unless they can at least temporarily access the Flash directories (e.g. YouTube).

That's it for now.