Need help to build a simple terminal Python script snap

Hi !

I made a very simple (and convenient) snap manager here:

I want to make a snap from this Python 3 script: start a terminal and launch this script. For sure it should be easy. But for sure I fail until now.

What files content (setup.py, snapcraft.yaml) are needed here ?

Thanks!

IIRC, it is not possible to do snap operations in a snap without the snapd-control interface or classic confinement.

The application name may also raises concerns regarding whether it is an official application in the snap ecosystem and may confuse its users in installing a possibly malicious program with a similar name with weaker confinement.

1 Like

As @Lin-Buo-Ren points out, there is not a way to do this without using snapd-control which is a privileged interface only afforded to applications published in brand stores.

Additionally, you should try to use the snapd REST API instead of calling the snap commands directly as the output may change, etc.

1 Like

Well, I finally commit a GNOME extension to do this. https://extensions.gnome.org/review/19813 I’ll use snapd api when every other tasks I have to achieve will be completed. :wink:

1 Like