Is it possible to launch external commands without building a classic snap (thus having the entire host accessible)?
In the JabRef snap the only way to add the functionality included in the deb/rpm and flatpak packages seems to be to port the snap to classic.
I wondered if it’s possible to avoid that and let the snap invoke a certain number of commands (soffice, texstudio, and similar text editors).
The list is fairly small, and would not change in time.
If it’s not possible, would a gtk java app be considered suitable for classic confinement?
Strictly confined snaps can’t access anything that’s not in its namespace, meaning: what you bundle within and any slots you use. I’m afraid going classic is the only way to achieve what you want, but I’ll let someone more experienced jump in and give a definite answer.
I have used the xdg-desktop-portals to allow external applications to modify files from a strict confined snap. That may or may not work for all use cases. Otherwise, I also think classic is the only way.
alternatively you can call xdg-open from your app and rely on the hosts mime system if you do not insist on specific apps but allow the users mime selection to kick in
Note that the xdg-open script will return immediately and is non-blocking. This may or may not be a problem for you.
Unfortunately I need to run specific apps from their executable, with a predetermined set of cli options.
Is there a reason why you couldn’t just bundle the specific apps in your snap? Then you wouldn’t need to use classic confinement.
it’s not really feasible since the apps are a couple of latex editors (texshow and texmaker), vim, emacs, and libreoffice…
We need to launch the executable with cli parameters to copy the citation in the text…
I see, in that case I think classic is your best bet