unles there is an interface for something, snap packages can not simply call commands from the host for security reasons … what desktop snaps can do is to use xdg-open … something like:
#! /bin/sh
xdg-open "$@"
and then calling this script like run_script.sh file:///$SNAP_USER_DATA should open a file manager pointing to the application specific home dir
there is an xdg-open in the snap environments PATH, do not use /usr/bin when you execute xdg-open, literally copy/paste my script snippet … (and make sure the desktop plug is defined (and connected) for your app)
The xdg-open command can open a file with the host’s default application associate to the file’s type, it can not directly launch a specific application.
You can launch a file manager application(not necessarily Nautilus) by giving a directory path as an argument to xdg-open.
Probably a dumb question but, if the host system is generally unavailable to a snap packages, how does this manage to function? https://github.com/adnanh/webhook
the packager would have to make it a classic snap to make it work, but seems they did not bother to request permissions for classic confinement … sadly they also did not unlist/delete the snap from the store though, which leaves it there in a broken state for users to install …