Score:2

How can I add an icon on the taskbar for a running application without icon?

ng flag

Some applications run perfectly fine, however, they do not show any icon in the taskbar as shown below:

Screenshot of the taskbar

Notice that all the running applications have icons except the last one (see the arrow) where the application runs perfectly.

When I search for the application to run it, it has an icon, but once it is running it has no icon in the taskbar.

What is wrong? how can I fix that?

David avatar
cn flag
What is the application?
Iyach tharwa nambarek avatar
ng flag
@David: It is an app that I have build using cmake. I have added the icon using Menueditor software, but when it runs it doesn' show any icon. So my question is in general how to solve that issue
David avatar
cn flag
This should be stated in the body of the question.
Iyach tharwa nambarek avatar
ng flag
@David: Could you please edit the post to include the screenshot? I don't have enough reputation.
Iyach tharwa nambarek avatar
ng flag
@David: I don't think it is necessary. Maybe it has something to do with Gnome itself?
Bruni avatar
cn flag
@Iyachtharwanambarek I do think it is necessary as it most probably is not something to do with gnome itself.
Iyach tharwa nambarek avatar
ng flag
@Bruni: Should I add the .desktop file?
Bruni avatar
cn flag
@Iyachtharwanambarek The thing is, I do not believe that the icon in the bar comes from the .desktop file. If you change e.g. for an application that has an icon, the `icon=` part in the .desktop file, the icon will not change. This is why I would mention in the question, that the application is compiled from source and not installed.
Iyach tharwa nambarek avatar
ng flag
@Bruni: I have solved the problem.
Score:1
ng flag

I have solved the issue, thanks to this answer

I had just to add the following line to .desktop file of the application:

StartupWMClass=XXXXX

Where XXXXX is the name of the application in lower case without quotes, obtained by running xprop WM_CLASS on the terminal and clicking on the application window.

Bruni avatar
cn flag
Nice, though it does not work for me. Probably because I use wayland.
Iyach tharwa nambarek avatar
ng flag
@Bruni: Have you tried this: https://unix.stackexchange.com/a/435159/493431 ?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.