I've created a .desktop
file looking like this:
[Desktop Entry]
Type=Application
Name=sts
Comment=Spring Tool Suite
Icon=/home/pago/Programi/sts-bundle/sts-3.9.1.RELEASE/icon.xpm
Exec=/home/pago/Programi/sts-bundle/sts-3.9.1.RELEASE/STS
Terminal=false
Categories=Development;IDE;Java;Eclipse
StartupWMClass=STS
The desktop file has the correct icon, but when it launches it's just a red x sign in a grey frame. I also tried putting the .desktop
icon in ~/.local/share/applications/sts.desktop
and in /usr/share/applications/sts.desktop
and I've copied the icon to /usr/share/pixmaps/sts.xpm
Even if I search in activities for STS and pin it to dash, it has a normal icon, but when launched it defaults to the wrong one.
xprop WM_CLASS
and click with the mouse cursor (which should have changed into a crosshair now) on the STS window? (related: https://askubuntu.com/questions/558098/icon-missing-when-application-is-launched) – Byte Commander Dec 17 '17 at 22:40