.desktop files for app-in-snap

Vasilisc vasilisc777 at gmail.com
Tue Aug 9 09:57:58 UTC 2016


09.08.2016 12:47, Oliver Grawert пишет:
> hi,
> Am Dienstag, den 09.08.2016, 10:23 +0300 schrieb Vasilisc:
>>
>> 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?
>>
> your .desktop file is in the wrong place ... you need to put it into
> your source directory into the "setup/gui" directory together with the
> icon...
>
> here is a java app that i packaged, take a look at the setup/gui
> directory and at the "wrapper" script:
>
> https://github.com/ogra1/jtiledownloader
>
> now try the following:
>
> sudo snap install jtiledownloader
>
> once this is done, hit the windows key on your keyboard to bring up the
> dash ... click the A at the bottom of the dash window to search for
> applications, type "jtile" and you see an icon ... click it ...
> the app starts, pin the icon in the launcher ... close the app ...
Good example! Thx

cat ~/.local/share/applications$ cat 
org-openstreetmap-fma-jtiledownloader-jtiledownloaderstart.desktop

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=JTileDownloader Version: 0.6.1
Icon=org-openstreetmap-fma-jtiledownloader-jtiledownloaderstart.png
Path=/home/vasilisc/snap/jtiledownloader/2
Exec=/snap/jtiledownloader/2/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java 
-jar /snap/jtiledownloader/2/jTileDownloader-0-6-1.jar
StartupNotify=false
StartupWMClass=org-openstreetmap-fma-jtiledownloader-JTileDownloaderStart
OnlyShowIn=Unity;
X-UnityGenerated=true

Right line!!!!
Exec=/snap/jtiledownloader/2/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/java 
-jar /snap/jtiledownloader/2/jTileDownloader-0-6-1.jar

Thx Oliver.

> if you now click the launcher icon again the app will start properly...
>
> do *not* put anything manually into ~/.local/share, snapd puts the
> .desktop file in the right place for the system if you had it in the
> setup/gui dir in your snap source ...
>
> ciao
> 	oli
>
>
>


-- 
Best regards,
vasilisc




More information about the Snapcraft mailing list