Re: Using Environment Variables in Launchers

It should work just by specifying the full path to the icon:

Icon=/home/toz/d.png

If however, you're looking to use the $USER environment variable there, then I have to ask why? Just place the icon in a location that everyone has access to (i.e. /usr/share/icons) and specify the full path.

Re: Using Environment Variables in Launchers

@ToZ: Thanks for your very fast reply!

Yes, i want to use an environment variable like $USER or $HOME, because the system is used by many users and every user may have his own version of this program. And i want to avoid to create a specific app.desktop file for every user, but have a generic one to copy into users $HOME/.local/share/applications/ directory.

Re: Using Environment Variables in Launchers

In that case, would it not be useful to have one copy of the icon in a system directory accessible by all (i.e. /usr/share/icons) so that each user doesn't need to have a copy of the icon in their home directory?

Re: Using Environment Variables in Launchers

I thought it would be nice to have all files of the program in one place and not scattered across the whole filesystem. However, as it seems there is not a simple solution for this problem, i created a symlink $HOME/.icons/app.png (see [0]) linking to ../opt/app/icon.png (/usr/share/icons is not an option, since i have no root privileges).