1

I wanted to create a desktop shortcut for firefox but I failed. I didn't find the firefox.desktop icon so I searched the whole computer and found one from a strange location. I allowed launching and it does open firefox but it displays a paper icon instead of the firefox one.

All other icons I find from usr\share\applications do work. I tried to search the internet but it didn't help.

2
  • 2
    What is the "strange location"? Please edit your question and copy/paste the .desktop file that you created. Please use code fences so that monospace formatting is preserved and so we can tell it apart from surrounding text. Accuracy is essential. For example usr\share\applications is not a valid path but /usr/share/applications is.
    – Nmath
    May 13, 2022 at 20:52
  • 2
    I know it’s not what you’re asking, but you might find adding Firefox to your favourites in the dock is a better option: open Firefox, it’ll appear in the dock. Then right-click on the icon and select ‘add to favourites’ - and it’ll always show in the dock.
    – Will
    May 13, 2022 at 21:05

7 Answers 7

1

I had the same problem with snap version of Firefox in Lubuntu. Removing and reinstalling firefox didn't fix the desktop icon for some reason, even after rebooting. I couldn't find the firefox.desktop file anywhere but on the desktop. So my solution was to delete the desktop shortcut and open the application menu, find the firefox launcher in there, right click on it and select "Add to Desktop". It made a new shortcut with the icon. Go figure. I hope this helps. :)

0

Here is what worked for me to create a Firefox desktop shortcut using Ubuntu 22.04 and Firefox 101.0.1 installed from Ubuntu Software.

Using Files go to /snap/firefox/current and copy firefox.desktop, then paste this onto your desktop. Then right click the desktop file you just created and select Allow Launching.

If the icon on your desktop shortcut is still the generic icon, you can right click it, click Properties, click on the icon area in the Properties box, click Other Locations and navigate to /snap/firefox/current and then click on default256.png to use the Firefox icon for your desktop shortcut.

Note: If you don't see firefox.desktop in /snap/firefox/current you can use /snap/firefox/1443 or other folder under /snap/firefox that contains a firefox.desktop file.

0

My firefox desktop icon also disappeared from Lubuntu 22.04. I looked through the snap/firefox path and found no icon files. I looked in the desktop file at home/myname/firefox_firefox.desktop, and the icon entry was pointing to a nonexistent 1232 folder under the snap area: /snap/firefox/1232. I downloaded the firefox default256.png from the internet and placed it in /snap/firefox/1443, then updated the location in the .desktop file.

0

I found the firefox.desktop and firefox_firefox.desktop files in ~/.local/share/applications/ and checked/corrected the icon= setting to point the the correct location for the .png file. Logged out and back in all was working.

0

If you prefer the command line way, you can use the following code snippet:

cp /snap/firefox/current/firefox.desktop ~/.local/share/applications
sed -i 's/Icon=\/default256.png/Icon=\/snap\/firefox\/current\/default256.png/' \
firefox.desktop

Perhaps one day canonical will fix the icon path entry in their snap package.

-1

Install Firefox by snap following the shortcut path here on my machine:

env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox %u

enter image description here

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 16, 2022 at 21:04
-1

You should download firefox from Mozilla site
Unpack the Firefox to your user home directory (e.g. ~/firefox)
And just run ~/firefox/firefox

You can find Firefox icon in ~/firefox/firefox/browser/chrome/icons/default/default48.png
(I recommend to use 48px size icon, but it depends)

After that you will be able update the Firefox from standard Firefox menu and you will always get fresh Firefox (in Ubuntu you can wait weeks until new release will be built).
And your Firefox will use standard Ubuntu configuration files instead of snap files.

If you need icons that displaying during Firefox running you can find them in
/usr/share/pixmaps/
and/or /usr/share/applications/

WARNING! There is may be very harsh icon cache in Ubuntu! Even if you replace some icon then the icon can be cached and old icon will be displayed. I do not know how to reset the cache.

If you use standard Ubuntu 22.04 Firefox then it will use snap and snap directories (like partial snapshot of Ubuntu system files with configurations and libraries).

You can find snap file configuration here
~/snap/
and /var/cache/snapd/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .