Default Browser settings revert after rebooting

When users launch Safari, Firefox, or other browsers, they may be prompted with the option to set the current browser as the default. This option might also be available from the browser's menus or preferences as well, and while it should work, some users

When users launch Safari, Firefox, or other browsers, they may be prompted with the option to set the current browser as the default. This option might also be available from the browser's menus or preferences as well, and while it should work, some users are finding their default browser always seems to revert back to previous settings.

Apple Discussions poster Michael Goerz writes:

"When I set the default browser to 'Firefox' in the Safari settings, that setting only survives until the next reboot. After that, the default browser is back to Safari."

In addition to the default browser not sticking, users might also have problems with other default applications. The same user quoted above noticed that setting text files to open with the application "MacVim" had them reverting to opening with TextEdit after reboot.

When users change the default application to use, regardless of whether it's for a filetype or for a network protocol, the changes are stored in the user's "Launch Services" file. This file is a small database that contains associations of filetype and protocol tags with application handler schemes. If it is corrupt or otherwise inaccessible then the system will not be able to load any default settings changes that have been set by the user. As such, users must ensure this file is readable, as well as ensure it's not corrupt. Additionally, users can manually edit the file to ensure a specific application is used for launching specific filetypes or protocols.

Fixes

Rebuild the launchservices database with OnyX The multipurpose maintenance utility OnyX has a function for rebuilding the launchservices database, which may help with this problem. Download the utility from this website, and install it. Then in the Maintenance section of OnyX choose the "Rebuild" tab and check the first option to rebuild the LaunchServices. Then click "Execute" to run the script.

Ensure the LaunchServices file is readable Locate the database, which is named com.apple.LaunchServices.plist and is located in the /username/Library/Preferences/ folder. Then get information on the file and ensure that both the current user "(Me)" is listed in the "Sharing & Permissions" list with "Read & Write" as the permissions, and the "Locked" option is not checked. Users might try toggling the permissions to something other than "Reand & Write" and then change it back to ensure the permissions are properly associated with the file.

Remove the com.apple.LaunchServices.plist file Removing the launch services database will have OS X create another one, which should help if there is a corruption problem in the file. If users do this, all URL protocol and filetype bindings will be reset to their defaults, so users will have to set them up again. Remove the file from the user preferences folder and restart the computer, and then try to assign an application to a filetype or change the default browser again.

Manually edit the launch services file Users can ensure the desired application opens a specific URL protocol or file type by opening the database file in a text editor. Then duplicate one of the "" tag entries, depending on whether a protocol or filetype is desired.

For a filetype, the dict type should look like the following:


LSHandlerContentTag
cfg
LSHandlerContentTagClass
public.filename-extension
LSHandlerRoleAll
com.apple.textedit

This example ensures the program "TextEdit" opens any file that has ".cfg" as the filetype extension. To add any file type or change the application, users would have to either edit the field with "cfg" to the desired filetype, or change the "com.apple.textedit" entry to the domain of a desired program. The domain of a program is usually the name of the program's preferences file without the "plist" in it.

For a network protocol, the "" entry would look like this:


LSHandlerRoleAll
com.apple.ical
LSHandlerURLScheme
webcal

In this tag users would change the protocol from "webcal" to "http" or "https", and then change the handler from "com.apple.ical" to "com.apple.safari" in order to have Safari be the default application for handling the http protocol.

Once the database has been modified, users should save it and logout then log back in to invoke the changes.

Resources
  • Michael Goerz
  • website
  • More from Late-Breakers
  •  

    Join the discussion

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    HOT ON CNET

    Find Your Tech Type

    Take our tech personality quiz and enter for a chance to win* high-tech specs!