How to change the icons of snap programs?

You don't want to change the .desktop file installed by Snap. You cannot. Instead, override the .desktop file with your own custom version. Source thread on snapcraft.io.

  1. The snap's .desktop file is located at /var/lib/snapd/desktop/application/snap-name_application-name.desktop.

  2. Copy it to: ~/.local/share/applications/snap-name_application-name.desktop.

    • DON'T try to delete or edit the original.
    • The name schema (snap-name_application-name) is critical. Don't change it.

Here's an example of creating an editable override copy (the discord application, provided by the discord snap):

$ cp \
> /var/lib/snapd/desktop/applications/discord_discord.desktop \
> ~/.local/share/applications/discord_discord.desktop