Desktop entry opening new window everytime I run it

I downloaded the portable version of ungoogled-chromium, and copied the firefox.desktop files, and changed the execute commands to run with chromium. I copied it to /usr/share/applications and added it to my latte panel.
But every time I click on it, it opens a new window with a new icon:

And if I click on it again, it opens a new window, other than the already open window.

These are the contents of the Chromium.desktop file:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=Chromium
GenericName=Web Browser
Comment=Browse the World Wide Web
Keywords=Internet;WWW;Browser;Web;Explorer
Exec=/home/myms/Software/Chrome/chrome %u
Icon=chromium
Terminal=false
X-MultipleArgs=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-xpinstall;application/pdf;application/json;
StartupNotify=true
StartupWMClass=Chromium
Categories=Network;WebBrowser;
Actions=new-window;new-private-window;

[Desktop Action new-window]
Name=New Window
Exec=/home/myms/Software/Chrome/chrome -new-window %u

[Desktop Action new-private-window]
Name=New Private Window
Exec=/home/myms/Software/Chrome/chrome -incognito %u

How can I solve this?
Thanks

Shouldn’t it be easier by installing ungoogled-chromium from AUR?

1 Like

The problem with that @maycne.sonahoz is that the download size is about 1.2GB from the AUR, as compared to 128MB from the portable Linux version.
Also, the internet speed where I am is absolutely rubbish…

Solved by:

❯ xprop WM_CLASS

# Click on the Chromium window...

WM_CLASS(STRING) = "chromium-browser", "Chromium-browser"

And set:

To:

StartupWMClass=chromium-browser

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