In another forum, someone reminded me of a better way to solve this multiple cookie database problem. As long as I'm willing to use Firefox instead of Safari (and I am), I can set up multiple Firefox profiles under a single user ID. Each profile manages a different set of Firefox attributes, including a distinct cookie database. Here's how to do it:
1. Install Firefox.
2. Open a Terminal window and type the following command:
Code:
/Applications/Firefox.app/Contents/MacOS/firefox -ProfileManager
Replace
/Applications/Firefox.app with the pathname of the location in which the Firefox application is installed.
This starts a dialog which lets you create new Firefox profiles.
3. Create as many of these profiles as you need. Assume for the sake of this discussion that they're called
profile0,
profile1,
profile2,
etc.
4. Create a shell script that looks like this:
Code:
#!/bin/sh
[ $# -gt 0 ] && {
set -- -P "${@}"
}
/Applications/Firefox.app/Contents/MacOS/firefox -no-remote -browser -P "$@" &
exit 0
You can name this shell script anything you want. Assume it's called
runFirefox. Again, replace
/Applications/Firefox.app with the Firefox application's install location.
5. Issue this command in the Terminal window to ensure that the shell script is executable:
6. Open up
Script Editor and create the following AppleScript:
Code:
do shell script "/path/to/runFirefox profile0 1>/dev/null 2>&1"
... where
/path/to is the pathname of the directory in which you created this shell script.
You should use any of the Firefox profile names you created above instead of
profile0.
7. In the
Script Editor menu, select
File->Save As and save this AppleScript with a suitable name in an appropriate location. For example, you could call it
Firefox-profile0. Make sure that the
File Format you save it under is
Application, and that none of the
Options are selected.
Now, you can run this AppleScript from the
Finder or drag it to the dock.
Repeat steps 6 and 7 for all the Firefox profiles.
PS: I edited this message and made a change to step 6. I added "
1>/dev/null 2>&1" to the end of the
do shell script command.
.