Most applications when run from the terminal show a nice icon or put a dot under the main icon in dash (I am using Dash to Dock in Ubuntu 24.10). Some just add a cog. Some, such as arduino-ide, used to display an icon but now just show a cog. This can be confusing when you have three or more cogs open.
How can I replace the cog with a proper icon? I've tried adding StartupWMClass=ArduinoIDE;
to a startup script for the arduino-ide but that doesn't fix it.
.desktop listing:
[Desktop Entry]
Type=Application
Name=Programming
GenericName=Programming
Comment=Open-source electronics prototyping platform
Exec=~/ArduinoLatest/arduino-ide_2.3.4_Linux_64bit/arduino-ide
Icon=arduino-arduinoide
Terminal=false
Categories=Development;IDE;Electronics;
MimeType=text/x-arduino;
Keywords=embedded electronics;electronics;avr;microcontroller;
StartupWMClass=ArduinoIDE;
Actions= Arduino-Trad;ArduinoBeta;ArduinoMicroPython;UIFlow;UIFlowWeb;UIFlowWebFF;M5_Burner;Espruino;CuteCom;PicoCom;Meld;Jupyter;Flipper;Eric;RemoteXY;Cura;FreeCad;
The correct WMClass has to be specified in the
.desktop
launcher that starts the program..desktop
file is used to launch the programStartupWMClass=<WMClass>
Some detail:
lg
thenEnter
. In the window that appears, consult the tab "Windows".desktop
file is in a directoryapplications
, either under~/.local/share/
or under one of the directories listed in theXDG_DATA_DIRS
directory. If a similar file exists in multiple places, the one present in the location that comes first, is used.