Getting rid of "Close Firefox - Firefox is already running, but is not responding"
By blogfinger on Dec 02, 2008
Sometimes, one Firefox instance is not enough. For example, if you want to separate two Java applets which otherwise would be using the same instance of the JVM. Or if an application times out and you have to log in again but the application does not clean up its cookies so you would have to close the whole browser with all its tabs before you can restart that application.
You may already have seen this nice picture if you attempt to start a second instance of Firefox, using an already existing profile:
For these cases, I have developed a short script that:
- creates a new Firefox profile, using the -CreateProfile command line option
- copies all the files from another profile (name template, must exist before) to the newly created profile directory
- runs firefox -P <new profile> -no-remote
- removes the profile directory afterwards
- and also cleans up the profiles.ini file.
Any customizing or configuration, like installing add-ons or setting preferences, should be performed in the template profile, as any customizing in the newly created profile will be gone after ending Firefox when using the script. You already know how to start Firefox with profile template, right? If not, it's: firefox -P template -no-remote
Click here for the script
Oh - although I tested it (on Solaris), using up to 5 Firefox 3 instances and closing them in different orders, there's absolutely no guarantee, warranty or similar. Feedback is welcome.