Take the 2-minute tour ×

By default, Firefox and Thunderbird save their files to ~/.mozilla and ~/.thunderbird.

I am wondering if there's an environment variable I can set, to have either of them save their data to a different location. I want to have multiple instances of them available, each with their own settings for server and application testing. I can do this with the-no-remote option and Profile Manager of each, but I was wondering if I could totally keep the testing profiles separate from my main configuration.

This would also enable me to keep the profiles in source control if I so desired.

share|improve this question
You could try HOME=~/testing and populate ~/testing/.mozilla, but since these are Gnome programs it apparently won't work. –  Gilles Jun 16 '11 at 8:09

3 Answers 3

Firefox and Thunderbird do not have a built-in method of doing this, so your best bet would be to use individual profiles (via the Profile Manager) or some other means.

mauilion is correct, though, that you can (ab)use symbolic links to acheive similar results, but you can only do that between individual sessions - it would be a very bad idea to modify the location of ~/.mozilla while Firefox is running! (Trust me, I tried that. Firefox wasn't happy about that.)

share|improve this answer

Not sure about environment variables. However, you could do some clever work with linking.

Say you wanted the files in /opt. As root: mv /home/$user/.thunderbird /opt/thunderbird, then link it back in with ln -sfn /opt/thunderbird /home/$user/.thunderbird.

You could also do this with an NFS mount or any number of other options. You can also make a mountpoint in /etc/fstab that mounts some remote directory or some local partition to /home/$user/.thunderbird.

share|improve this answer

Figured it out. If I change $HOME, thunderbird respects the change. I start the new instance up with a script like


export HOME=/home/moo/work/test

mkdir $HOME/.mozilla $HOME/.thunderbird;
ln -s .mozilla mozilla;
ln -s .thunderbird thunderbird;

/usr/bin/thunderbird -no-remote;

share|improve this answer

Your Answer


