How to locate application locations?

I want to find the location of the application and create a desktop shortcut.

You can locate the program inside the snap itself: $SNAP environment variable is your friend.

If you’re looking for external command, you can find it add this prefix based on your app’s command in the snapcraft.yaml.

/snap/<command>
e.g.
/snap/bin/bashell       # for command: bin/bashell in your app

Alternatively, during your snap testing, you can find out using:

$ which PROGRAM

As for where to host the Desktop file, based on the documentation under “Desktop Files” subsection, you can create the Desktop file next to your snapcraft.yaml.

If the snap doesn’t provide a desktop shortcut and you think it should, maybe raise the issue (either here, or directly with the snap’s authors).

If on the other hand they do provide a desktop shortcut, but your desktop environment isn’t picking it up, you need to look into why. Hopefully it follows the XDG recommendations about paths, and all you need to do is add /var/lib/snapd/desktop to XDG_DATA_DIRS (see Snaps not appearing in Debian9 Stretch LXDE menu (Not Wayland Bug) for more).

1 Like