Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add browsers to the Internet prefs panel System
A while back, I published an article titled Retaining OmniWeb as the default browser. This hack has changed a bit with the release of 10.1, and I thought I'd add information on how to make other browsers appear in the "Web" pop-up portion of the Internet preferences panel, and to set any one of them as the default.

The article might also be of interest if your "Web" setting seems to have amnesia - you change it, but then it randomly changes back to IE. I'll explain how to eliminate all choices except for your favorite, which (at least for me so far!) seems to prevent the "IE amnesia" from recurring.

So if you'd like to see more browser choices in your Web pop-up, or just prevent the Web pane from forgetting your preferred choice, read the rest of this article.

NOTE:This modification requires editing of a system file. This can be dangerous if you mess something up. Please make sure you follow the directions as written, and you are responsible for what may or may not happen to your system as a result of this modification.

The following steps will edit the file that builds the content of the "Web" panel of the Internet system preferences pane. Before we edit, we'll make a backup of the file, in case anything goes wrong. Some terminal use is required, but not too much!
  1. Launch the Terminal and type the following:
    cd /System/Library/PreferencePanes
    cd Internet.prefPane/Contents/Resources/English.lproj
    NOTE: This is shown as two separate commands to narrow the article's width; you could enter it on one long line (add a slash between PreferencePanes and Internet.prefPane). This changes us to the directory containing the file we wish to modify.

  2. Now we'll back up the file before we start to modify it. In the terminal, type:
    sudo cp DefaultHelperApps.plist DefaultHelperApps.bak
    You'll be prompted for your normal user password; we need to use 'sudo' to execute the backup command as the root user, since root owns the file.

  3. Time to edit the file! We'll use 'pico', but experienced UNIX users could use vi or emacs instead. To open the file with pico, type
    sudo pico DefaultHelperApps.plist
    This should open pico as root (you'll need to supply your admin password) with the DefaultHelperApps file open. Pico is relatively self-explanatory; just look at the menus at the bottom of the screen for help.

  4. To add browsers to the list, replace this section of code
    web = (
    {
    DisplayName = "Internet Explorer";
    Info = { BundleIdentifier = "com.microsoft.explorer"; };
    IsDefaultHandler = YES;
    }
    );
    with this section of code:
    web = (
    {
    DisplayName = "Internet Explorer";
    Info = { BundleIdentifier = "com.microsoft.explorer"; };
    },
    {
    DisplayName = "OmniWeb";
    Info = { BundleIdentifier = "com.omnigroup.OmniWeb"; };
    IsDefaultHandler = YES;
    },
    {
    DisplayName = "Mozilla";
    Info = { BundleIdentifier = "com.mozilla.mozilla"; };
    },
    {
    DisplayName = "iCab";
    Info = { CreatorCode = "iCab"; };
    }
    );
    Notice that only one browser can be tagged with the "IsDefaultHandler" tag; simply put that entire line with the section related to the browser of your choice.

  5. Although the above will give you more browser choices, it may not prevent the Internet prefs from forgetting your favorite and reverting to IE. I chose to eliminate all browsers except my favorite to prevent this problem. To do that, simply insert ONLY the relevant section from above for the browser of your choice, and include the IsDefaultHandler tag. Also note that you will NOT need a comma after the closing "}". With only one option available, I haven't had my preference revert to IE since I did this modification.

  6. When you're done, save your changes (control-O) then quit pico (control-X) and reopen the System Prefs application. You should now see your choices in the Web pop-up menu in the Internet prefs pane.

  7. If, for some reason, this doesn't appear to have worked, revert to your backup from the Terminal by doing the following (assuming you're still in the directory from step one; if not, repeat step one!):
    sudo rm DefaultHelperApps.plist
    sudo mv DefaultHelperApps.bak DefaultHelperApps.plist
    This will replace the bad file with the good backup, and you can try again -- remember to create another backup on your second try!
If you wish to add other browsers, the format is the same, the only complication is finding the BundleIdentifier for Cocoa and Carbon apps. For Cocoa apps, control-click on the application, pick "Show Package Contents", open the Contents folder, then open Info.plist in an editor and look for "BundleIdentifier".

Carbon apps are a bit trickier, and I'm not sure what the "right" way to do it might be. With Mozilla, for example, I just looked in my ~/Library/Preferences folder and saw "com.mozilla.mozilla.plist" so I tried it and it worked (don't include the ".plist" extension in the BundleIdentifier line!). Other Carbon apps, such as iCab, didn't seem to have an identifiable "com" file in my prefs folder; Jan S. emailed me the answer with the CreatorCode syntax shown above -- just get the app's creator code through traditional means and use it as shown.
    •    
  • Currently 2.00 / 5
  You rated: 3 / 5 (2 votes cast)
 
[10,480 views]  

Add browsers to the Internet prefs panel | 4 comments | Create New Account
Click here to return to the 'Add browsers to the Internet prefs panel' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Excellent! (& Opera info)
Authored by: mlm on Oct 23, '01 11:09:18AM

Excellent article, for explicitness, usefulness, and providing in the example
the obvious text people will want to add.

Suggestion you add Opera too:

{
DisplayName = "Opera";
Info = { BundleIdentifier = "com.operasoftware.Opera"; };
},



[ Reply to This | # ]
If you use another language
Authored by: Gabriel Birke on Mar 02, '02 06:24:36AM
... than English don't cd to the English.lproj folder but to French.lproj, German.lproj or whatever language you use. The rest of the tip still applies

[ Reply to This | # ]
Mozilla BundleIdentifier Changed
Authored by: fireproof on Jun 02, '02 07:54:50AM
The latest version of Mozilla (very nearly almost 1.0!) has changed it's BundleIdentifier to "org.mozilla.Mozilla", so you'll need to use the following code to add it to your DefaultHelperApps.plist
{
DisplayName = "Mozilla";
Info = { BundleIdentifier = "org.mozilla.Mozilla";};
IsDefaultHandler = YES;
}


[ Reply to This | # ]
Add browsers to the Internet prefs panel
Authored by: jasonharrison on Aug 14, '05 11:17:28AM

I suggest using the preference pane "MoreInternet" (freeware via VersionTracker) to set your HTTP, HTTPS, etc protocol handling application rather than modifying the system library files. For one thing it is a drag and drop operation to use MoreInternet, for another you don't need to dig up BundleIdentifiers or Creator Codes.

I just wasted 30 minutes trying to figure out how to switch from Mozilla to Firefox (Apple Help, Mozilla Help, Firefox Help, Mac OS X, google, etc) and 30 seconds performing the switch with MoreInternet.



[ Reply to This | # ]