After upgrading my distribution from 11.04 to 11.10 to 12.04 when starting a Firefox instance (from Alt+F2, not having a fixed launcher element) the icon displayed for it in the launcher and application switcher is the generic one (grey rectangle with a question mark in the middle). Why is that and how can I get the Firefox icon to display?
-
You are encouraged to answer and accept you own answers here. Please edit out the solution part of your question and provide it as an answer on its own. Thanks! – Kevin Bowen Jun 04 '13 at 12:21
-
@maggotbrain: Will do if allowed. Posting an answer to an own question is delayed by 8 hours, accepting an own answer by 2 days. An attempt to delete the solution from above resulted in an error message. – valid Jun 04 '13 at 20:38
3 Answers
Simplest method:
(1.) Remove (undock) the current icon from Dash.
(2.) Use Unity to find this application (firefox).
(3.) Drag icon to Unity panel, then right-click on icon and select 'Lock to Launcher'.
Assuming that doesn't work ..
There should be a file firefox.desktop located in:
/usr/share/applications/
This should start with: (simplified for clarity)
[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Comment=Browse the World Wide Web
GenericName=Web Browser
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
:
Also delete any customised copy of firefox.desktop you find in:
~/.local/share/applications/

- 14,499
Searching the web I found this lead pointing me in the right direction. Then I did the following:
Lock icon to launcher (right-click on the launcher icon)
In a terminal execute
gsettings get com.canonical.Unity.Launcher favorites
which displayed['nautilus-home.desktop', '/home/<USER>/Desktop/ff.desktop']
Identify relevant desktop file, in my case
/home/<USER>/Desktop/ff.desktop
Have a look at the file,
less /home/<USER>/Desktop/ff.desktop
and check whereIcon*
keys point to, e.g.Icon[en_US]=/usr/lib/firefox-10.0.2/icons/mozicon128.png
My problem was that these keys pointed to locations that didn't exist any more.
Use tab-completion to determine which Firefox directory actually exists,
ls /usr/lib/fir[TAB][TAB]
, finding/usr/lib/firefox/
Find a suitable icon in that directory
find /usr/lib/firefox/ -name "*.png"
, finding/usr/lib/firefox/browser/icons/mozicon128.png
Change all
Icon
pointers to the existing icon/usr/lib/firefox/browser/icons/mozicon128.png
Close and restart Firefox, now with a Firefox icon in the launcher and application switcher
In my case this behavior was caused by a Firefox shortcut on the desktop, and I just needed to remove it and re-add Firefox to the launcher. More details here:
http://ubuntuforums.org/showthread.php?t=2081710&p=12718813#post12718813

- 170