Application Icon not shown on Gnome dock for AppImage #15

Open
opened 2021-01-25 11:18:17 +00:00 by adrinux · 18 comments
Contributor

The generic Gnome application icon is used for vikunja-desktop with both the Appimage and the Pacman install on manajaro Gnome.

I was able to get this working by downloading the svg version of the logo.svg from Github

And renaming it and saving it to the hicolor/scalable folder:

/usr/share/icons/hicolor/scalable/apps/vikunja-desktop.svg

then rebuilding the icon cache:

sudo gtk-update-icon-cache /usr/share/icons/hicolor

I would suggest packaging the svg icon as well as the png.

The generic Gnome application icon is used for vikunja-desktop with both the Appimage and the Pacman install on manajaro Gnome. I was able to get this working by downloading the svg version of the logo.svg from [Github](https://github.com/go-vikunja/frontend/blob/2870f9217e167becefbaec3f1f4ef4f638fe4411/public/images/logo.svg) And renaming it and saving it to the hicolor/scalable folder: ``` /usr/share/icons/hicolor/scalable/apps/vikunja-desktop.svg ``` then rebuilding the icon cache: ``` sudo gtk-update-icon-cache /usr/share/icons/hicolor ``` I would suggest packaging the svg icon as well as the png.
konrad added the
bug
label 2021-01-25 19:51:18 +00:00
Owner

Looks like this isn't possible at the moment with electron: https://github.com/electron/electron/issues/9642

Looks like this isn't possible at the moment with electron: https://github.com/electron/electron/issues/9642
Author
Contributor

A workaround might be adding all the different sizes of icon in png format. I can look into that.

A workaround might be adding all the different sizes of icon in png format. I can look into that.
Owner

Do you want to send a PR?

Do you want to send a PR?
Author
Contributor

I have forked. I'm slow though, gimme time :)

I have forked. I'm slow though, gimme time :)
Author
Contributor

Got it working using an .icns format file and explicitly linking it in package.json.

I'll do a pull request tomorrow when I'm more awake.

Got it working using an .icns format file and explicitly linking it in package.json. I'll do a pull request tomorrow when I'm more awake.
Author
Contributor

Fix suggested by electron-builder docs and this plus following electron-builder issue comments

For the record. I converted the icon at desktop/build/icon.png to icons format using the icnsify binary, like so:

icnsify -i icon.png -o icon.icns

Tested build and pacman package install on manjaro Gnome.

Fix suggested by electron-builder docs and this plus following electron-builder [issue comments](https://github.com/electron-userland/electron-builder/issues/2577#issuecomment-659879082) For the record. I converted the icon at `desktop/build/icon.png` to icons format using the [icnsify](https://github.com/jackmordaunt/icns) binary, like so: ``` icnsify -i icon.png -o icon.icns ``` Tested build and pacman package install on manjaro Gnome.
Owner

PR is merged, closing.

PR is merged, closing.

Is this expected to be fixed? I'm still seeing the generic icon running the AppImage on Manjaro Gnome.

System

Vikunja Desktop-0.16.0
5.12.2-1-MANJARO x86_64 GNU/Linux
Gnome 40.1.0

Is this expected to be fixed? I'm still seeing the generic icon running the AppImage on Manjaro Gnome. System Vikunja Desktop-0.16.0 5.12.2-1-MANJARO x86_64 GNU/Linux Gnome 40.1.0
Owner

@jrabensc It is fixed, you should upgrade.

@jrabensc It is fixed, you should upgrade.
Author
Contributor

@jrabensc installed the AppImage, I only built and tested the pacman package for the fix.

Just downloaded the v17 pacman package and updated with

sudo pacman -U Vikunja\ Desktop-0.17.0.pacman

and the icon is present in the gnome dash (I don't use dash-to-dock extension).

@konrad The appimage may require different action. Quite a lot of AppImages I download and install seem make no effort to add the application.Desktop launch file or icons to the system...

@jrabensc installed the AppImage, I only built and tested the pacman package for the fix. Just downloaded the v17 pacman package and updated with ```bash sudo pacman -U Vikunja\ Desktop-0.17.0.pacman ``` and the icon is present in the gnome dash (I don't use dash-to-dock extension). @konrad The appimage may require different action. Quite a lot of AppImages I download and install seem make no effort to add the application.Desktop launch file or icons to the system...
Owner

@adrinux But it looks like @jrabensc is using 0.16 which does not have the fix. I'm not sure about the appimage, I'd just imagine electron builder would figure out all these quirks between formats and such.

@adrinux But it looks like @jrabensc is using 0.16 which does not have the fix. I'm not sure about the appimage, I'd just imagine electron builder would figure out all these quirks between formats and such.
Author
Contributor

Can confirm the is no icon with the AppImage - it would need to offer desktop integration on first run and copy the launcher plus icons into place.

(Also found I have an inconsistent pacman db from installing and removing the package I built for testing. Everything works fine though.)

I should probably look at creating an AUR package for Vikunja-desktop.

Can confirm the is no icon with the AppImage - it would need to offer desktop integration on first run and copy the launcher plus icons into place. (Also found I have an inconsistent pacman db from installing and removing the package I built for testing. Everything works fine though.) I should probably look at creating an AUR package for Vikunja-desktop.
Author
Contributor

@konrad Ah, yes I didn't read properly. He should upgrade - but it still wont have desktop integration, no icon, no launcher. I checked with the .17 appimage.

@jrabensc Remove the AppImage and install via the pacman package would be the workaround for now.

@konrad Ah, yes I didn't read properly. He should upgrade - but it still wont have desktop integration, no icon, no launcher. I checked with the .17 appimage. @jrabensc Remove the AppImage and install via the pacman package would be the workaround for now.
Owner

I think I've found it: The electon-builder docs say explicitly they don't manage icons and such for appimages. Not sure if I've overlooked something or if that's not something I could do on the Vikunja side as the distributor of the appimage.

Maybe it'd be worth a try to add a desktop entry to the builder configuration?

I think I've found it: [The electon-builder docs](https://www.electron.build/configuration/appimage.html) say explicitly they don't manage icons and such for appimages. Not sure if I've overlooked something or if that's not something I could do on the Vikunja side as the distributor of the appimage. Maybe it'd be worth a try to add a `desktop` entry to the builder configuration?

Thanks for your help. I can confirm that the .17 AppImage is missing the icon in the Gnome overview and dash, but its visible in the app grid.

Maybe you could take a look at this? https://github.com/standardnotes/desktop

They are using an Electron AppImage as well, and the icon is working without any issues.

Thanks for your help. I can confirm that the .17 AppImage is missing the icon in the Gnome overview and dash, but its visible in the app grid. Maybe you could take a look at this? https://github.com/standardnotes/desktop They are using an Electron AppImage as well, and the icon is working without any issues.
Author
Contributor

@jrabensc How did you install Standard Notes?
I ask because if you installed say, standardnotes-bin from the AUR, the PKGBUILD installs the AppImage but also deals with installing the .desktop file and icon.

The AppImage docs seem more helpful than the electron builder docs.

@konrad There is a desktop.tpl at node_modules/app-builder-lib/templates/linux but that currently doesn't include an icon definition, nor do the before and after install scripts there deal with an icon.

It's not clear to me how you modify those module templates for your own electron build...of if you can.

@jrabensc How did you install Standard Notes? I ask because if you installed say, standardnotes-bin from the AUR, the PKGBUILD installs the AppImage but also deals with installing the .desktop file and icon. The [AppImage docs](https://docs.appimage.org/packaging-guide/from-source/linuxdeploy-user-guide.html) seem more helpful than the electron builder docs. @konrad There is a desktop.tpl at `node_modules/app-builder-lib/templates/linux` but that currently doesn't include an icon definition, nor do the before and after install scripts there deal with an icon. It's not clear to me how you modify those module templates for your own electron build...of if you can.

@adrinux I installed the Standard Notes AppImage using AppImageLauncher

However, when I download the AppImage again and just simply run it, the icon is not shown as well.

@adrinux I installed the Standard Notes AppImage using [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) However, when I download the AppImage again and just simply run it, the icon is not shown as well.
Owner

Found this and this. So in theory, this should work if we'd add an icon property to the linux setting in the package.json.

Anyone wants to send a PR?

Found [this](https://github.com/electron-userland/electron-builder/issues/5532) and [this](https://github.com/electron-userland/electron-builder/issues/2577#issuecomment-659879082). So in theory, this should work if we'd add an `icon` property to the `linux` setting in the package.json. Anyone wants to send a PR?
konrad reopened this issue 2021-05-21 10:14:16 +00:00
konrad changed title from Application Icon not shown on Gnome dock to Application Icon not shown on Gnome dock for AppImage 2021-05-21 10:14:28 +00:00
This repo is archived. You cannot comment on issues.
No Milestone
No Assignees
3 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/desktop#15
No description provided.