<div dir="ltr"><div><div><div>Hi all.<br><br></div>I currently have several problems with my snap package for wallpaperdownloader application, a java-based piece of software that downloads wallpapers from the Internet, and maybe this is the solution for some of them.<br></div>In this application, I execute some Linux command tools such as xdg-open and gsettings. They work flawlessly within a "native" environment, but when I try to execute them inside the snap package, they simply don't work.<br><br></div>Gustavo, when you suggest to use the line: bus-send --print-reply --session --dest=com.canonical.SafeLaunc<wbr>her / com.canonical.SafeLauncher.Ope<wbr>nURL string:"$1"<br><div>could you give an example of that? I mean, if I want to, for example, open a browser using "xdg-open <a href="https://www.google.com">https://www.google.com</a>" executing this command from my Java code, what would be the line I should use instead?. This implies to modify my java code too and I had to do the distinction between the application executed in a native environment and in a snap confinement. This wouldn't be the desired way of packaging the app. Would be possible to use some kind of interface to have access to the "native" command line tools installed in the system? This way, source code would be agnostic (I mean, I didn't have to tweak the application depending on the environment executed) and it would be only a matter of snapcraft.yaml configuration.<br><br></div><div>Thanks in advance :)<br><br></div><div>Best,<br><br></div><div>Eloy<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-09-08 4:11 GMT+02:00 Gustavo Niemeyer <span dir="ltr"><<a href="mailto:gustavo.niemeyer@canonical.com" target="_blank">gustavo.niemeyer@canonical.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Sep 7, 2016 at 10:31 PM, Mark Shuttleworth <span dir="ltr"><<a href="mailto:mark@ubuntu.com" target="_blank">mark@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><span>On 07/09/16 12:32, Matthew Williams wrote:<br>
> I have a few applications I'm looking to snap, but quite a lot of them<br>
> shell out to other commands at some point and it's not always<br>
> practical to include these with my snap, one concrete example is<br>
> shelling out to /usr/bin/sensible-browser.<br></span></blockquote><div><br></div></span><div>We have something slightly better than this. Any snap can call xdg-open $url and have that URL being sent to a safe launcher over dbus.</div><div><br></div><div>This is the exact line:</div><div><br></div><div> bus-send --print-reply --session --dest=com.canonical.SafeLaunc<wbr>her / com.canonical.SafeLauncher.Ope<wbr>nURL string:"$1"<br></div><div><br></div><div>Because this is always safe to do and offered over a common mechanism, we don't need an interface to mediate it. If something is listening, a browser is fired.</div><div><br></div><div>We need to make sensible-browser call the same so applications just work.</div><div><br></div><div><br></div></div><div>gustavo @ <a href="http://niemeyer.net" target="_blank">http://niemeyer.net</a></div>
</div></div>
<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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Eloy García Almadén<br></div></div>
</div>