2 # Runs an isolated Firefox session in its own profile. - Matt 2007-12-02
8 function write_profiles_ini {
11 echo 'StartWithLastProfile=1'
15 if [ -d "$dir" ]; then
26 mv profiles.ini.tmp profiles.ini
29 function new_profile {
30 name="isolated-$$-$(date +%s)"
31 cp2 00000000.master/ "00000000.$name/"
36 function liquidate_profile {
39 rsync -rl --compare-dest=../00000000.master --checksum "$dir/" "$cdir/"
42 find "$cdir" -type d -empty -delete
43 if [ -e "$cdir" ]; then
44 find_out="$(find "$cdir" -type f -print)"
45 zenity --info --text="This session changed the following files; you may wish to review the changes for application to the master profile:
51 function run_isolated {
54 name="$(cd "$MDD"; new_profile)"
55 zenity --info --text="Beginning isolated Firefox session $name"
56 "$ff" -no-remote -P "$name" "$@"
57 (cd "$MDD"; liquidate_profile "$name")
60 run_isolated /usr/bin/firefox "$@"