Duplicate icons for manually created GNOME launcher items

Solution 1:

To save sifting through the thread mentioned by @earthmeLon, you need to do the following:

  1. Launch the application
  2. Fire up a terminal and run xprop WM_CLASS. Click on the window of the the application that is running with a duplicate icon.
  3. You'll get some output like WM_CLASS(STRING) = "Navigator", "Firefox". Choose one of the classes, eg Firefox in this example
  4. Add the class as the value of StartupWMClass in the .desktop file. For example, StartupWMClass=Firefox
  5. Save the .desktop file, close the application and re-open it. There should now only be 1 icon in the launcher

Solution 2:

StartupWMClass

You can use StartupWMClass to group windows by class.

See this thread for additional information.