Default browser

From MozillaZine Knowledge Base
Jump to navigationJump to search

The term "default browser" is used to describe the URL and file associations that determine which web browser is launched when you open an Internet shortcut or HTML file or when you click a link in a mail application like Thunderbird or Outlook Express, if you have more than one web browser installed on your system.

Note that MSN Messenger and other applications may be "hard-coded" to open Internet Explorer, no matter which browser is set as the default. Also, Internet service providers like PeoplePC Online, Juno and NetZero may provide connection software that automatically launches Internet Explorer.

All systems

You would normally set a default browser using the the options or preference settings within the web browser. For example,

  • Firefox 2: "Tools -> Options -> Main / System Defaults -> (checkmark) Always check to see if Firefox is the default browser on startup -> Check Now"
  • Firefox 3: "Tools -> Options -> Advanced -> General / System Defaults -> (checkmark) Always check to see if Firefox is the default browser on startup -> Check Now"
  • Mozilla Suite and SeaMonkey 1.x: "Edit -> Preferences -> Navigator -> Set Default Browser"
  • SeaMonkey 2: "Edit -> Preferences -> Browser / Default Browser -> Set Default Browser"

Make sure that only one browser is set to check if it is the default. If those settings don't work, try setting another browser as the default browser, then reset Firefox, Mozilla Suite or SeaMonkey as the default. Other suggestions are listed below.

If you're using Thunderbird and have ThunderBrowse installed and want to open a link in a browser, click on the ThunderBrowse button in the status bar (or disable/uninstall that add-on). Thunderbird will use the default browser if the button has a red line through it. Additionally, you can also right click anywhere in the page or on a link and choose the "Visit in Browser" menu item. ThunderBrowse will launch the link in an external browser.

Windows

Use the options or preference settings within your Mozilla browser as shown above, to set Firefox or Mozilla Suite/SeaMonkey as the default browser. If that doesn't work, try the following:

If a test version of IE7 is installed

This applies to Windows XP only.
In some pre-release (test) versions of Internet Explorer 7, hyperlinks in Outlook or Outlook Express mail messages do not work unless IE7 is the default browser [1]. To resolve the problem, either uninstall the test version of IE7 (which restores IE6) or upgrade Internet Explorer.

Force Firefox to make itself the default

If Firefox already thinks that it is default, exit Firefox completely, go to "Start Menu -> Run" and enter this into the text box:

firefox.exe -silent -setDefaultBrowser

Reset SeaMonkey as the default

If another browser has been set as the default browser, including Internet Explorer 7, Firefox 3, or Opera 9, you may be unable to reset SeaMonkey as the default. As a workaround, install Firefox 2.0.0.x (available here) and make it the default browser, then open SeaMonkey and set it as the default. [2]

Using Default Programs - Windows 7 and Vista

To set your Mozilla browser as the default program on Windows Vista and above, go to "Start -> Default Programs -> Set your default programs", find your Mozilla browser in the list of programs and set it as the default. This will not affect the defaults for other user accounts on your computer. [3] [4]

Using Set Program Access and Defaults

You can set the default browser using the feature, "Set Program Access and Defaults" on Windows 2000 and XP. On Windows Vista and above, this feature is renamed "Set Program Access and Computer Defaults" and can be used to change the default for all users of the computer, if you are logged into Windows as an administrator. [5]

  • Windows 2000 (SP3+): "Start -> Control Panel -> Add or Remove Programs -> Set Program Access and Defaults"
  • Windows XP (SP1+): "Start -> Control Panel -> Add or Remove Programs -> Set Program Access and Defaults -> Custom". Click the icon to the right of "Custom", to expand the category.
  • Windows Vista and Windows 7: "Start -> Default Programs -> Set Program Access and Computer Defaults -> Custom" [6] [7]

(On Windows XP and above, click the icon to the right of "Custom", to expand the category.)

You will see Internet Explorer and other installed browsers listed under "Choose a default Web browser" . Select "Mozilla" (Suite), "SeaMonkey" or "Mozilla Firefox" (in some cases, "Mozilla Firefox" may not be listed; to add it back, reinstall Firefox [8]).

Setting default browser manually

You can manually set the default browser by selecting it as the the default program for individual file types and protocols, as follows:

  • Windows XP and earlier: Open the Control Panel from the Windows Start menu.
    • In Windows 2000 and earlier, or if Windows XP is using the Control Panel "Classic View": Click on "Folder Options -> File Types".
    • In Windows XP, if using the Control Panel "Category View": Click on "Performance and Maintenance". Then, click on "File Types" in the left column under the heading "See Also".
  • Windows 7 and Vista: Click the Start button, open "Default Programs" and then click "Associate a file type or protocol with a program". For detailed instructions, see the Microsoft article here for Vista or here for Windows 7. Note: On Windows Vista (or above), you may be unable to associate the HTTP HTTPS or FTP protocols with SeaMonkey because it does not appear as an available option. See this forum topic for additional information.

Assign the following protocols and file types to the browser you wish to set as default:

  • URL:HyperText Transfer Protocol (HTTP protocol)
  • URL:HyperText Transfer Protocol with Privacy (HTTPS protocol)
  • URL:File Transfer Protocol {FTP protocol)
  • HTML File
  • HTM File (optional)

In Windows XP and earlier, you can find the URL protocols listed above in File Types, under extension "N/A" or "(NONE)".

Using a third-party utility

A third-party utility to set the default browser will save you a lot of work by automating the steps for you. The freeware utilities DefaultBrowser and SetBrowser will work for Firefox and Mozilla Suite as well as other installed browsers.

Linux

Gnome

This may be slightly different, depending on which distribution you are using.

  • Go to "Applications -> Desktop Preferences -> Advanced -> Preferred Applications".
  • Select "Custom Web Browser", and type "firefox %s" in the box ("mozilla %s" for Mozilla). Note that a symlink of the "firefox" or the "mozilla" script must be placed in one of the default PATHs (for example, a symlink of the "firefox" script to "/usr/bin/" is common).

KDE

  • Open kcontrol (KDE configuration center).
  • Go to "Components -> Components chooser -> Web browser".
  • Check "The following browser", and type in "firefox" ("mozilla" for Mozilla).

If you don't notice the "Web browser" component:

  • Go to "Components -> File association -> text -> html".
  • Select "Add..." under "Application Preference Order".
  • Write the command firefox %U (mozilla %U for Mozilla) and select OK. You need "%U" so you can load URLs that are non-local files.

Distribution Specific

Fedora Core 3

If you want the URLs to open in a new tab instead of new window, you need to modify different script:

  • Edit the /usr/bin/firefox or the /usr/bin/mozilla startup script.
  • Search for a line containing "openURL".
  • Replace
exec $MOZ_CLIENT_PROGRAM $MOZ_CLIENT_PROGRAM_PARAM "openurl($opt,new-window)" 2>/dev/null >/dev/null

with

exec $MOZ_CLIENT_PROGRAM $MOZ_CLIENT_PROGRAM_PARAM "openurl($opt,new-tab)" 2>/dev/null >/dev/null

Debian

If you want to make Mozilla Firefox your default browser, point the symlink /etc/alternatives/x-www-browser to /usr/bin/mozilla-firefox or other path where Mozilla Firefox is installed. One easy way to do this is to execute the following command as root:

update-alternatives --config x-www-browser

Doing so will present you with a list of installed browsers from which you can select Firefox.

Setting the browser that opens in Thunderbird - Linux

If you are unable to launch Firefox (or another Mozilla browser) from URL links in a Thunderbird mail message, or if you want to change the browser that is launched, add the following lines to the user.js file, located in your Thunderbird profile folder (you may need to create the user.js file). Change the path of the Firefox executable, if yours is not /usr/bin/firefox. [9] [10]

user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

Note: You can also use about:config to set these preferences. See Register protocol and network.protocol-handler.app.(protocol) for more information.

Mac OS X

  1. Download Safari if you do not already have it.
  2. In Safari, choose "Preferences" from the menu.
  3. Click the "General" icon and choose your Mozilla browser from the default web browser pop-up menu. If you don't see it in the list, make sure it is in the "Applications" folder.
  4. If you don't want to use Safari, there's RCDefaultApp, a system preference panel which lets you set default browser, e-mail client, MIME types, and other options.

Related bug reports

See also

External links