Firefox snap cannot be set as default browser

After installing firefox snap and removing firefox deb, the commands x-www-browser, x-gnome-browser and sensible-browser all cause chrome to be launched instead.

Running sudo update-alternatives --config x-www-browser shows that firefox is no longer an option, which is predictable as this system works entirely from debian packaging.

This means there is no way to configure firefox snap as the default browser on the system.

1 Like

Indeed the update-alternatives mechanism isn’t integrated with snaps (yet?). This is essentially the same problem as was reported for chromium and addressed by a postinst maintainer script in the transitional debian package that installs the snap. However we don’t have such a transitional package for firefox yet.

Note that the title of this post is a bit misleading: firefox can be set as default browser, using different DE-friendly methods:

  • from firefox itself, browse to about:preferences and click the “Set default” button
  • in a GNOME desktop environment, run gnome-control-center default-apps and select the entry for the firefox snap there
  • in a terminal, run xdg-settings set default-web-browser firefox_firefox.desktop
1 Like