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.


3 Answers 3


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;


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.)


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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .