11

When a .desktop file is used with a snap project in the setup/gui directory. Does this mean that when the resulting snap is installed, an icon for the application will be added to the launcher, provided, of course, that the .desktop file is configured correctly?

  • 4
    You can see the .desktop files that snap has installed at /var/lib/snapd/desktop/applications/ – Flimm May 10 '22 at 08:44

1 Answers1

10

Yes, but be aware that the icon in your snap won't be in one of the regular lookup directories for icons, so you'll want to include the full path to it in the Icon=field of your .desktop file. The easiest way to do this is to use the ${SNAP} variable there for the base path to your snap. For the executable, be sure it points to /snap/bin/{yourbinary} rather than something in ${SNAP}.

Here's an example you can follow.

zx485
  • 2,426
mhall119
  • 5,037