How to use Safari 2 WebKit after installing Safari 3 Beta

Jun 13, '07 07:30:03AM

Contributed by: taylott

After installing Safari 3 you won't be able to run Safari 2 to test websites or whatever any more. Here's one way to make them both available:

  1. Install Safari 3 Beta
  2. Rename /Applications » Safari.app to Safari3.app
  3. Install WebKit Nightly
  4. Rename /Applications » WebKit.app to Safari2.app
  5. Unarchive the backed up Safari -- expand /Library » Application Support » Apple » .SafariBetaArchive.tar.gz
  6. Copy the old Safari from /Library » Application Support » Apple » .SafariBetaArchive » Applications » Safari.app to /Applications » Safari.app
  7. Copy all the frameworks into Safari2. Inside the .SafariBetaArchive folder, you'll find these frameworks: Copy all of these into /Applications » Safari2.app » Contents » Resources
That's it; now you can open Safari2. If you need it, there's much more detail in this post on my blog. I also include a shell script solution for getting both versions of Safari working.

Once you've done the above work, you can force another application to open with the old WebKit instead of the new with this Terminal command:

env DYLD_FRAMEWORK_PATH="/Applications/Safari2.app/Contents/Resources" \
WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES "/path/to/bin/in/app" &
Just replace /path/to/bin/in/app with the path to the binary in the application you want to force to use the old WebKit frameworks. For instance, this will fix Adium with Safari 3:
env DYLD_FRAMEWORK_PATH="/Applications/Safari2.app/Contents/Resources" \
WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES "/Applications/Adium.app/Contents/MacOS/Adium" &
[robg adds: I haven't tested this one, so proceed at your own risk. The referenced blog post has a lot more detail than I've chosen to show here...]

Comments (12)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070612131825986