How can I change the Google Chrome webapp icon?

With daily chromium builds and recent BAMF you can (if you look closer to that screenshot, you can see an example with my site and high-res icon). But in the current state of chromium you need to do some hacking to make it support this easily:

  • Make chromium generate a .desktop file for the application Menu too (if you don't want you to create one by scratch).
  • Get your chromium app window WM_CLASS with xprop | grep WM_CLASS | awk '{print $4}' (if it's just "Chromium Browser" or something similar you need to update chromium).
  • Edit that .desktop file (located into ~/.local/share/applications) with gedit or any other text editor; the file should contain:

    StartupWMClass=$APP_WM_CLASS_Found_on_step_2
    Icon=~/your/icon/file/name/or/path
    

    i.e. (for an app pointing to http://mail.google.com with google_mail.png in ~/.local/share/icons):

    StartupWMClass=mail.google.com
    Icon=google_mail.png
    
  • Restart bamfdaemon or unity at all; now when you'll run an application with that WM_CLASS the settings defined in the desktop file you've just edited will be used; icon included ;)


Here is the easiest and fastest way.

Install Menu Editor:

sudo apt install menulibre

Open Menu Editor, Select App, Click on icon to select a new icon:

enter image description here