Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

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

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

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

#!/bin/bash

OLDHOME=$HOME;
export HOME=/home/moo/work/test

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

/usr/bin/thunderbird -no-remote;

export HOME=$OLDHOME;
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.