.desktop files for app-in-snap
Vasilisc
vasilisc777 at gmail.com
Tue Aug 9 07:23:52 UTC 2016
09.08.2016 10:05, Eloy García (PC Actual) пишет:
> Hi again!
> You don't need to have java installed on your system. This is the
> "magic" of a snap package, that you can include anything your
> application needs to run properly. I use maven plugin for my
> application, so openjdk 8 is installed within the snap package.
Please, create the virtual machine with Ubuntu 16.04.
Install - sudo snap install wallpaperdownloader
run wallpaperdownloader in Terminal and pin app
close wallpaperdownloader and launch app from Unity Launcher.
something happening? none!
"Exec=java" try execute Java in the host, but Java is not installed by
default.
Your Java in snap placed - $SNAP/usr/lib/jvm/default-java/bin/java
Sorry for my english. really only I see a problem?
>
> El 9 ago. 2016 7:31 a. m., "Vasilisc" <vasilisc777 at gmail.com
> <mailto:vasilisc777 at gmail.com>> escribió:
>
> 09.08.2016 07:52, Vasilisc пишет:
>
> 08.08.2016 11:13, Eloy García (PC Actual) пишет:
>
> 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:
>
> https://github.com/ubuntu/snappy-playpen
> <https://github.com/ubuntu/snappy-playpen>
>
> Best wishes!
>
> El 8 ago. 2016 9:46 a. m., "Didier Roche"
> <didrocks at ubuntu.com <mailto:didrocks at ubuntu.com>
> <mailto:didrocks at ubuntu.com <mailto:didrocks at ubuntu.com>>>
> escribió:
>
> >
>
> Le 08/08/2016 à 08:47, Vasilisc a écrit :
> > 08.08.2016 08:50, Didier Roche пишет:
> >> Le 06/08/2016 à 09:47, Vasilisc a écrit :
> >>>> Please help me. If I launch the program in the
> Terminal - well
> done,
> >>>> but
> >>>> I can't start program from Unity Launcher.
> >>>>
> >>>> I tried to change parameter Exec in
> >>>> ~/.local/share/applications/app.desktop
> >>>> Exec=app-name
> >>>> Exec=snap-name.app-name
> >>>> Exec=$SNAP/usr/bin/start-script.sh
> >>>> Exec=$snap.$app
> (http://snapcraft.io/docs/snaps/structure
> <http://snapcraft.io/docs/snaps/structure>)
> >>>>
> >>>> and studied case
>
> 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>
>
> <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>>
>
> >>>>
> >>>>
> >>>>
> >>>> but it didn't help.
> >>>>
> >>> suspect lines
> >>> Aug 6 10:20:35 vb gnome-session[2377]:
> (gnome-software:2582):
> >>> As-WARNING **: failed to rescan: Failed to parse
> >>>
>
> /home/vasilisc/.local/share/applications/org-languagetool-gui-main.desktop
>
> >>>
> >>> file: cannot process file of type application/x-desktop
> >>>
> >>>
> >> Hey Vasilisc,
> >>
> >> You didn't provide your .desktop file in setup/gui/
> directory. Do you
> >> mind doing this?
> >> I suspect your type is different from
> "Type=Application", which it
> >> should be.
> >> Didier
> >
> > I found a problem. My script-wrapper (usr/bin/run.sh)
> run java app
> > #!/bin/bash
> > .... bla-bla-bla ....
> > java -jar -Duser.home=$SNAP_USER_DATA
> $SNAP/usr/bin/languagetool.jar
> >
> > in snapcraft.yaml
> > apps:
> > languagetool:
> > command: usr/bin/run.sh
> > plugs: [network, network-bind, x11, home, unity7]
> >
> >
> > If to attach the java-app to a panel Unity Launcher,
> then the file
> >
> (~/.local/shape/applications/org-languagetool-gui-main.desktop
> ) will
> > contain.
> >
> > [Desktop Entry]
> > Encoding=UTF-8
> > Version=1.0
> > Type=Application
> > Name=LanguageTool 3.4-SNAPSHOT
> > Icon=org-languagetool-gui-main
> > Exec=java -jar
> -Duser.home=/home/vasilisc/snap/languagetool/x1
> > /snap/languagetool/x1/usr/bin/languagetool.jar
> >
> > In a host-system can't execute a command (it's impossible)
> > java -jar -Duser.home=/home/vasilisc/snap/languagetool/x1
> > /snap/languagetool/x1/usr/bin/languagetool.jar
> >
> > I don't know what to do.
>
> You need to ship yourself your .desktop file, as you
> pointed via the vlc
> desktop file inside the snapcraft source.
>
> This one will have the correct Exec= after building it
> with snapcraft
> rather then one generated from unity.
>
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> <mailto:Snapcraft at lists.snapcraft.io>
> <mailto:Snapcraft at lists.snapcraft.io
> <mailto:Snapcraft at lists.snapcraft.io>>
> Modify settings or unsubscribe
>
> at:https://lists.ubuntu.com/mailman/listinfo/snapcraft
> <https://lists.ubuntu.com/mailman/listinfo/snapcraft>
> <https://lists.ubuntu.com/mailman/listinfo/snapcraft
> <https://lists.ubuntu.com/mailman/listinfo/snapcraft>>
>
> 0) snap install wallpaperdownloader
> 81.81 MB / 81.84 MB
> [=============================================================================================================================================================>_]
> 99.97 % 1.74 MB/s
>
> wallpaperdownloader (stable) 2.1 from 'egarcia' installed
>
> 1) Run java-app wallpaperdownloader in Terminal or Alt+F2
>
> 2) To attach the program on a panel Unity.
>
> 3) cat
> .local/share/applications/es-estoes-wallpaperdownloader-main.desktop
>
> [Desktop Entry]
> Encoding=UTF-8
> Version=1.0
> Type=Application
> Name=WallpaperDownloader V2.1
> Icon=es-estoes-wallpaperdownloader-main.png
> Exec=java -jar -Duser.home=/home/vasilisc/snap/wallpaperdownloader/3
> /snap/wallpaperdownloader/3/jar/wallpaperdownloader.jar
> StartupNotify=false
> StartupWMClass=es-estoes-wallpaperDownloader-Main
> OnlyShowIn=Unity;
> X-UnityGenerated=true
> ---------------------------------
> "Exec=java -jar
> -Duser.home=/home/vasilisc/snap/wallpaperdownloader/3
> /snap/wallpaperdownloader/3/jar/wallpaperdownloader.jar"
>
> If Java is not installed on your system, then you have a problem.
> "Exec=java" - It's not right.
>
> For example, my script-wrapper can do the useful steps BEFORE
> start of
> the java program.
>
> Java is not installed by default in Ubuntu 16.04.1
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 16.04.1 LTS
> Release: 16.04
> Codename: xenial
>
> $ java -version
> The program 'java' can be found in the following packages:
> * default-jre
> * gcj-5-jre-headless
> * openjdk-8-jre-headless
> * gcj-4.8-jre-headless
> * gcj-4.9-jre-headless
> * openjdk-9-jre-headless
> Ask your administrator to install one of them
>
> How will it work "Exec=java"?
>
> --
> Best regards,
> vasilisc
>
--
Best regards,
vasilisc
More information about the Snapcraft
mailing list