Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I launch an external program from my snap application outside of the snap context?

Tags:

snapcraft

In vala I am launching the elementary OS Settings like this:

var appinfo = AppInfo.create_from_commandline ("switchboard", null, AppInfoCreateFlags.SUPPORTS_URIS);
appinfo.launch_uris (list, null);

But this fails because I assume the process is running isolated somehow.

(vpn-status:14798): GLib-GIO-ERROR **: No GSettings schemas are installed on the system
Trace/breakpoint trap (core dumped)

Any ideas how I could launch this external program properly?

like image 938
AndrewVos Avatar asked Dec 19 '25 00:12

AndrewVos


1 Answers

This is indeed likely due to your application being strictly confined within the snap. You can test this by installing your snap with the ---devmode option which overrides the strict confinement.

You can also debug the security confinement using the snappy-debug package:-

sudo snap install snappy-debug

Then run it:-

snappy-debug.security scanlog

In another window, start your application and you should get useful security debugging info output from the above program.

like image 133
popey Avatar answered Dec 21 '25 02:12

popey