Score:1

Why some Icons, when fixed in the Dock, open as new Icons instead of on top of the existing Icon?

cn flag

So, I created some .desktop files and put then in my .local/share/applications to open electron apps that I created with Nativefier. Those apps appear just fine in the applications menu, and I can fix them in the Dock, but when I open them, it opens as a new icon in the bar, as can be seen in the image bellow:

enter image description here

First icon in the image is the one that I add as Favorite, and when I click them, it opens the last one.

Is there a way for me to manipulate this behavior so the app opens in the same Icon that I marked as Favorite? As it works with other apps, like Nautilus, Tunderbird, even the Calculator in the screenshot.

Bellow is the .desktop file for the app shown in the screenshot:

[Desktop Entry]
Version=1.0
Name=Gather
Comment=Web App
Exec=/home/brenno/.webapp-manager/Gather6010-linux-x64/Gather6010
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/brenno/.local/share/ice/icons/Gather.png
Categories=GTK;Network;
MimeType=text/html;text/xml;application/xhtml_xml;
StartupWMClass=WebApp-Gather6010
StartupNotify=true
X-WebApp-URL=https://gather.town/app/S1LGHOTUkxcaTyin/Yosemite%20Labs

Thanks!

Score:1
cn flag

Crux here is to set your WMClass right in the desktop file. Open the application and check its WMClass as following. Run the command

xprop | grep WM_CLASS

then click the window of your application. If the class matches that provided in the .desktop file, the running instance will be represented as a white dot under the pinned icon.

cn flag
That was the correct answer, thanks!
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.