Posts tagged: Firefox

OS X – Running two copies of Firefox at the same time

The essential trick to running two copies of Firefox at the same time on OS X is to run them both with the commant line options ‘–no-remote’.

/Applications/Web/Firefox.app/Contents/MacOS/firefox -no-remote

I chose to do serveral more things to create a really clean solution.

Create a new profile – say ‘FirefoxTest’

/Applications/Web/Firefox.app/Contents/MacOS/firefox -ProfileManager

Create a new copy of the Firefox application

rsync – a  /Applications/Web/Firefox.app/  /Applications/Web/FirefoxTest.app

Create script files to start both copies of Firefox

In /Applications/Web/Firefox.app/Contents/MacOS, create a executable script file with contents similar to:

#!/usr/bin/env bash

# firefox-single

# Run a standard Firefox setup, but disable single application locking

/Applications/Web/Firefox.app/Contents/MacOS/firefox -P default --no-remote &

And for the second copy of Firefox, in /Applications/Web/FirefoxTest.app/Contents/MacOS something similar to

#!/usr/bin/env bash

# firefox-test

# Run a test Firefox setup, but disable single application locking

/Applications/Web/FirefoxTest.app/Contents/MacOS/firefox -P FirefoxTest --no-remote &

Change the application ‘Info.plist’ file

(in Firefox.app/Contents or the equivalent location)

Key Value
CFBundleExecutable firefox-single
CFBundleIdentifier org.mozilla.firefox.single

For the test copy, use something similar to the following:

Key Value
CFBundleExecutable firefox-test
CFBundleIdentifier org.mozilla.firefox.single-test

The ‘CFBundleExecutable’ entry links the startup Icon (also the command-line ‘open’ command) to the new script file you’ve created to run Firefox.

The ‘CFBundleIdentifier’ ensures that OS X sees separate applications running when managing the applications.

Recache the ‘Info.plist’ file

The last, critical step, is to force OS X to recache the ‘Info.plist’ file (where it caches I don’t know):

touch /Applications/Web/Firefox.app

and

touch /Applications/Web/FirefoxTest.app

Conclusion

Now you’ve got two nice icons you can drag to your toolbar to click, you’ll be running two copies of Firefox side by side – and you’ll forget you had to do this.

Firefox – Enable/Disable Javascript Caching

To enable/disable Javascript caching in Firefox in about:config:

network.http.use-cache = true/false

Firefox – Keep alive setting

network.http.keep-alive.timeout 30

WordPress Themes