Firefox 42 came and with it my hitherto working hack of clean profiles became extremely unstable. At least, that’s what I’m hoping the instability is due to and not just that FF 42 is in itself so buggy. (It did use to fall down before also quite easily whenever I started messing around in the console, but with V42 it just kept crashing left and right during regular use.)
So I changed my approach quite drastically in the script: now I’m generating individual temporary profile clone directories from the read-only profile and modifying profiles.ini on the fly. This was actually the way I intended to go about it from the start, but with V<42 I just found that deleting any existing profile (& related cache) directory had little effect on already-running Firefox windows, so I took the shortcut.
Anyway, a couple of hours of Bash-wrangling and I now think I have it working just as before. It remains to be seen whether this actually has any effect on the crashing problem though.
I’ve also done one minor tweak in the read-only profile: I added a userChrome.css file to hide the full screen warning.
@-moz-document url(chrome://browser/content/browser.xul) {#full-screen-warning-container {display: none;}}
I know it’s a safety measure but god damn is it annoyingly obtrusive.