Firefox cannot be set as default browser

Ubuntu Version:

Lubuntu 25.04

Desktop Environment (if applicable):

Problem Description:

I have tried but failed to set Firefox as default. I reinstalled with no effect. It would be useful as the default browser is called by Pastebin.

Relevant System Information:

PC is Dell Precision T1650

Screenshots or Error Messages:

There is ! mark against the Firefox desktop icon.

What I’ve Tried:


Let’s start by gathering some information.

Run these commands in the terminal and paste the output back here wrapped with code tags (the </> icon in the composer).

which firefox
find /usr/share/applications ~/.local/share/applications -name "*firefox*.desktop"

The single line of reply is

/usr/bin/firefox

Please show the output from this:
grep Exec /usr/share/applications/firefox.desktop

grep: /usr/share/applications/firefox.desktop: No such file or directory

Please note that firefox is installed and set as the default browser at system install time …

…shows that you seem to have replaced the default browser with a third party version … since there are plenty ways of installing firefox and also plenty of places to get it from in various incarnations we can not really support this here …

That said, if you make such a support request giving as much detail as you can, like what method did you use to install it, where did you get it from etc will help the people that want to help you to understand your potential issue better and enable them to give better support too …

1 Like

Oh. I have no idea where it came from other than as part of the recent installation. I was running Lubuntu from a USB stick for a couple of weeks to try things out as part of a move from Windows. There was no dual boot so I doubt if it came from there. Is there no way of restoring the default version?
Thanks for your prompt help so far.
Alan

After you have navigated to
Preferences > LXQT Settings > File Associations > Default Applications > Web Browser
What do you see?

OOPS !

Sorry !! I just noticed that the firefox deb that installs the snap actually puts a wrapper script into /usr/bin/firefox (which then runs /snap/bin/firefox which I expected as return command for which firefox)

So I was wrong about that third party install … mea culpa !

2 Likes

None

Under Choose it shows Firefox, should I select it?

Indeed, you should
Nothing ventured, nothing gained :wink:

I’ve done that, but it still doesn’t show as default within Firefox.
Maybe restart the PC?

Do you see this within Firefox > Edit > Settings > General?

Yes.
Here is a crop of the browser info., for what it’s worth

about Firefox

Just for info, the latest snap Firefox is 143.0.3.

If you only have one web browser installed, is there some specific problem to mention when Firefox does not register itself as the default browser?

Sadly, no. It looks like we’re stuck as is.

I’m not sure where we go from here.
A couple of questions:-

Does Firefox behave as expected?
Do your other Lubuntu apps function OK?

Perhaps you can run via the terminal:-
sudo apt update
sudo apt upgrade

Any unexpected messages?

Various updates done, and two upgrades not done:

Not upgrading yet due to phasing:
  fwupd  libfwupd3

One of the reasons the firefox .deb package still exists in the archives is also to provide x-www-browser so that it becomes the first browser installed by the system, and, therefore, made the default. The snap package is unable to do this on its own.

A sudo apt install --reinstall firefox might take care of that.

Also, for what it’s worth, .desktop files for snaps are kept at /var/lib/snapd/desktop/applications.

1 Like

The reinstall gives:

Summary:                        
  Upgrading: 0, Installing: 0, Reinstalling: 1, Removing: 0, Not Upgrading: 2
  Download size: 76.4 kB
  Space needed: 0 B / 227 GB available

Get:1 http://archive.ubuntu.com/ubuntu plucky/main amd64 firefox amd64 1:1snap1-0ubuntu7 [76.4 kB]
Fetched 76.4 kB in 0s (363 kB/s) 
Preconfiguring packages ...
(Reading database ... 310048 files and directories currently installed.)
Preparing to unpack .../firefox_1%3a1snap1-0ubuntu7_amd64.deb ...
=> Installing the firefox snap
==> Checking connectivity with the snap store
==> Installing the firefox snap
snap "firefox" is already installed, see 'snap help refresh'
=> Snap installation complete
Unpacking firefox (1:1snap1-0ubuntu7) over (1:1snap1-0ubuntu7) ...
Setting up firefox (1:1snap1-0ubuntu7) ...
Processing triggers for hicolor-icon-theme (0.18-2) ...

But still not showing as default in Settings.