DEV Community

Eric F 🇺🇦
Eric F 🇺🇦

Posted on

Stop Chromium from asking about default browser

I have to admit, I'm not a huge Chrom* fan - but still need it from time to time. So, I have it installed. It comes with a few annoyances though… One is it keeps asking about not being the default browser. I use Firefox, of course. :) So, here's a quick-tip on how to disable that.

After searching around a little bit and found the great startup parameter -no-default-browser-check. So, to use it… Let's not mess with the original file. It might be overwritten on any update.

Copy the original file into ~/.local/ instead.

cd ~/.local/share/applications
cp /usr/share/applications/chromium-browser.desktop .
Enter fullscreen mode Exit fullscreen mode

Now you can open the file in your favorite editor, and then there are 3 places to edit.

I also cut out all the optional translation lines - just keeping the default and swedish. So, the file looks like this after my edits:

[Desktop Entry]
Comment=Access the Internet
Comment[sv]=Surfa på Internet
GenericName=Web Browser
Exec=/usr/bin/chromium-browser -no-default-browser-check %U


[Desktop Action new-window]
Name=Open a New Window
Name[en-US]=New Window
Name[sv-SE]=Nytt fönster
Exec=chromium-browser -no-default-browser-check %U

[Desktop Action new-private-window]
Name=Open a New Private Window
Name[en-US]=New Private Window
Name[sv-SE]=Nytt privat fönster
Exec=chromium-browser -no-default-browser-check --incognito %U
Enter fullscreen mode Exit fullscreen mode

Now, you can also checkout this great post by @rahedmir on “How to Fix Google Chrome/Chromium asks for password to unlock keyring in Linux”, to make it stop asking about the keyring.

If you want that one to? Edit your changes above, and use them together as:

-no-default-browser-check --password-store=basic
Enter fullscreen mode Exit fullscreen mode

No more bugging about not being the default browser. 🤞 Hope you found it useful.👍

· Eric

Top comments (0)