Is there a way to launch a commandline application with a desktop icon and have the terminal window be linked to the application icon?


I have installed Cmus from Flathub. Since it’s a commandline application, clicking on its icon launches it in Gnome Console, which is fine, but the window is also assigned to the Gnome Console icon in the app menu. Is there a way to instead have it assigned to the Cmus icon?

I am using the X11 session.

the corresponding .desktop files (“launcher”) is likely


Open it and define the icon you would like to use for the launcher

Sorry, I worded my question poorly. I don’t want to change the application icon. I want to “link” a window to a different “launcher”. Is this even possible in Gnome? I know you can add StartupWMClass to the .desktop file, but I’m not sure that would help in this case.

Only GUI apps have an icon.

I do not think you can change the icon of a terminal windows based on the CLI tool running in it.

I made me a bash menu script to launch proton-cli.

For this I had to make a .desktop File to call a bash script … I do not know if you mean this …
For the Proton Menu I could set a separate Icon In the .desktop file as already mentioned above.

cat proton.desktop 
[Desktop Entry]
Name=Proton VPN Free
Exec=gnome-terminal --command /home/ilikelinux/bin/protonmenu --geometry=38x11+1-1
Comment=* Proton VPN Free *