Note that having two Safari's in the dock is simple: just run /Applications/Safari.app/Contents/MacOS/Safari in a terminal Window. Those will share the same preferences and bookmarks though.
Although I am using Safari as the example here, this technique can actually be applied to any Mac OS X application.
Why would you want to do this? Well, for one reason so that you can have separate preferences or bookmarks. Another reason is because of application crashes which take down all your open Windows. For example, I often do things in Terminal that can crash all my terminal sessions, but not if I keep separate instances of Terminal open. You might want to do this with an Email application to keep two totally separate accounts - there are all kinds of reasons.
The first step is to make an identical copy of Safari. We'll use "ditto" for this because we may need to copy resource forks.
cd /Applications sudo ditto Safari.app Safari2.app cd Safari2.app/Contents sudo mv MacOS/Safari MacOS/Safari2
Now we need to edit Info.plist. Basically, any place it says Safari will be changed to Safari2. The most important change is the
because that is your ~/Library/Preferences location, and we need it to be different for these two versions. Here are the other places:
<key>CFBundleExecutable</key> <string>Safari2</string> <key>CFBundleName</key> <string>Safari2</string>
If you aren't sure whether something needs to be changed, leave it alone and try running the app. If it works as you expect, then you are fine.
One thing that won't change with Safari is its default home page. That's because Safari looks instead in ~/Library/Preferences/com.apple.internetconfig.plist for that information.
Once this is done, you can run the new Safari2 and if you change its preferences, that has no effect on the original Safari.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2012-07-10 Tony Lawrence