I ran into duplicated Chrome icons with Plank on Ubuntu, and here's the solution I found: http://kb.openstudioproject.com/content/fix-double-google-chrome-icon-docky-and-plank
/usr/share/applications/google-chrome.desktopwith root permissions.
- Under each section (
[NewWindow Shortcut Group]and
[NewIncognito Shortcut Group]), add the following code:
If you are using Plank, you're good to go. If you're using Docky, you need to clear cache and restart Docky.
That line of code, is designed just for such cases, especially for Java applications. Whenever you run into such cases, you should find out the right WMClass and assign them in
.desktop manifest files.
Alternatively, you can use the following one-liner
sudo sed -i '/Group\]\|Desktop Entry/a StartupWMClass=Google-chrome-stable' /usr/share/applications/google-chrome.desktop