[Wylug-help] Firefox profile

Phil Driscoll phil at dialsolutions.co.uk
Fri May 20 14:15:32 BST 2005


On Friday 20 May 2005 13:19, Andy Macdonald wrote:
> Anyone know how to make it read the profile but not store it at exit-time?
Here's the relevant part of a bash script I used a few years ago on an
LTSP setup for starting mozilla with a known good configuration.
It doesn't quite do what you want, in that the user's profile is read/write
and will be overwritten, however I set the users desktops up so that when
they wanted to run mozilla, they ended up running this script instead, which
copies over and tweaks a mozilla profile from a known good location.
I suspect that this will work (perhaps with a few modifications) for firefox.

#SOURCE is the 'golden' directory to copy config files from
SOURCE='/home/goldenuser'
#DEST is where to put them
DEST=$HOME
MAGIC='ef07w99h.slt'

#copy all files from .mozilla directory except secmod.db and contents of Cache
#chown eveything to current user
#create and chown /tmp/username/mozilla
#hack prefs.js and edit the following line
#user_pref("browser.cache.disk.parent_directory", "/tmp/username/mozilla");
cp -fr "$SOURCE/.mozilla" "$DEST"
chown -R "$USER" "$DEST/.mozilla"
mkdir -p "/tmp/$USER/mozilla"
chown -R "$USER" "/tmp/$USER/mozilla"
rm -f "$DEST/.mozilla/appreg"
sed "s:$SOURCE/.mozilla/default/$MAGIC:/tmp/$USER/mozilla:g" "$SOURCE/.mozilla/default/$MAGIC/prefs.js" >"$DEST/.mozilla/default/$MAGIC/prefs.js"
exec "/usr/local/mozilla/mozilla" -splash $*;

-- 
Phil Driscoll



More information about the Wylug-help mailing list