Topic: Howto make google chrome the default browser

Problem:
I installed google-chrome but somehow it would not set itself as the default browser (example: clicking a link in terminator opened firefox/iceweasel).

After a long search here on the forums I found the solution(s) to my problem:

I hope this works for others to..

Howto:

Find out where chrome is installed (in my case it is /usr/bin/google-chrome) but firefox seems to be in /opt/firefox/firefox

Check if chrome is known as your default browser.

Open a terminal:

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

This will show you this example:

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

Change it to default by pressing the right number. In this example you press 2

Note:
If Chrome doesnt show up then you can add it:

sudo update-alternatives --install /usr/bin/x-www-browser \x-www-browser /usr/bin/google-chrome 150

Or as an alternative you could also use this option (http://crunchbanglinux.org/forums/post/54138/#p54138e):

sudo ln -s /etc/alternatives/x-www-browser /usr/bin/google-chrome

Now check again if you see it in the list.

To be sure it went right you can type:

sudo update-alternatives --display x-www-browser

It will show this:

x-www-browser - auto mode
  link currently points to /usr/bin/google-chrome
/opt/firefox/firefox - priority 70
/usr/bin/google-chrome - priority 150
Current 'best' version is '/usr/bin/google-chrome'.

Now we have this right and x-www-browser uses your chrome a default browser..


But if you where unlucky like me, Terminator still opens Firefox as browser..

Now we can fix that with changing this (found here: http://crunchbanglinux.org/forums/post/73904/#p73904):

Type:

 sudo gedit .gconf/desktop/gnome/url-handlers/http/%gconf.xml
 
 and 
 
 sudo gedit .gconf/desktop/gnome/url-handlers/https/%gconf.xml

In my case both showed:

<stringvalue>/opt/firefox/firefox &quot;%s&quot;</stringvalue>

So I changed it too:

<stringvalue>/usr/bin/google-chrome &quot;%s&quot;</stringvalue>

Did a reboot and now when I click a link in terminator chrome opens the link.

Now i would not be surprised if there are more ways or still other issues you need to fix but this worked for me.

This is my first howto ever. Feel free to join in to explain better, to correct me or suggest other methodes tongue

Type and read you later
Pieter (XPieter on #crunchbang)


Using Crunchbang Statler beta v2

Last edited by Pieter (2010-08-16 10:51:42)

Using CrunchBang 10 “Statler” Alpha 2

Re: Howto make google chrome the default browser

awesome! I think I saw you working this out on IRC the other day.  I was/am having the same problem.  I'll check this when I  get a chance, and post back the results.

Re: Howto make google chrome the default browser

Thanks a lot!