Unity Desktop Icon with Electron Snap

I’m using the node.js electron-builder to create a snap, which works fine other than no desktop/app icon is created. I’d like a user to be able to install the snap through the ubuntu software center and then see it as an icon in the Unity launcher. Does anyone know if this is possible with electron-builder? If not, is there any other way to package the snap?

Do you have a snap/gui directory? Drop both your desktop file and icon in
there. Then in the desktop file target the icon with something like:

Icon=${SNAP}/meta/gui/icon.png

You also want to add and use the icon directive due the metadata.

Hope that helps.

I do not have a snap/gui directory, it’s just a snapcraft.yaml file. Should I create a snap/gui directory next to the yaml file?

When you started this project, had you run the snapcraft init command? That would have created the snap folder with your YAML file in there. Then you manually add the GUI folder and follow the recommendations I made above. :slight_smile: But then also add the icon directive as described in the previous link as well. HTH

Got it, thanks!

I had previously blindly copied someone’s repo who doesn’t do that apparently.

Awesome! I was there last week. That’s why I’m familiar with it. ha ha - so did it work for you?