srevinsaju / zap

:zap: Delightful AppImage package manager
https://zap.srev.in
MIT License
506 stars 20 forks source link

AppImage Icons Missing from Zap System Integration #92

Closed kj4ezj closed 1 year ago

kj4ezj commented 2 years ago

When you install AppImages using zap in Linux Mint 20.3 Cinnamon with system integration, the icons in the start menu and on the taskbar are missing.

Example 1 - Bitwarden

Steps to reproduce the issue.

  1. Download the Bitwarden *.AppImage to ~/Downloads/Bitwarden.AppImage.
    curl -fSL 'https://vault.bitwarden.com/download/?app=desktop&platform=linux&variant=appimage' -o ~/Downloads/Bitwarden.AppImage
  2. Use zap to install Bitwarden.
    zap install bitwarden ~/Downloads/Bitwarden.AppImage
  3. Proceed with installation when asked Downloading bitwarden of size (unknown).. [Y], [Enter]
  4. Approve system integration when prompted ? Do you want to integrate this appimage? [? for help] (y/N). [Y], [Enter]

The Bitwarden logo, present in the *.AppImage, is missing from the start menu entry and the task bar icon.

2022-10-07 15-20-07 - Bitwarden logo missing after zap installation

Note the contents of ~/.local/share/applications/bitwarden.desktop.

[Desktop Entry]
Name=Bitwarden (AppImage)
Exec=bitwarden %U
Terminal=false
Type=Application
Icon=bitwarden
StartupWMClass=Bitwarden
X-AppImage-Version=2022.9.1
GenericName=Password Manager
Comment=A secure and free password manager for all of your devices.
MimeType=x-scheme-handler/bitwarden;
Categories=Utility;
X-AppImage-Integrate=
X-Zap-Id=bitwarden
TryExec=/home/$USER/.local/bin/bitwarden

The file at /home/$USER/.local/bin/bitwarden is a symbolic link pointing to the binary /home/$USER/.local/share/zap/v2/bitwarden. Here, in the v2 folder, you will find an icons subfolder containing bitwarden.png, the *.AppImage icon.

You can fix the missing icons by giving Icon in bitwarden.desktop the path to this file. Be sure to replace $USER with your username.

sed -E 's_(Icon=).*$_\1/home/$USER/.local/share/zap/v2/icons/bitwarden.png_' -i ~/.local/share/applications/bitwarden.desktop

This provides the logo zap already has to the GUI integration.

2022-10-07 16-15-20 - Bitwarden with logo restored

Example 2 - Joplin

Here again, when you install Joplin using zap, the icon present in the *.AppImage file is saved by zap but missing from the system integration.

zap install --from 'https://github.com/laurent22/joplin/releases/download/v2.8.8/Joplin-2.8.8.AppImage' joplin

It can be restored by pointing the Icon field in the joplin.desktop file to the icon zap saved. Be sure to replace $USER with your username.

sed -E 's_(Icon=).*$_\1/home/$USER/.local/share/zap/v2/icons/joplin.png_' -i ~/.local/share/applications/joplin.desktop

This fixes the issue.

System

System

Kernel: 5.4.0-126-generic x86_64 bits: 64 compiler: gcc v: 9.4.0 
Desktop: Cinnamon 5.2.7 wm: muffin dm: LightDM Distro: Linux Mint 20.3 Una 
base: Ubuntu 20.04 focal

Zap

$ zap --version
Zap version Build:v2.2.1.6.gdc5b7ff 1646814234
srevinsaju commented 2 years ago

Thanks for the detailed issue description. Can you try using zap init and enabling custom icons? (this is just for debugging, if it works with custom icons).

kj4ezj commented 1 year ago

Hey, sorry for being so slow to respond. I didn't get a notification for your reply for some reason.

I tried what you suggested using Joplin, since it preserves your local data when you uninstall it. I am using the same version of Linux Mint (20.3), Joplin (v2.8.8), and Zap (Zap version Build:v2.2.1.6.gdc5b7ff 1646814234) as when I opened the issue. Here is what I tried.

2022-10-31 12-52-28 - zap install joplin after init command

Unfortunately, the same problem persists.

2022-10-31 12-54-32 - Joplin icon missing after zap init and install

Please let me know how I can continue to help troubleshoot, and hopefully the notifications work this time around.