Page 1 of 1

How to make Chrome as default browser?

Posted: Sat Jun 09, 2012 11:18 pm
by elrengo
Hi, I can not put Chrome as default web browser. I use the Debian method:

$update-alternatives --list x-www-browser

/opt/firefox/firefox
/usr/bin/google-chrome
/usr/bin/iceweasel
$sudo update-alternatives --config x-www-browser

There are 3 choices for the alternative x-www-browser (providing /usr/bin/x-www-browser).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/google-chrome 200 auto mode
1 /opt/firefox/firefox 70 manual mode
2 /usr/bin/google-chrome 200 manual mode
3 /usr/bin/iceweasel 70 manual mode

Press enter to keep the current choice[*], or type selection number: 2

Then in Cinnamon I go to the option but the menu only show Firefox. :(
In XFCE i put google-chrome in preferred application but continus asking for it?

Re: How to make Chrome as default browser?

Posted: Sun Jun 10, 2012 12:46 pm
by craigevil
See [SOLVED] Chromium wont become default browser - Ubuntu Forums : http://ubuntuforums.org/showthread.php?t=1753431
especially post #8

Re: How to make Chrome as default browser?

Posted: Mon Jun 11, 2012 11:29 am
by sp34rm1nt
Unfortunately that solution doesn't work for me (Linux Mint 13 - MATE 64bit). The file ~/.local/share/applications/mimeapps.list already exists and is writeable, but chromium-browser is incapable of setting anything in it.

Under Chromium Settings -> Basics it says "Chromium cannot determine or set the default browser."

I have a workaround:

1. Start Firefox.
2. Edit -> Preferences -> Advanced -> System Defaults -> Always check to see if Firefox is the default browser on startup -> Check Now.
3. Set Firefox as the default.
4. Exit Firefox.
5.

Code: Select all

 cd ~/.local/share/applications
perl -pi.old -e 's/firefox/chromium-browser/g;' mimeapps.list
Clearly, it's pretty unsatisfactory to have to do this, particularly as I already have Control Centre -> Preferrred Applications -> Internet -> Web Browser set to "Chromium" (this appears to do nothing!), and also did the update-alternatives thing that the OP refers to above!

Re: How to make Chrome as default browser?

Posted: Mon Jun 11, 2012 12:34 pm
by grimdestripador
This thread need more attention.

Re: How to make Chrome as default browser?

Posted: Tue Aug 21, 2012 8:10 pm
by dBC
Even editing ~/.local/share/applications/mimeapps.list

as suggested 2 replies back, doesn't seem to effect where skype fetches its browser from.

Skype claims to use the default browser, but after doing the above, it still uses firefox. There must be another file around somewhere that says firefox is the default.

Re: How to make Chrome as default browser?

Posted: Tue Aug 21, 2012 9:33 pm
by dBC
OK, this article describes the extent of the problem:

http://blog.codef00.com/2011/02/18/the- ... x-debacle/

It seems skype uses the BROWSER environment variable convention. So setting that to /usr/bin/chromium-browser means skype will now use chromium.

Re: How to make Chrome as default browser?

Posted: Mon Sep 17, 2012 5:48 pm
by robmatic
Just want to share the solution that worked for me to get chromium invoked by thunderbird:

The proper app should be reported by:

Code: Select all

gconftool-2 -g /desktop/gnome/url-handlers/http/command
And if it isn't, set it with:

Code: Select all

gconftool-2 --type string -s /desktop/gnome/url-handlers/http/command "chromium %s"
Rob

Re: How to make Chrome as default browser?

Posted: Wed Nov 21, 2012 2:44 pm
by lingo
I found I had to use update-alternatives to set not only gnome-www-browser, but also x-www-browser. Then it worked for me.


$ sudo update-alternatives --config gnome-www-browser

There are 2 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/chromium-browser 40 auto mode
1 /usr/bin/chromium-browser 40 manual mode
2 /usr/bin/firefox 40 manual mode

Press enter to keep the current choice[*], or type selection number:

$ 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/chromium-browser 40 auto mode
1 /usr/bin/chromium-browser 40 manual mode
* 2 /usr/bin/firefox 40 manual mode

Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/x-www-browser (x-www-browser) in auto mode.

Re: How to make Chrome as default browser?

Posted: Fri Jun 21, 2013 9:38 pm
by LifeInTheGrey
I know this is a little late, but figure I would offer this since it solved it for me, and is the easiest solution IMHO.

It seems Chrome is not added to /usr/share/applications upon install. Running this command will copy the executionary shortcut to this location:

Code: Select all

sudo cp /opt/google/chrome/google-chrome.desktop /usr/share/applications
Then you can go into Applications and set it as default appropriately.

Re: How to make Chrome as default browser?

Posted: Wed Sep 04, 2013 1:03 am
by Dubslow
The last post -- about /usr/share/applications -- did the trick for me. TIL :D

Re: How to make Chrome as default browser?

Posted: Tue Apr 22, 2014 4:56 am
by RobertLM78
lingo wrote:I found I had to use update-alternatives to set not only gnome-www-browser, but also x-www-browser. Then it worked for me.


$ sudo update-alternatives --config gnome-www-browser

There are 2 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/chromium-browser 40 auto mode
1 /usr/bin/chromium-browser 40 manual mode
2 /usr/bin/firefox 40 manual mode

Press enter to keep the current choice[*], or type selection number:

$ 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/chromium-browser 40 auto mode
1 /usr/bin/chromium-browser 40 manual mode
* 2 /usr/bin/firefox 40 manual mode

Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/bin/chromium-browser to provide /usr/bin/x-www-browser (x-www-browser) in auto mode.
This did the trick for my problem. I have Firefox set as the default browswer, but somehow after installing Chromium and Opera as backup browsers any hyperlink in MATE was opening in Opera - it was pretty annoying, so many thanks!! :mrgreen:
I'm going to have to remember this the next time my /usr/bin/x-www-browser and /usr/bin/gnome-www-browser settings get borked by an alternative browser install.

Re: How to make Chrome as default browser?

Posted: Tue May 13, 2014 12:13 am
by snoopsean
That was exactly what i needed. I chose firefox as my default, but I hadnt gone in and edited these 2 files.

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

They were both set to chrome

Re: How to make Chrome as default browser?

Posted: Tue Jun 24, 2014 11:18 am
by Lukasz_Cholewa
Mint 15 XFCE here.
I did thishttp://ubuntuforums.org/showthread.php?t=1560802 post #8
(change application settings in gnome session) and it worked for me.

Re: How to make Chrome as default browser?

Posted: Thu Dec 04, 2014 10:38 am
by Glats

Re: How to make Chrome as default browser?

Posted: Fri Jun 26, 2015 4:35 am
by Konki
For me I wanted to set Firefox as default browser after installing Chrome.
I need to do 2 things:
1. run

Code: Select all

sudo update-alternatives --config x-www-browser
and choose Firefox
2. run

Code: Select all

xdg-mime default firefox.desktop x-scheme-handler/http
After that it is working fine and opening links in FireFox :-)

Regards,
Konki