<div dir="ltr">This is related to a question I had as well. I have a program that uses wxLaunchDefaultBrowser which, looking at its implementation, tries to make the system call "exec()" to launch the default browser with a URL.<div><br></div><div>If snap programs are not allowed to start other processes, that's fine; but if enough people need to launch the default browser with a URL, then I'm sure a secure solution just for this could somehow be implemented for snaps.</div><div><br></div><div>I gather that one design goal of snaps, however, is the ability for people to write programs for any environment, but also have them work as snaps so that the programmer doesn't have to write snap-specific code, or make snap-specific considerations in their code. In other words, your code should be "none-the-wiser" that it is running in the confined area.</div><div><br></div><div>So with that in mind, I'm not sure how to solve the problem. Any secure API exposed to snap applications already breaks the above design goal.</div><div><br></div><div>Of course, it's not unreasonable for my program to have "#ifdef WIN32" or "#ifdef UNIX", and in the latter case, I may be looking to utilize something in a standard unix environment which, I believe, is synthesized in Unbuntu Core. That's where I believe the snap environment can intercept what an application is doing and provide a secure solution, and this may be the "xdg-open" thing Otfried was talking about.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 19, 2016 at 2:37 AM, Otfried Cheong <span dir="ltr"><<a href="mailto:otfried@ipe.airpost.net" target="_blank">otfried@ipe.airpost.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
my app has a manual in html. I normally show this using "xdg-open<br>
<url>", but from the snap this results in "xdg-open: Permission denied",<br>
leaving this log:<br>
<br>
[21249.231634] audit: type=1400 audit(1474273861.873:383):<br>
apparmor="DENIED" operation="exec" profile="<a href="http://snap.ipe.sh" rel="noreferrer" target="_blank">snap.ipe.sh</a>"<br>
name="/usr/local/bin/xdg-open" pid=9551 comm="sh" requested_mask="x"<br>
denied_mask="x" fsuid=1000 ouid=0<br>
<br>
According to<br>
<a href="https://lists.ubuntu.com/archives/snapcraft/2016-September/001048.html" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>archives/snapcraft/2016-<wbr>September/001048.html</a><br>
this should work.<br>
I did refresh ubuntu-core from the beta channel and currently have<br>
revision 636 of ubuntu-core.<br>
<br>
<br>
Slightly related: If I understand<br>
<a href="https://lists.ubuntu.com/archives/snapcraft/2016-September/001118.html" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>archives/snapcraft/2016-<wbr>September/001118.html</a><br>
correctly, the host filesystem should be exposed to the snap as<br>
/var/lib/snapd/hostfs in devmode? It isn't on my system.<br>
<br>
Cheers,<br>
Otfried<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
</font></span></blockquote></div><br></div></div>