APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds RSS Feeds











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version
->
-> Two Safari's


Two Safari's




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.

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>
 

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.




If this page was useful to you, please help others find it:  





11 comments




More Articles by - Find me on Google+



Click here to add your comments
- no registration needed!




Sat Feb 26 00:16:20 2005: 82   anonymous


http://www.aplawrence.com/MacOSX/twosafaris.html

I dont see the 2 images referred to in the article...



Sat Feb 26 11:00:33 2005: 83   TonyLawrence

gravatar
Yes, so I see. Apparently the jpg has somehow been corrupted.. I'll have to fix that. Sorry..



Sat Feb 26 11:08:31 2005: 84   TonyLawrence

gravatar
Ooops - it's not just this - apparently a LOT of jpg's have been mysteriously damaged.. don't know yet why..



Thu Jul 7 15:12:42 2005: 758   Burty


Hey, can you do this with iTunes? I have tried but can't seem to get the second one to run. Want to use it with Rogue Amoeba's Detour to send music to two different sound outputs.



Thu Jul 7 19:49:01 2005: 759   TonyLawrence

gravatar
I don't know why iTunes would be conceptually different, but that's of course possible.



Fri Jul 8 12:26:29 2005: 763   Burty


The second iTunes say's it can't find the music folder, even though it is there - any ideas, how can I tell it to look elsewhere?



Sat Mar 8 00:54:04 2008: 764   TonyLawrence

gravatar


I don't know. Is that in it's plist? If it is, of course you can. If it's in the binary itself, that's going to be harder. Never impossible, but it can be a lot more work than I'd do.








Sat Mar 8 00:57:35 2008: 3803   olli




it seems quite hard to get a second copy of itunes running. I changed iTunes into iTunes2 following the logics above, namely in iTune's main Info.plist but also to the Info.plist the of itunes helper (inside the resources). I also renamed both main executables inside their MacOS folders... The iTunes2 runs, it loads its com.apple.iTunes2.plist, but it appears to be still dependent of some other file, since it cannot run together with the original iTunes.



I mainly look forward to succeed, so I can have two iTunes applications, one to run the library on the Main internal disk, and one for the much bigger library on an external disk. I wish to add music to my internal disk, without always having to change the settings to where the files should be kept.



When I run iTunes2, I want it only to be busy with my internal disk, even when the external disk is attached.

What happens now: iTunes2 wants to copy music to the external harddisk, but doesn't remember its setting after having opened the original iTunes.



On top, both apps don't want to run together, trying to run the second, refers to the application window of the other already active...



If anyone else is trying the same, it would be nice, otherwise if I succeed, I leave it to A.P.Lawrence to publish it after, if he feels for it...








Sat Mar 8 01:19:48 2008: 3804   TonyLawrence

gravatar
Probably just can't be done this easily - too deep in the binary itself.



Wed Mar 26 04:37:53 2008: 3897   Asha


Can we do this with 2 different verions of Safari ? i.e If I am having safari version 3.0.3, can I have another Safri version (say 3.1) in my dock and work on both versions at a time?? plz help me in this.



Wed Mar 26 10:27:07 2008: 3898   TonyLawrence

gravatar
I don't know - why don't you try it?





Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar

Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

I am a Kerio reseller. Articles here related to Kerio products reflect my honest opinion, but I do have an obvious interest in selling those products also.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

pavatar.jpg

This post tagged:

       - MacOSX
       - Web/HTML















My Troubleshooting E-Book will show you how to solve tough problems on Linux and Unix systems!


book graphic unix and linux troubleshooting guide



Buy Kerio from a dealer
who knows tech:
I sell and support

Kerio Connect Mail server, Control, Workspace and Operator licenses and subscription renewals



Click and enter your name and phone number to call me about Kerio® products right now (Flash required)