On my desktop I have a .desktop file. If I type:
Icon=/home/ianbell/Pictures/myLogo.png
the icon of the .desktop file changes (the expected result).
But, if I type:
Icon=~/Pictures/myLogo.png
it doesn't work.
Isn't ~/
a shortcut for /home/$USER
?
Best Answer
The use of paths in a .desktop file
In a
.desktop
file, you need to use absolute and full paths. Therefore~
is not expanded.This is a commonly made mistake :)
Exceptions concerning icons are a.o. described here:
and here:
More information
In a
.desktop
file:In the
Icon=
line, you are allowed to use spaces:is fine.
However
In the
Exec=
line, you are not allowed to use spaces, unless in case of an argument. In all other cases, you need to quote the path steps with a space:will fail, while
or
will work fine