<p dir="ltr">Hi! You can take a loot at snappy playpen github repository. There is an application (wallpaperdownloader) that it is java-based and it has a desktop icon working fine. This is the URL:</p>
<p dir="ltr"><a href="https://github.com/ubuntu/snappy-playpen">https://github.com/ubuntu/snappy-playpen</a></p>
<p dir="ltr">Best wishes!</p>
<p dir="ltr">El 8 ago. 2016 9:46 a. m., "Didier Roche" <<a href="mailto:didrocks@ubuntu.com">didrocks@ubuntu.com</a>> escribió:<br>
</p>
<blockquote><p dir="ltr">><br>
</p>
</blockquote>
<p dir="ltr">> Le 08/08/2016 à 08:47, Vasilisc a écrit :<br>
> > 08.08.2016 08:50, Didier Roche пишет:<br>
> >> Le 06/08/2016 à 09:47, Vasilisc a écrit :<br>
> >>>> Please help me. If I launch the program in the Terminal - well done,<br>
> >>>> but<br>
> >>>> I can't start program from Unity Launcher.<br>
> >>>><br>
> >>>> I tried to change parameter Exec in<br>
> >>>> ~/.local/share/applications/app.desktop<br>
> >>>> Exec=app-name<br>
> >>>> Exec=snap-name.app-name<br>
> >>>> Exec=$SNAP/usr/bin/start-script.sh<br>
> >>>> Exec=$snap.$app (<a href="http://snapcraft.io/docs/snaps/structure">http://snapcraft.io/docs/snaps/structure</a>)<br>
> >>>><br>
> >>>> and studied case<br>
> >>>><a href="https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop"> https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop</a><br>
> >>>><br>
> >>>><br>
> >>>><br>
> >>>> but it didn't help.<br>
> >>>><br>
> >>> suspect lines<br>
> >>> Aug 6 10:20:35 vb gnome-session[2377]: (gnome-software:2582):<br>
> >>> As-WARNING **: failed to rescan: Failed to parse<br>
> >>> /home/vasilisc/.local/share/applications/org-languagetool-gui-main.desktop<br>
> >>><br>
> >>> file: cannot process file of type application/x-desktop<br>
> >>><br>
> >>><br>
> >> Hey Vasilisc,<br>
> >><br>
> >> You didn't provide your .desktop file in setup/gui/ directory. Do you<br>
> >> mind doing this?<br>
> >> I suspect your type is different from "Type=Application", which it<br>
> >> should be.<br>
> >> Didier<br>
> ><br>
> > I found a problem. My script-wrapper (usr/bin/run.sh) run java app<br>
> > #!/bin/bash<br>
> > .... bla-bla-bla ....<br>
> > java -jar -Duser.home=$SNAP_USER_DATA $SNAP/usr/bin/languagetool.jar<br>
> ><br>
> > in snapcraft.yaml<br>
> > apps:<br>
> > languagetool:<br>
> > command: usr/bin/run.sh<br>
> > plugs: [network, network-bind, x11, home, unity7]<br>
> ><br>
> ><br>
> > If to attach the java-app to a panel Unity Launcher, then the file<br>
> > (~/.local/shape/applications/org-languagetool-gui-main.desktop ) will<br>
> > contain.<br>
> ><br>
> > [Desktop Entry]<br>
> > Encoding=UTF-8<br>
> > Version=1.0<br>
> > Type=Application<br>
> > Name=LanguageTool 3.4-SNAPSHOT<br>
> > Icon=org-languagetool-gui-main<br>
> > Exec=java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1<br>
> > /snap/languagetool/x1/usr/bin/languagetool.jar<br>
> ><br>
> > In a host-system can't execute a command (it's impossible)<br>
> > java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1<br>
> > /snap/languagetool/x1/usr/bin/languagetool.jar<br>
> ><br>
> > I don't know what to do.<br>
><br>
> You need to ship yourself your .desktop file, as you pointed via the vlc<br>
> desktop file inside the snapcraft source.<br>
><br>
> This one will have the correct Exec= after building it with snapcraft<br>
> rather then one generated from unity.<br>
><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"> https://lists.ubuntu.com/mailman/listinfo/snapcraft</a><br></p>