I installed the second one and it is the one I use always. However, I noticed that whenever I use it, the icon shown for it in the bottom panel of GNOME Classic is not the Firefox icon but the icon used for any executable. If I start /usr/bin/firefox, the bottom panel shows the Firefox icon for it.
Both versions of Firefox are the same (144.0.2). In the Help->About Firefox window, the /usr/bin/firefox is labelled as Mozilla Firefox Snap for Ubuntu.
Where does the desktop look for icons to be used for an application in the bottom panel? I see several Firefox icons under $HOME/tools/firefox/browser/chrome/icons/default/.
Found a solution. Googled a bit and found that one way to fix this would be to mention an icon file in the Firefox .desktop file. There was a file called userapp-Firefox-Y11RE3.desktop under $HOME/.local/share/applications. It did not mention any icon file.
I was wondering how the correct icon is displayed for /usr/bin/firefox. There is no firefox.desktop file in /usr/share/applications/.
/usr/bin/firefox is a shell script that execs /snap/bin/firefox (which is a symbolic link pointing to /usr/bin/snap). /usr/bin/firefox script contains the following lines
# GNOME Shell
OLD="firefox.desktop"
NEW="firefox_firefox.desktop"
FAVS=$(gsettings get org.gnome.shell favorite-apps 2> /dev/null)
if echo "$FAVS" | grep -q "'$OLD'"; then
NEWFAVS=$(echo $FAVS | sed -e "s#'$OLD'#'$NEW'#")
gsettings set org.gnome.shell favorite-apps "$NEWFAVS"
fi
This replaces firefox.desktop with firefox_firefox.desktop in GNOME settings. This file is found under /var/lib/snapd/desktop/applications/ and gives the icon as