80

Since the Ubuntu 15.10 upgrade, google-chrome-stable keeps asking if it should be set as default browser, even though it already is. I tried to reinstall it, but that didn't help. Any ideas?

Seth
  • 58,122
  • iirc , go to general settings --> uncheck Always check if chrome is your default browser – Ravan Oct 23 '15 at 08:44
  • But it shouldn't report that it is not the default browser while it already is. I suspect a bug here. (I noticed it too. Upgraded just this morning so can't investigate just now.) – Jos Oct 23 '15 at 08:47
  • 1
    Yeah, that's the point. It says it is not the default browser in the settings, and if I click on "Set to default browser" nothing changes. – Yanick Nedderhoff Oct 23 '15 at 11:48
  • Don't use this forum for bug reports. It's old known bug. But It's relatively new to Ubuntu. – yurikoles Oct 24 '15 at 01:52
  • 1
    First of all, this forum is not for bug reports, as stated in FAQ. Here is information how to report bugs. And here is a workaround for your problem: – yurikoles Oct 24 '15 at 02:16
  • Thanks for you comment. Unfortunately, the Profile-Folder doesn't exist in ~/.config/google-chrome/. – Yanick Nedderhoff Oct 24 '15 at 07:00
  • The workaround does not work. Chrome is still asking to be the default even if it already is. – ulkeshkosh Oct 25 '15 at 18:56
  • 1
    @YanickNedderhoff I have proposed edit for the mentioned anwser. But before they reviewed, replace "Profile 1" with "Default" in path. – yurikoles Oct 25 '15 at 20:32
  • Thanks, this seems to work, it didn't ask again after rebooting Ubuntu. The file was rather weird though. Only one line, with >200k characters. Had to edit it with vi, since gedit kept crashing. I don't know if this sort of workaround is eligible as an answer, since it doesn't fix the actual problem, only the symptoms. If yes, feel free to answer this question and I am going to mark it as "correct". Thanks! – Yanick Nedderhoff Oct 26 '15 at 08:33
  • Ok, I will do it then. – Yanick Nedderhoff Oct 28 '15 at 11:41

3 Answers3

54

For the working fix, see the end of this answer.

INITIAL ANSWER Oct 28th 2015 (outdated fix)

To avoid being asked if you want to use Chrome as the default browser, use the following workaround (proposed here and suggested in the comment section of this question by Yurii Kolesnykov):

Open the file ~/.config/google-chrome/Default/Preferences with a text editor.

Find the line

"check_default_browser": true,

and replace it with

"check_default_browser": false,

In my case, the file was >200k characters, for which reason gedit crashed a few times. If it is the same in your case, you probably want to use a terminal-based editor like vi.

Please note that this is a workaround, the problem itself has to be fixed by the Chrome developers.

UPDATE Nov 24th 2015

As Danilo Piazzalunga mentioned, the bug is confirmed. As NicDumZ suggested, please vote up this bug by clicking on

Does this Bug affect you?

to raise attention. Thanks!

UPDATE Feb 20th 2016

As reported first by Ron Thompson and 3vi1 in the comment section; and finally confirmed by myself (using Ubuntu 15.10), this workaround doesn't seem to work anymore, at least not for everyone, after reinstalling google-chrome. Everybody who used this workaround should try to avoid reinstalling chrome.

I again encourage you to say that you are affected by the bug on launchpad (currently 302 people).

UPDATE April 5th 2016 (Working fix!)

A fix has been proposed on launchpad that apparently did the job for a couple of people:

To apply the fix, change line #198 in the file /usr/bin/xdg-settings from

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//'`"

to

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | sed -e 's/ .*$//' | head -n 1`"

UPDATE July 25th 2016 (Working fix!)

Update to the proposed fix for (K)Ubuntu 16.04:

To apply the fix, change lines #177 and #202 in the file /usr/bin/xdg-settings from

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word"

to

command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word | head -n 1`"

Then go to Google Chrome settings and set Chrome as default browser.

UPDATE Jun 1st 2017

The Bug has been closed and marked as "Fix Released" as of today. Quoting the user Olivier Tilloy (osomon):

If I read the report correctly, the issue was fixed in xdg-utils in xenial. Wily has been EOL for almost a year, so I am closing the bug.

no longer affects: chromium-browser no longer affects: google-chrome-beta (Ubuntu) no longer affects: google-chrome (Ubuntu) Changed in chromium-browser (Ubuntu): assignee: Chad Miller (cmiller) → nobody status: In Progress → Invalid Changed in xdg-utils (Ubuntu): assignee: Chad Miller (cmiller) → nobody status: Confirmed → Fix Released

  • 1
    Could you suggest following the bug, and voting it up by clicking "Does this bug affect you?" ? Thanks! – Nicolas Dumazet Nov 24 '15 at 07:44
  • It appears that bug report is for Chromium, yet this error also applies on Google Chrome. Does that matter? Also, the line "check_default_browser" does not appear in that config file for me. – Nicomachus Dec 08 '15 at 00:55
  • Yeah, it affects both Chromium and Chrome. But Chrome is based on Chromium, so if it's fixed, it should be fixed for both. About that missing line: I don't know. May just add the line and see if it works? – Yanick Nedderhoff Dec 11 '15 at 14:03
  • Just hit the button "Don't ask again" and Chrome/ium should not bother you again with that question. No need to mess with any config files in the text editor... At least, that is what did the trick for me :) – user17254 Jan 07 '16 at 12:29
  • This workaround doesn't work. As soon as Chrome opens it overwrites the option in the file. – Ron Thompson Jan 13 '16 at 22:09
  • another location of the file is: ~/.config/chromium/Default/Preferences – Unamata Sanatarai Jan 15 '16 at 07:43
  • @Ron Thompson: The workaround worked for me and a lot of other people. Nothing has been overwritten in my case. Could you provide some details so we eventually can help you?

    @ Unamata Sanatarai: Yeah, that's the path if you are using Chromium. It suffers from the same problem, but this question was originally about google-chrome.

    – Yanick Nedderhoff Jan 15 '16 at 07:55
  • I've submitted my information to the bug report. But I don't have anything non standard. Ubuntu 15.10, google-chrome through apt-get. I edit the file with a text editor and save it. Open google, see the prompt. Reopen text file, my change is overwritten. Not sure what additional info I can provide. – Ron Thompson Jan 15 '16 at 15:55
  • Maybe check with cat if it is actually saved? – Yanick Nedderhoff Jan 16 '16 at 13:49
  • I can confirm Ron's experience: I just did a complete reinstall, installed google-chrome via apt-get and was running into this problem. I overwrote the value in the file, and it was overwritten (back to 'true') the very next time I started Chrome. – 3vi1 Feb 02 '16 at 15:30
  • Oh great, now I can confirm it myself. I had to reinstall and now I automatically changes back to true. I didn't change anything else in the system. – Yanick Nedderhoff Feb 20 '16 at 17:28
  • 3
    Just to confirm... the new solution offered (replacing the command regex) works for me on 15.10 :) Thanks. – TacB0sS Apr 16 '16 at 13:06
  • 2
    UPDATE April 5th 2016 (Working fix!) fixed this problem for me, on Ubuntu 15.10 with Chrome Version 50.0.2661.102 (64-bit) – CharlyDelta May 13 '16 at 12:24
  • xdg-settings script change worked, Ubuntu 15.10 Chrome 51.0.2704.63. – Zayne S Halsall May 29 '16 at 09:53
  • @YanickNedderhoff do you have any idea on how to apply this on Kubuntu?, the file seems to be slightly different as there does not seem to be any match of that line in the xdg-settings file, and there are multiple similar lines to the one that needs to be changed. Here is a copy of the file http://pastebin.com/hD5qtQNm – Hans Jun 08 '16 at 18:04
  • @Hans add | head -n 1 to all the lines beginning with grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- |. I'll add a full string as an example to the answer. – naXa stands with Ukraine Jul 25 '16 at 10:22
  • Hey, i am using kubuntu 16.04 and your fix didn't work for me, even though lines 177 and 202 did contain the exact lines you mentioned, any ideas? – Vikash Balasubramanian Sep 06 '16 at 16:50
  • Updated the answer to contain the latest development (Fixed release) – Yanick Nedderhoff Jun 01 '17 at 12:43
3

This has been tracked down as a bug in XDG utilities, and it affects Chromium Browser, too.

See LP Bug #1509139.

-1

I was having the same problem with 15.10. Each time I rebooted and started chrome it complained it was not the default browser even though settings details Default Applications shows it default for web. I noticed that firefox was default for photos, so set that to image viewer. After a total of one reboots chrome is no longer complaining. I should try a few more times before I claim this solved my problem but wanted to share the initial result if anyone is in the mode of trying things themselves.

mrh53
  • 83
  • Update: Might be a red-herring. chrome://settings is still showing that chrome is not my default browser. I must have hit the "Don't Ask Again" button by accident during the testing. I can't find the preferences file in order to reverse that decision – mrh53 Dec 31 '15 at 17:36