11

I open Chromium and the browser ask me if I want to set it as my default browser. I click on "set as default" and close the browser.

But when I open Chromium again I get the same question. Ubuntu 11.04 seems not to set Chromium correctly as my default browser.

How to fix that?

Isaiah
  • 58,486
  • 28
  • 133
  • 145
1passenger
  • 999
  • 3
  • 10
  • 20

4 Answers4

11

Try changing your your preferred browser.

17.10+

Settings > Details > Default Applications

screenshot

On older versions

  1. Open Preferred Applications from Preferences > Preferred Appplications.

    enter image description here

  2. Change the default Web Browser to your liking.

    enter image description here

Pablo Bianchi
  • 14,308
  • 4
  • 74
  • 117
caesay
  • 358
  • 1
  • 3
  • 10
  • It's definitely worth trying to set it through Preferred Applications. There was (and possibly still is) [a strange bug if you didn't set it this way](https://bugs.launchpad.net/ubuntu/natty/+source/chromium-browser/+bug/670128). – 8128 Apr 30 '11 at 20:24
  • That's it! After changing the settings in Preferred Applications and setting Chromium as default browser again everything is working fine. Maybe a problem with a restore of an Ubuntu 10.10 backup. – 1passenger Apr 30 '11 at 20:27
  • I had to wait a minute ;-) Now it's accepted. Thanx. :-) – 1passenger Apr 30 '11 at 20:29
8

To change the browser globally, run the next command in a terminal:

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

Enter the number of chromium-browser and press Enter to confirm it.

Lekensteyn
  • 171,743
  • 65
  • 311
  • 401
1

Start google-chrome from a terminal in the foreground (leave off the &):

me:/home/me> google-chrome

Click on the prompt to make chrome the default browser.... notice that it is getting a permissions problem on .local/share/applications/mimeapps.list. The applications directory is owned by root and chrome was running as me. In order to fix the problem, I used:

chown -R me.me .local

Then I restarted google-chrome. It created the following entries in

cat .local/share/applications/mimeapps.list

[Default Applications]
text/html=google-chrome.desktop
text/xml=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

I suppose you could just create those entries in the file if there is a security problem with changing the owner of the .local directory.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
Bob
  • 111
  • 4
  • It's actually the opposite of "a security problem with changing the owner of the .local directory". The only way the `.local ` directory will have `root` ownership is if you executed a program with `sudo root` before the `.local ` directory was created, and then it becomes very important to fix the ownership. – Auspex Feb 14 '16 at 17:18
0

For me updating the alternatives in Ubuntu 19.10 did not work, it appears it depends on the fact URLs are opened by xdg-open, and I found that this made it work:

xdg-settings set default-web-browser chromium-browser.desktop
user1708042
  • 101
  • 2