Embedding an icon in a Linux executable Embedding an icon in a Linux executable linux linux

Embedding an icon in a Linux executable


Executables on Linux do not have icons embedded (try to point your file manager to /usr/bin). What you have seen is probably a Desktop Entry. That's a text file describing the icon, program name and the executable.


On Ubuntu:

mouse right click the icon you don't like -> Properties -> in the opened window click the icon -> choose an icon you want


You cannot use ~ userhome, . here, .. up in file paths in desktop files. You must give the complete filepath from / root.
OR
Add all the pertinent filepaths to the $PATH environment variable, then just give the filenames in the desktop entries, e.g.:

Exec=MyJavaAppIcon=MyJavaPic.png