69

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?

Jorge Castro
  • 73,717
Cyr4x
  • 691

7 Answers7

70

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

jokerdino
  • 41,732
52

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/.

njam
  • 103
Severo Raz
  • 6,111
41

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
Palec
  • 175
  • 2
  • 7
timurb
  • 511
  • 4
  • 3
14

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)
kynan
  • 2,235
6

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.

2

In Ubuntu 18.04 and later select Settings -> Details -> Default Applications.

enter image description here

karel
  • 122,292
  • 133
  • 301
  • 332
2

For Kubuntu 20.04 with Plasma, you can do the following:

  1. Open the "Application Launcher"
  2. Type "Default Applications" into the searchbox
  3. You should see a system settings module with a star as an icon. It should actually says "Default Applications". Select it and open it
  4. Select the option "Web Browser" and from there just choose "Google Chrome" as the default app for opening http and https URLs
  5. Click "Apply" in order to save the settings

See the preview at the following screenshot of the default applications utility.

Alternatively, you can do this from the "System Settings > Applications (under Personalization) > Default Applications"

AnhellO
  • 121