Setting Icon= in desktop file not always working
jnsh opened this issue · 1 comments
Working on Arch Linux PKGBUILD for glslViewer, I noticed that the icon was not added to the desktop entry for me.
The problem is that the build tries to echo
the Icon=...
line to a .desktop
file in ${CMAKE_INSTALL_FULL_DATAROOTDIR}/applications/
while the desktop file was in fact installed in ${CMAKE_INSTALL_DATAROOTDIR}/applications/
on the line above.
The simple fix would be to fix the path for echo
redirection target, however this whole process could probably be simplified:
When the icon is installed in /usr/share/icons
, you don't need to define the full icon path in the .desktop
file, but just the filename without extension (i.e. Icon=glslViewer
) is enough (as per icon theme specification).
Therefore you should be able to just hardcode the icon in the desktop file, and avoid writing it during build altogether.
Thank you @jnsh! do you mind making a PR for this?