MacProNews Home Page About iEntry Article Archive News WebProWorld Forums Jayde iEntry Contact Advertise Downloads iEntry
^ click above ^
05.13.04


Two Safari's

By A.P. Lawrence

Look carefully at the image below. You see two Safari icons in the Dock (one third from the left, the other next to the app/doc divider), and also two Safari browsers open, both on the same site and page, but displaying very differently. The Font preferences are also shown, and this is what makes them different.

View the Screen Shot.

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 copy

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.

Easily create structured documents and syndicate information to multiple Web sites and device >>try CMS300 V4 today

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

<key>CFBundleIdentifier</key>
    <string>com.apple.Safari2</string>



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>


Get a free DBA self-study course on Oracle Database 10g.

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.


About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com


Read this newsletter at: http://www.macpronews.com/2004/0513.html

Free Newsletters
Part of the iEntry Network
over 4 million subscribers
MacProNews
CTOupdate
WebProASP


Send me relevant info on products and services.


 

 

From the Forum:
Need help for a simple Question

I have something thats been bothering me for a long time, since I got my domain for my homepage. My domain name is www.kangsweb.com, it was registered by www.namescure.com. My site files are stored on my ISP's server. The URL is www.wave.co.nz/pages/k-z-l-u, which was the only URL to browse my site before I had my domain. ...

Read the Post

 

-- MacProNews is an iEntry, Inc. publication --
iEntry, Inc. 880 Corporate Drive, Lexington, KY 40503
2004 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article






DesignNewz.com MacWebmasterFree.com