How to set Google Chrome as the default browser?

88,987

Solution 1

Assuming you are using Unity, click on the dash button in the launcher and search for 'System info'. Then, open 'System info' and move to 'Default applications' section. Then, click on the dropdown list next to Web. There, select 'Google Chrome' and it will be selected as the default web browser for your system.

enter image description here

Solution 2

You should have in the ~/.config/mimeapps.list file the following lines:

text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop

Make sure these lines are under either the [Default Applications] or [Added Associations] section.

And of course, you need google-chrome installed such that google-chrome.desktop is either located at /usr/share/applications/, /usr/local/share/applications/ or ~/.local/share/applications/.

Solution 3

Alternatively, you can do the following instead of editing mimeapps.list:

xdg-mime default google-chrome.desktop text/html
xdg-mime default google-chrome.desktop x-scheme-handler/http
xdg-mime default google-chrome.desktop x-scheme-handler/https
xdg-mime default google-chrome.desktop x-scheme-handler/about

To check the current settings, you can use:

xdg-mime query default text/html
xdg-mime query default x-scheme-handler/http
xdg-mime query default x-scheme-handler/https
xdg-mime query default x-scheme-handler/about

Solution 4

There are a number of places an application might figure out which browser to launch and unfortunately there is no established standard. If the other answers don't work for you (as was the case for me with Skype) you could try:

  • the $BROWSER environment variable
  • /usr/bin/x-www-browser, which is configured via the alternatives mechanism: sudo update-alternatives --config x-www-browser (which is what Skype is launching it seems)

Solution 5

There are also the /etc/alternatives/ where you have links:

  • gnome-www-browser ->
  • x-www-browser ->

In my case Lotus Notes opened wrong browser using the link gnome-www-browser.

Share:
88,987

Related videos on Youtube

ckmk14
Author by

ckmk14

Updated on September 18, 2022

Comments

  • ckmk14
    ckmk14 almost 2 years

    How can I set Google Chrome as the default browser? If I set it in the browser settings, nothing happens. The browser says it's default, but in preferred applications in Gnome, there's only Firefox to choose from. Clicking any link i.e in Thunderbird opens a blank Firefox window, not with the link embedded. Can I set the default browser in dconf2 or any configuration file?

    • TreefrogInc
      TreefrogInc over 12 years
      Have you tried setting the default browser via System Info->Default Applications->Web?
  • Severo Raz
    Severo Raz over 12 years
    Oh well! I was looking for this myself! They really got away with hiding and removing settings in this Ubuntu version, I thought Default Applications was removed! In Gnome Shell you can access it through System Settings > System Info > Default Applications.
  • flickerfly
    flickerfly about 10 years
    I have the following when I enter this command. Any idea what the difference between "auto mode" and "manual mode" is? There are 2 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser). Selection Path Priority Status ------------------------------------------------------------ * 0 /usr/bin/google-chrome-stable 200 auto mode 1 /usr/bin/firefox 40 manual mode 2 /usr/bin/google-chrome-stable 200 manual mode
  • kynan
    kynan about 10 years
    From the manpage: Each link group is, at any given time, in one of two modes: automatic or manual. When a group is in automatic mode, the alternatives system will automatically decide, as packages are installed and removed, whether and how to update the links. In manual mode, the alternatives system will retain the choice of the administrator and avoid changing the links (except when something is broken).
  • Remco Haszing
    Remco Haszing over 9 years
    Thank! Setting these to exo-web-browser.desktop helped me a lot.
  • vitaly
    vitaly almost 9 years
    Works for applications that are not available in the drop-down list of the settings dialog
  • Ced
    Ced over 8 years
    why is chrome not in the list for me ?
  • Bugs Buggy
    Bugs Buggy about 5 years
    I have this, still Firefox opens as default.
  • user3865083
    user3865083 almost 5 years
    this works when I click on a url in a terminal or within vim/mutt
  • Yaroslav Nikitenko
    Yaroslav Nikitenko over 3 years
    Thanks! In Gnome settings Firefox was declared to be my browser of choice (as I wanted), but only after fixing this file Firefox really became my default browser.
  • Timo
    Timo over 3 years
    how to change $BROWSER?
  • Timo
    Timo over 3 years
    Does not work: xdg-mime default chromium.desktop text/html, xdg-mime query default text/html -> firefox.desktop
  • kynan
    kynan over 3 years
    In your current shell, you can export BROWSER=/path/to/browser. If you want to persist this change, add it to e.g. ~/.profile.