5

I have a problem in that both Chrome and Firefox says, in their respective preferences menus, that they are the default browser. In Xubuntu's Preferred Applications, Chrome is chosen and

~$ sudo update-alternatives --config x-www-browser
[sudo] password for xxxx: 
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

the same for gnome-www-browser. So it would seem that Chrome should be the default browser? But the problem is, when I click a link in a Geary mail, Firefox opens. So somehow Firefox is also a preferred browser?!

I've tested the following in the Terminal:

x-www-browser: Opens Chrome

xdg-open http://localhost:8000 : Open link in Chrome

This is fine, but if I click a web link in either Geary or uses "Open link" on the link above, in the Terminal, the links open in Firefox.

Think it may have something to do with the "mimeapps.list":

msix:~/.config$ grep firefox mimeapps.list
text/html=exo-web-browser.desktop;mousepad.desktop;firefox.desktop;
x-scheme-handler/ftp=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop;
application/x-extension-htm=firefox.desktop;
application/x-extension-html=firefox.desktop;
application/x-extension-shtml=firefox.desktop;
application/xhtml+xml=firefox.desktop;
application/x-extension-xhtml=firefox.desktop;
application/x-extension-xht=firefox.desktop;
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
msix:~/.config$ grep chrome mimeapps.list
x-scheme-handler/chrome=firefox.desktop;
x-scheme-handler/chrome=firefox.desktop

Don't know what controls this list.

I want only Chrome to be default and also open web links in other applications. What could be wrong?

7

2 Answers 2

3

Here's what worked for me.

sudo update-alternatives --config x-www-browser

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

xdg-settings set default-web-browser google-chrome.desktop

Verified with xdg-settings get default-web-browser

output:

google-chrome.desktop

I believe you are missing some chrome entries from your mimeapps.list as well. My output after the commands above is as follows:

grep chrome ~/.config/mimeapps.list

application/x-mswinurl=google-chrome.desktop;
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

Sources:

How to change default browser AND the command line parameters used to open a link from gnome-terminal

/.config/mimeapps.list

2
  • Thanks, but I've already done all xdg-settings steps and they works as they should. I also think the issue is with mimeapps.list, but I surely shouldn't need to add and change all the entries manually, there should be some configuration that sets these when making an application default? Oct 13, 2016 at 6:23
  • You have my apologies if my answer isn't the one you wanted. I suggest you review askubuntu.com/help/how-to-ask the last section seems to apply here.
    – Elder Geek
    Oct 13, 2016 at 14:29
0

Substituting "firefox" with "google-chrome" everywhere in ~/.config/mimeapps.list solved my problem. Links now open in Chrome, and Firefox no longer consider itself as default browser.

Believe there is a bug somewhere in how "mimeapps.list" is controlled by Chrome/Firefox.

1
  • There is no need to eliminate all the Firefox entries. See my answer.
    – Elder Geek
    Oct 13, 2016 at 14:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .