How to make Chrome as default browser?

Archived topics about LMDE 1 and LMDE 2
Locked
elrengo

How to make Chrome as default browser?

Post 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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
craigevil

Re: How to make Chrome as default browser?

Post by craigevil »

See [SOLVED] Chromium wont become default browser - Ubuntu Forums : http://ubuntuforums.org/showthread.php?t=1753431
especially post #8
sp34rm1nt

Re: How to make Chrome as default browser?

Post 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!
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Re: How to make Chrome as default browser?

Post by grimdestripador »

This thread need more attention.
dBC

Re: How to make Chrome as default browser?

Post 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.
dBC

Re: How to make Chrome as default browser?

Post 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.
robmatic

Re: How to make Chrome as default browser?

Post 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
lingo

Re: How to make Chrome as default browser?

Post 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.
LifeInTheGrey
Level 3
Level 3
Posts: 145
Joined: Thu Apr 28, 2011 4:38 pm
Location: Boston

Re: How to make Chrome as default browser?

Post 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.
the beauty of linux is that the rabbit hole goes as deep as you want it to go.
Dubslow

Re: How to make Chrome as default browser?

Post by Dubslow »

The last post -- about /usr/share/applications -- did the trick for me. TIL :D
User avatar
RobertLM78
Level 3
Level 3
Posts: 183
Joined: Sat Apr 28, 2012 4:19 am
Location: US

Re: How to make Chrome as default browser?

Post 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.
Gateway DX4860, Sapphire Radeon HD 5450, 8 GB RAM, Mint 17.3 64-bit (Rosa), MATE
AMD Ryzen 3-3100, AMD Radeon RX 570, 16 GB RAM, Mint 21 (Vanessa), MATE
snoopsean

Re: How to make Chrome as default browser?

Post 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
Lukasz_Cholewa

Re: How to make Chrome as default browser?

Post 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.
Konki

Re: How to make Chrome as default browser?

Post 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
Locked

Return to “LMDE Archive”