3

I have an app which I packaged successfully as a snap, but I don't want my users to run it from the command-line. How can I create a menu entry for it?

1 Answer 1

3

qcomicbook in the Snappy Playpen is a good example of this. It ships an icon and a .desktop file in a special directory called ./setup/gui.

For the desktop file, you can in most cases just copy the one that is shipped with the upstream source, or create one from scratch (Desktop Entry Specification).

Note the following when you create the Icon and Exec entries:

  • For Exec just use whatever you defined in the apps stanza of the snap.
  • For Icon use ${SNAP}/meta/gui/ because that's where the icon will be shipped.

In the example of qcomicbook, this is:

Exec=qcomicbook Icon=${SNAP}/meta/gui/qcomicbook.png

1
  • I always forget, in the end Snap is another packaging system, and it should have similar variables like Debian & Python packaging systems. Thank you. By the way, would you please accept your own answer, to be easier to find.
    – user.dz
    Apr 22, 2020 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .