Changing Taskbar Icons

I have created .desktop files for some PyQt programs I have made, Each one has it’s own unique icon. I have put them in the .local/share/applications folder and they are in the Main Menu under the ‘Other’ category with the correct icon.
They all work fine, but when a program is loaded, the icon on the taskbar is the generic cog wheel one for all of them.
Is there a way to make the correct icon show in the taskbar, apart from adding the programs to favorites, which I don’t want to do?

You need to add the "StartupWMClass=" line to the .desktop files where the value is your program's name.

You can check your program's name with the xprop command.

Thank you, all working now

set @Lui04 's post as solution if it worked.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.