This is an extension to the question how to include an environment variable in the launcher? . This question explains how to use the environment variable for the Exec
part of the .desktop
file but not the icon
an example:
[Desktop Entry]
Name=My Application name
Comment=a comment
Exec=sh -c '$HOME/.bin/path/to/bin'
Icon= $HOME/.bin/path/to/icon
This Launcher will work but the icon is not shown. I can't use something like
Icon=sh -c '$HOME/.bin/path/to/icon'
for the icon... what to do instead?
Icon=myapp
does not work for me, I need to provide the full path (Icon=/usr/share/icons/myapp.png
). Does the icon need to be namedmyapp.png
, and I need to omit the extension in the *.desktop file? Or does the icon need to be in a subdirectory namedmyapp
. – Ratnanil Jan 13 '23 at 06:59