Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
    
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 4 '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 4 '13 at 20:38
add comment

3 Answers 3

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/

share|improve this answer
add comment
up vote 1 down vote accepted

Searching the web I found this lead pointing me in the right direction. Then I did the following:

  1. Lock icon to launcher (right-click on the launcher icon)
  2. In a terminal execute gsettings get com.canonical.Unity.Launcher favorites which displayed ['nautilus-home.desktop', '/home/<USER>/Desktop/ff.desktop']
  3. Identify relevant desktop file, in my case /home/<USER>/Desktop/ff.desktop
  4. Have a look at the file, less /home/<USER>/Desktop/ff.desktop and check where Icon* 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.

  5. Use tab-completion to determine which Firefox directory actually exists, ls /usr/lib/fir[TAB][TAB], finding /usr/lib/firefox/

  6. Find a suitable icon in that directory find /usr/lib/firefox/ -name "*.png", finding /usr/lib/firefox/browser/icons/mozicon128.png
  7. Change all Icon pointers to the existing icon /usr/lib/firefox/browser/icons/mozicon128.png
  8. Close and restart Firefox, now with a Firefox icon in the launcher and application switcher
share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.