<div dir="ltr"><div><div><div><div>Hi again Vasilisc.<br><br></div>Now I see the problem. If you pin the application executed from the terminal, the Operating System creates its own standard launcher and "bypasses" the init script you have defined within the snap package. Instead, if you want to pin a snap application, you have to use the launcher which was created in the dashboard (it has the icon you defined within the snap package).<br><br></div>I think it is a limitation that you cannot handle, but please, if anyone knows how to deal with it... :)<br><br></div>Best,<br><br></div>Eloy<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-09 9:23 GMT+02:00 Vasilisc <span dir="ltr"><<a href="mailto:vasilisc777@gmail.com" target="_blank">vasilisc777@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">09.08.2016 10:05, Eloy García (PC Actual) пишет:<span class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi again!<br>
You don't need to have java installed on your system. This is the<br>
"magic" of a snap package, that you can include anything your<br>
application needs to run properly. I use maven plugin for my<br>
application, so openjdk 8 is installed within the snap package.<br>
</blockquote>
<br></span>
Please, create the virtual machine with Ubuntu 16.04.<br>
Install - sudo snap install wallpaperdownloader<br>
<br>
run wallpaperdownloader in Terminal and pin app<br>
<br>
close wallpaperdownloader and launch app from Unity Launcher.<br>
something happening? none!<br>
<br>
"Exec=java" try execute Java in the host, but Java is not installed by default.<br>
<br>
Your Java in snap placed - $SNAP/usr/lib/jvm/default-java<wbr>/bin/java<br>
Sorry for my english. really only I see a problem?<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<br>
El 9 ago. 2016 7:31 a. m., "Vasilisc" <<a href="mailto:vasilisc777@gmail.com" target="_blank">vasilisc777@gmail.com</a><br></span>
<mailto:<a href="mailto:vasilisc777@gmail.com" target="_blank">vasilisc777@gmail.com</a>><wbr>> escribió:<span class=""><br>
<br>
    09.08.2016 07:52, Vasilisc пишет:<br>
<br>
        08.08.2016 11:13, Eloy García (PC Actual) пишет:<br>
<br>
            Hi! You can take a loot at snappy playpen github repository.<br>
            There is an<br>
            application (wallpaperdownloader) that it is java-based and<br>
            it has a<br>
            desktop icon working fine. This is the URL:<br>
<br>
            <a href="https://github.com/ubuntu/snappy-playpen" rel="noreferrer" target="_blank">https://github.com/ubuntu/snap<wbr>py-playpen</a><br>
            <<a href="https://github.com/ubuntu/snappy-playpen" rel="noreferrer" target="_blank">https://github.com/ubuntu/sna<wbr>ppy-playpen</a>><br>
<br>
            Best wishes!<br>
<br>
            El 8 ago. 2016 9:46 a. m., "Didier Roche"<br>
            <<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a> <mailto:<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>><br></span>
            <mailto:<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a> <mailto:<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>>>><span class=""><br>
            escribió:<br>
<br>
                ><br>
<br>
                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<br>
                Terminal - well<br>
                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/ap<wbr>p.desktop<br>
                >>>> Exec=app-name<br>
                >>>> Exec=snap-name.app-name<br>
                >>>> Exec=$SNAP/usr/bin/start-scrip<wbr>t.sh<br>
                >>>> Exec=$snap.$app<br>
                (<a href="http://snapcraft.io/docs/snaps/structure" rel="noreferrer" target="_blank">http://snapcraft.io/docs/snap<wbr>s/structure</a><br></span>
                <<a href="http://snapcraft.io/docs/snaps/structure" rel="noreferrer" target="_blank">http://snapcraft.io/docs/snap<wbr>s/structure</a>>)<div><div class="h5"><br>
                >>>><br>
                >>>> and studied case<br>
<br>
                            <a href="https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop" rel="noreferrer" target="_blank">https://github.com/ubuntu/snap<wbr>py-playpen/blob/master/vlc/<wbr>setup/gui/vlc.desktop</a><br>
                            <<a href="https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop" rel="noreferrer" target="_blank">https://github.com/ubuntu/sna<wbr>ppy-playpen/blob/master/vlc/<wbr>setup/gui/vlc.desktop</a>><br>
<br>
            <<a href="https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop" rel="noreferrer" target="_blank">https://github.com/ubuntu/sna<wbr>ppy-playpen/blob/master/vlc/<wbr>setup/gui/vlc.desktop</a><br>
            <<a href="https://github.com/ubuntu/snappy-playpen/blob/master/vlc/setup/gui/vlc.desktop" rel="noreferrer" target="_blank">https://github.com/ubuntu/sna<wbr>ppy-playpen/blob/master/vlc/<wbr>setup/gui/vlc.desktop</a>>><br>
<br>
                >>>><br>
                >>>><br>
                >>>><br>
                >>>> but it didn't help.<br>
                >>>><br>
                >>> suspect lines<br>
                >>> Aug  6 10:20:35 vb gnome-session[2377]:<br>
                (gnome-software:2582):<br>
                >>> As-WARNING **: failed to rescan: Failed to parse<br>
                >>><br>
<br>
            /home/vasilisc/.local/share/ap<wbr>plications/org-languagetool-gu<wbr>i-main.desktop<br>
<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/<br>
                directory. Do you<br>
                >> mind doing this?<br>
                >> I suspect your type is different from<br>
                "Type=Application", which it<br>
                >> should be.<br>
                >> Didier<br>
                ><br>
                > I found a problem. My script-wrapper (usr/bin/run.sh)<br>
                run java app<br>
                > #!/bin/bash<br>
                > .... bla-bla-bla ....<br>
                > java -jar -Duser.home=$SNAP_USER_DATA<br>
                $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,<br>
                then the file<br>
                ><br>
                (~/.local/shape/applications/o<wbr>rg-languagetool-gui-main.deskt<wbr>op<br>
                ) 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<br>
                -Duser.home=/home/vasilisc/sna<wbr>p/languagetool/x1<br>
                > /snap/languagetool/x1/usr/bin/<wbr>languagetool.jar<br>
                ><br>
                > In a host-system can't execute a command (it's impossible)<br>
                > java -jar -Duser.home=/home/vasilisc/sna<wbr>p/languagetool/x1<br>
                > /snap/languagetool/x1/usr/bin/<wbr>languagetool.jar<br>
                ><br>
                > I don't know what to do.<br>
<br>
                You need to ship yourself your .desktop file, as you<br>
                pointed via the vlc<br>
                desktop file inside the snapcraft source.<br>
<br>
                This one will have the correct Exec= after building it<br>
                with snapcraft<br>
                rather then one generated from unity.<br>
<br>
<br>
                --<br>
                Snapcraft mailing list<br>
                <a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                <mailto:<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcr<wbr>aft.io</a>><br></div></div>
                <mailto:<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcr<wbr>aft.io</a><div><div class="h5"><br>
                <mailto:<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcr<wbr>aft.io</a>>><br>
                Modify settings or unsubscribe<br>
<br>
            at:<a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/ma<wbr>ilman/listinfo/snapcraft</a><br>
            <<a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mail<wbr>man/listinfo/snapcraft</a>><br>
            <<a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mail<wbr>man/listinfo/snapcraft</a><br>
            <<a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mail<wbr>man/listinfo/snapcraft</a>>><br>
<br>
        0) snap install wallpaperdownloader<br>
        81.81 MB / 81.84 MB<br>
        [=============================<wbr>==============================<wbr>==============================<wbr>==============================<wbr>==============================<wbr>========>_]<br>
        99.97 % 1.74 MB/s<br>
<br>
        wallpaperdownloader (stable) 2.1 from 'egarcia' installed<br>
<br>
        1) Run java-app wallpaperdownloader in Terminal or Alt+F2<br>
<br>
        2) To attach the program on a panel Unity.<br>
<br>
        3) cat<br>
        .local/share/applications/es-e<wbr>stoes-wallpaperdownloader-main<wbr>.desktop<br>
<br>
        [Desktop Entry]<br>
        Encoding=UTF-8<br>
        Version=1.0<br>
        Type=Application<br>
        Name=WallpaperDownloader V2.1<br>
        Icon=es-estoes-wallpaperdownlo<wbr>ader-main.png<br>
        Exec=java -jar -Duser.home=/home/vasilisc/sna<wbr>p/wallpaperdownloader/3<br>
        /snap/wallpaperdownloader/3/ja<wbr>r/wallpaperdownloader.jar<br>
        StartupNotify=false<br>
        StartupWMClass=es-estoes-wallp<wbr>aperDownloader-Main<br>
        OnlyShowIn=Unity;<br>
        X-UnityGenerated=true<br>
        ------------------------------<wbr>---<br>
        "Exec=java -jar<br>
        -Duser.home=/home/vasilisc/sna<wbr>p/wallpaperdownloader/3<br>
        /snap/wallpaperdownloader/3/ja<wbr>r/wallpaperdownloader.jar"<br>
<br>
        If Java is not installed on your system, then you have a problem.<br>
        "Exec=java" - It's not right.<br>
<br>
        For example, my script-wrapper can do the useful steps BEFORE<br>
        start of<br>
        the java program.<br>
<br>
    Java is not installed by default in Ubuntu 16.04.1<br>
    $ lsb_release -a<br>
    No LSB modules are available.<br>
    Distributor ID: Ubuntu<br>
    Description:    Ubuntu 16.04.1 LTS<br>
    Release:        16.04<br>
    Codename:       xenial<br>
<br>
    $ java -version<br>
    The program 'java' can be found in the following packages:<br>
     * default-jre<br>
     * gcj-5-jre-headless<br>
     * openjdk-8-jre-headless<br>
     * gcj-4.8-jre-headless<br>
     * gcj-4.9-jre-headless<br>
     * openjdk-9-jre-headless<br>
    Ask your administrator to install one of them<br>
<br>
    How will it work "Exec=java"?<br>
<br>
    --<br>
    Best regards,<br>
    vasilisc<br>
<br>
</div></div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Best regards,<br>
vasilisc<br>
</font></span></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>