Muffinresearch Labs by Stuart Colville

Running a Safari 2 Standalone Alongside Safari 3 | 5 Comments

Posted in Apple, Browsers, Code on 20th November 2007, 1:47 pm by

Before updating OSX to 10.4.11 I decided to create a standalone Safari with the excellent instructions provided by Michel Fortin on his blog. The main reason to keep Safari 2 is due to the need to continue to test sites with Safari 2 as this is still (at time of writing) the current version of Safari that is an A-grade browser in the Yahoo Graded browser support strategy.

Note: if you don’t want to go to the lengths of creating your own Safari Standalone Michel has provided ready made apps for download.

Although these versions appear (from my limited testing) to work fully as expected please do bear in mind that this isn’t 100% the same as having the original version of Safari (see the comment by Alex Rosenberg on Michel’s site).
Michel has done a great job providing these standalone versions but I would ideally like to see Apple go to the lengths of providing “official” standalone Safari builds for developers.

Additional points to note

I renamed the binary to safari-2.04 instead of TrueSafari and I edited the shell-script linked in the instructions accordingly. This is the same process Michel used to create the ready-made apps available from here: http://michelf.com/projects/multi-safari/

To show the version in the taskbar you can change the appropriate key in /Applications/Safari-2.04.app/Contents/info.plist from this:

<key>CFBundleName</key>
<string>Safari</string>

to

<key>CFBundleName</key>
<string>Safari-2.04</string>

An issue I came across with the standalone that I had built was that one of my colleague’s machines failed to load the standalone app. Console reported the following:

dyld: NSAddImage() error
dyld: Symbol not found: __ZNK3KJS6JSCell9getUInt32ERj
 Referenced from: /System/Library/PrivateFrameworks/JavaScriptGlue.framework/Versions/A/JavaScriptGlue
 Expected in: /Applications/Safari-2.04.app/Contents/MacOS/../Frameworks/JavaScriptCore.framework/Versions/A/JavaScriptCore
/System/Library/PrivateFrameworks/JavaScriptGlue.framework/Versions/A/JavaScriptGlue

To fix this I dropped a copy of my /System/Library/PrivateFrameworks/JavaScriptGlue.framework (prior to 10.4.11 update) inside the app in /Applications/Safari-2.04.app/Contents/Frameworks/ and this resolved the issue.

Lastly and purely from an aesthetic point of view I decided to use a bronze Safari icon so that the three versions of Safari on my machine will be represented as follows:

Safari 2.04
Bronze
Safari 3
Current
Webkit
Gold

Bronze, Silver and Gold Safari icons

You can download my icon as both an icns file and the icon applied to a folder here: http://muffinresearch.co.uk/downloads/safari-bronze.zip

If you’d like to do something different with your Safari icon, Ian lloyd has some nice instructions on how to modify app icons

Post Tools

  • http://cyril.doussin.name Cyril Doussin

    Also if you encounter an error post-upgrade with Safari 3 and Console.app is reporting something like “WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction [...]“, you should check your Safari plugins and particularly PicLens. As explained here, removing PicLens fixes the problem.

    The same happens when you try to build Webkit yourself and have Piclens installed.

  • http://muffinresearch.co.uk Stuart Colville

    @Cyril: thanks for your comment; seems like one that could certainly catch people out.

  • Anon Ymous

    I would think twice about distributing modified versions of the Safari icon. Apple has a registered trademark on it’s design and in distributing a modified version you are infringing on both their copyright and trademark.

  • http://muffinresearch.co.uk Stuart Colville

    @Anon: Cheers for your concern. I guess when Apple come knocking on my door I’ll happily remove the icon if they want me too.

  • David Ericson

    where did you get the gold icon

GNU screen: open tab in current working directory|(1)

A nice trick for having screen open a new tab in the same directory as the one you’re currently in. To use it add it to your .screenrc

# Open new window in current dir.
bind c stuff "screen -X chdir \$PWD;screen^M"
bind ^c stuff "screen -X chdir \$PWD;screen^M"

Hat tip: mteckert on SuperUser.com

Ubuntu: add-apt-repository: command not found|(3)

When you’re using a minimal Ubuntu install if you find the ‘add-apt-repository’ command is missing (it’s useful for adding PPAs and other repositories), then simply run:

sudo apt-get install python-software-properties

Photos on Flickr

© Copyright 2004-12 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.514s.