cryptomator / cryptomator-linux

Cryptomator .AppImage for Linux
GNU General Public License v3.0
14 stars 7 forks source link

Don't hard-code icon in desktop file #15

Closed gregorydk closed 4 years ago

gregorydk commented 4 years ago

Description

To support icon themes, don't hard-code your icon in the desktop file.

Wrong: Icon=/usr/share/cryptomator/Cryptomator.png

Correct: Icon=Cryptomator

System Setup

overheadhunter commented 4 years ago

When using the "correct way", where does the actual file need to be installed to? Can you provide some docs?

gregorydk commented 4 years ago

Preferably in /usr/share/icons/hicolor. The current Cryptomator icon is 512px so it would go in /usr/share/icons/hicolor/512x512/apps/. Different sizes go in their respective folder.

See https://specifications.freedesktop.org/icon-theme-spec/latest/ar01s07.html

Also, if you're planning to release a Flatpak and Appstream file, you might want to change the icon name to your Application ID.

overheadhunter commented 4 years ago

I just wanted to fix this, but then I noticed there is no hard-coded path:

https://github.com/cryptomator/cryptomator-linux/blob/70fdab58d3937885782630f18364c97fc0dea18c/resources/appimage/cryptomator.desktop#L5

In what version of Cryptomator did you see a path?

gregorydk commented 4 years ago

@overheadhunter I got it in version 1.4.15 installed from the PPA at https://launchpad.net/~sebastian-stenzel/+archive/ubuntu/cryptomator.

[Desktop Entry]
Name=Cryptomator
Version=1.4.15
Comment=Cloud Storage Encryption Utility
Exec=/usr/bin/cryptomator %f
Icon=/usr/share/cryptomator/Cryptomator.png
Terminal=false
Type=Application
Categories=Utility;
MimeType=application/x-vnd.cryptomator-vault-metadata
overheadhunter commented 4 years ago

Ah ok, the ppa is built differently... I will need to take another look at this

gregorydk commented 4 years ago

Any progress? It's still hard-coded in release 1.5.1.

overheadhunter commented 4 years ago

Any progress? It's still hard-coded in release 1.5.1.

Is it? It shouldn't be:

https://github.com/cryptomator/cryptomator-linux/blob/19a689f91db10cfe06ed62d723a49a5a155cf423/resources/appimage/AppDir/usr/share/applications/org.cryptomator.Cryptomator.desktop#L5

gregorydk commented 4 years ago

@overheadhunter I'm talking about the deb in the PPA. It's also still the old bot icon.

overheadhunter commented 4 years ago

Oh sorry. I did a lot of changes to the PPA, but I wasn't able to build them due to errors in Ubuntu's openjdk package. So I had to revert them and probably that's why it still doesn't use the new format.

I'll have another look at this during the next release.

overheadhunter commented 4 years ago

Should now be fixed for the PPA release as well with version 1.5.3 :)