How to make Chrome as default browser?

Questions about applications and software
Forum rules
Before you post please read this

How to make Chrome as default browser?

Postby elrengo on Sat Jun 09, 2012 11:18 pm

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?
elrengo
Level 1
Level 1
 
Posts: 6
Joined: Sat Jun 02, 2012 4:38 pm

Linux Mint is funded by ads and donations.
 

Re: How to make Chrome as default browser?

Postby craigevil on Sun Jun 10, 2012 12:46 pm

See [SOLVED] Chromium wont become default browser - Ubuntu Forums : http://ubuntuforums.org/showthread.php?t=1753431
especially post #8
Debian Sid KDE4.8.4 Kernel 3.4 Thinkpad R40 CPU Pentium M 1.3MHz RAM 2GB ATI Mobility 7500
Debian - "If you can't apt-get something, it isn't useful or doesn't exist"
Giant Debian sources.list | Debian upgrade script smxi | sysinfo script inxi
craigevil
Level 5
Level 5
 
Posts: 559
Joined: Wed Sep 15, 2010 6:10 am
Location: down the rabbit hole

Re: How to make Chrome as default browser?

Postby sp34rm1nt on Mon Jun 11, 2012 11:29 am

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!
sp34rm1nt
Level 1
Level 1
 
Posts: 1
Joined: Mon Jun 11, 2012 10:50 am

Re: How to make Chrome as default browser?

Postby grimdestripador on Mon Jun 11, 2012 12:34 pm

This thread need more attention.
User avatar
grimdestripador
Level 6
Level 6
 
Posts: 1069
Joined: Fri Feb 16, 2007 2:26 am

Re: How to make Chrome as default browser?

Postby dBC on Tue Aug 21, 2012 8:10 pm

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.
dBC
Level 1
Level 1
 
Posts: 4
Joined: Sun Aug 19, 2012 2:14 am

Re: How to make Chrome as default browser?

Postby dBC on Tue Aug 21, 2012 9:33 pm

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.
dBC
Level 1
Level 1
 
Posts: 4
Joined: Sun Aug 19, 2012 2:14 am

Re: How to make Chrome as default browser?

Postby robmatic on Mon Sep 17, 2012 5:48 pm

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
robmatic
Level 1
Level 1
 
Posts: 1
Joined: Mon Sep 17, 2012 5:42 pm

Re: How to make Chrome as default browser?

Postby lingo on Wed Nov 21, 2012 2:44 pm

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.
lingo
Level 1
Level 1
 
Posts: 1
Joined: Wed Nov 21, 2012 2:41 pm

Re: How to make Chrome as default browser?

Postby LifeInTheGrey on Fri Jun 21, 2013 9:38 pm

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.
the beauty of linux is that the rabbit hole goes as deep as you want it to go.
LifeInTheGrey
Level 3
Level 3
 
Posts: 145
Joined: Thu Apr 28, 2011 4:38 pm
Location: Seattle

Re: How to make Chrome as default browser?

Postby Dubslow on Wed Sep 04, 2013 1:03 am

The last post -- about /usr/share/applications -- did the trick for me. TIL :D
Dubslow
Level 1
Level 1
 
Posts: 8
Joined: Sat Jan 05, 2013 11:59 pm

Re: How to make Chrome as default browser?

Postby RobertLM78 on Tue Apr 22, 2014 4:56 am

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.
Dell Dimension 4600i, ATI Rage 128, 1 GB RAM, Linux Mint 13 32-bit, MATE edition
Dell Latitude D400, Intel Graphics, 1 GB RAM, Linux Mint 13 32-bit, MATE edition
Gateway DX4860, Sapphire Radeon HD 5450, 6 GB RAM, Linux Mint 13 64-bit, MATE edition
User avatar
RobertLM78
Level 3
Level 3
 
Posts: 166
Joined: Sat Apr 28, 2012 4:19 am
Location: US

Re: How to make Chrome as default browser?

Postby snoopsean on Tue May 13, 2014 12:13 am

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
snoopsean
Level 1
Level 1
 
Posts: 3
Joined: Sun May 11, 2014 11:18 pm

Re: How to make Chrome as default browser?

Postby Lukasz_Cholewa on Tue Jun 24, 2014 11:18 am

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.
Lukasz_Cholewa
Level 1
Level 1
 
Posts: 3
Joined: Mon Oct 07, 2013 6:46 am

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 6 guests