Bug 381266 - Icontasks identifying Chrome apps as Chrome windows
Summary: Icontasks identifying Chrome apps as Chrome windows
Status: RESOLVED DUPLICATE of bug 358277
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: 5.10.1
Platform: Manjaro Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
: 450703 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-16 06:07 UTC by Ross Williams
Modified: 2023-02-14 17:40 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Williams 2017-06-16 06:07:11 UTC
Overview:
*********

Running Chrome apps are now identified as normal browser windows in 5.10.1 and 5.10.2. This is working correctly in 5.9.5. See screenshot links below:

5.9.5: http://i.imgur.com/MEjVRfJ.png

Note the mail and Authy icons are lit up and are not grouped with Chrome.

5.10.1: http://i.imgur.com/K8k9xq4.png

Note the mail and Authy apps are grouped with the Chrome windows. 

Steps to Reproduce:
*******************

1. Open Chrome.
2. Open Authy chrome app

Actual Results:
***************

Authy is identified as a chrome window and is grouped with the other chrome browser windows.

Expected Results:
*****************

Authy should start and appear in a group under its own icon, separate from other Chome browser windows.

Build Date & Platform:
**********************

Arch Linux
Plasma: 5.10.1/5.10.2
KDE Frameworks: 5.35.0
Unsure of exact build date

Additional Builds and Platforms: 
********************************

Downgraded plasma-desktop package to 5.9.5, every other package at the same version on Arch Linux and the bug is not present
Comment 1 Eike Hein 2017-06-17 01:15:26 UTC
Please supply xprop output for the windows involved as well as the names of the respective .desktop files and their contents.
Comment 2 Ross Williams 2017-06-18 23:49:17 UTC
(In reply to Eike Hein from comment #1)
> Please supply xprop output for the windows involved as well as the names of
> the respective .desktop files and their contents.

Authy:
******

xprop output:

_NET_WM_ICON_GEOMETRY(CARDINAL) = 3246, 264, 40, 45
_KDE_NET_WM_ACTIVITIES(STRING) = "00000000-0000-0000-0000-000000000000"
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_NET_WM_DESKTOP(CARDINAL) = 0
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
_NET_WM_USER_TIME(CARDINAL) = 98429502
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 1462, 320
                program specified minimum size: 350 by 590
                program specified maximum size: 700 by 700
WM_NAME(UTF8_STRING) = "Authy"
_NET_WM_NAME(UTF8_STRING) = "Authy"
XdndAware(ATOM) = BITMAP
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 98379769
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
_NET_WM_ICON(CARDINAL) =        Icon (32 x 32):
                    ░░▒▒▒▒░░            
                 ░▒▒▒▒▒▒▒▒▒▒▒▒░         
               ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░       
              ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░      
             ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒     
            ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒    
           ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░   
          ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░  
          ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒▒▒▒  
         ░▒▒▒▒▒▒▒▒▒░░▒▒▒▒▒▒  ░▒▒▒▒▒▒▒▒░ 
         ▒▒▒▒▒▒▒▒      ▒▒▒▒    ▒▒▒▒▒▒▒▒ 
        ░▒▒▒▒▒▒░        ░▒▒▒    ▒▒▒▒▒▒▒ 
        ░▒▒▒▒▒░   ░▒▒░   ░▒▒▒   ░▒▒▒▒▒▒░
        ▒▒▒▒▒▒   ▒▒▒▒▒▒   ░▒▒▒   ░▒▒▒▒▒░
        ▒▒▒▒▒▒  ░▒▒▒▒▒▒▒   ░▒▒▒   ▒▒▒▒▒▒
        ▒▒▒▒▒░  ▒▒▒▒░▒▒▒▒   ░▒▒░  ▒▒▒▒▒▒
        ▒▒▒▒▒░  ▒▒▒░  ▒▒▒▒  ▒▒▒▒  ░▒▒▒▒▒
        ▒▒▒▒▒▒  ░▒▒▒   ▒▒▒▒▒▒▒▒▒  ░▒▒▒▒▒
        ▒▒▒▒▒▒   ▒▒▒░   ▒▒▒▒▒▒▒░  ▒▒▒▒▒▒
        ░▒▒▒▒▒░   ▒▒▒░   ░▒▒▒▒░   ▒▒▒▒▒░
        ░▒▒▒▒▒▒░   ▒▒▒░    ░░    ▒▒▒▒▒▒ 
         ▒▒▒▒▒▒▒░   ▒▒▒▒        ▒▒▒▒▒▒▒ 
         ░▒▒▒▒▒▒▓░   ▒▒▒▒░    ░▒▒▒▒▒▒▒░ 
          ▒▒▒▒▒▒▒▒░  ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  
          ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░  
           ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒   
            ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒    
             ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒     
              ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒      
               ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░       
                 ░▒▒▒▒▒▒▒▒▒▒▒▒░         
                   ░░▒▒▒▒▒▒░░           


_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED(CARDINAL) = 1
WM_WINDOW_ROLE(STRING) = "app"
WM_CLASS(STRING) = "crx_gaedmjdfmmahhbjefcbgaolhhanlaolb", "Google-chrome"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 9726
WM_LOCALE_NAME(STRING) = "en_AU.UTF-8"
WM_CLIENT_MACHINE(STRING) = "CF3Q0G2"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING


chrome-gaedmjdfmmahhbjefcbgaolhhanlaolb-Default.desktop

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Authy
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=gaedmjdfmmahhbjefcbgaolhhanlaolb
Icon=chrome-gaedmjdfmmahhbjefcbgaolhhanlaolb-Default
StartupWMClass=crx_gaedmjdfmmahhbjefcbgaolhhanlaolb


Gmail:
******

xprop output:

_NET_WM_ICON_GEOMETRY(CARDINAL) = 3246, 264, 40, 45
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 0, 0, 29, 0
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 29, 0
_NET_WM_DESKTOP(CARDINAL) = 0
_KDE_NET_WM_ACTIVITIES(STRING) = "bc96b8af-c2e6-4d5e-9c86-2d31bc9740b6"
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
_NET_WM_USER_TIME(CARDINAL) = 101842239
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 0, 0
WM_NAME(UTF8_STRING) = "Inbox (1) - rwilliams@console.com.au - Console Australia Pty Ltd Mail"
_NET_WM_NAME(UTF8_STRING) = "Inbox (1) - rwilliams@console.com.au - Console Australia Pty Ltd Mail"
XdndAware(ATOM) = BITMAP
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 101842190
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x1, 0x0, 0x0
_NET_WM_ICON(CARDINAL) =        Icon (32 x 32):
                                        
                                        
                                        
                                        
                                        
           ░                        ░   
          ░░░                      ░▒░  
         ░░░▒▒░                  ░▒▒▒▒░ 
         ░░░▒▒▒░                ░▒▒▒▒▒░ 
         ░▒▒▒▒▒▒▒             ░▒▒▒▒▒▒▒░ 
         ░▒▒▒▒▒▒▒▒░          ░▒▒▒▒▒▒▒▒░ 
         ░▒▒░░▒▒▒▒▒▒        ▒▒▒▒▒▒░░▒▒░ 
         ░▒▒░ ░░▒▒▒▒▒░    ░▒▒▒▒▒░  ░▒▒░ 
         ░▒▒░   ░▒▒▒▒▒░  ▒▒▒▒▒▒░   ░▒▒░ 
         ░▒▒░    ░░▒▒▒▒▒▒▒▒▒▒░     ░▒▒░ 
         ░▒▒░      ░▒▒▒▒▒▒▒▒░      ░▒▒░ 
         ░▒▒░       ░░▒▒▒▒░░       ░▒▒░ 
         ░▒▒░         ░▒▒░         ░▒▒░ 
         ░▒▒░          ░░          ░▒▒░ 
         ░▒▒░                      ░▒▒░ 
         ░▒▒░                      ░▒▒░ 
         ░▒▒░                      ░▒▒░ 
         ░▒▒░                      ░▒▒░ 
         ░▒▒░                      ░▒▒░ 
         ░▒▒░                      ░▒▒░ 
          ▒▒░                      ░▒▒░ 
          ░░░                      ░░░  
                                        
                                        
                                        
                                        
                                        


WM_WINDOW_ROLE(STRING) = "pop-up"
WM_CLASS(STRING) = "crx_pjkljhegncpnkpknbcohdijeoejaedia", "Google-chrome"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 9726
WM_LOCALE_NAME(STRING) = "en_AU.UTF-8"
WM_CLIENT_MACHINE(STRING) = "CF3Q0G2"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING

chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default.desktop:

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=Gmail
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=pjkljhegncpnkpknbcohdijeoejaedia
Icon=chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default
StartupWMClass=crx_pjkljhegncpnkpknbcohdijeoejaedia


Please let me know if I can provide any more information that might be helpful.
Comment 3 Kai Uwe Broulik 2017-06-19 12:54:29 UTC
I cannot reproduce the issue. Neither in normal task manager nor in icon-tasks. Can you please paste your /etc/xdg/taskmanagerrulesrc

Also, how did you add the app to your machine? I went to Chrome Web Store with my "Default" Chrome profile, installed "Authy" from there and then launched it through Kickoff. Works just fine here.
Comment 4 Ross Williams 2017-06-20 02:53:18 UTC
(In reply to Kai Uwe Broulik from comment #3)
> I cannot reproduce the issue. Neither in normal task manager nor in
> icon-tasks. Can you please paste your /etc/xdg/taskmanagerrulesrc
> 
> Also, how did you add the app to your machine? I went to Chrome Web Store
> with my "Default" Chrome profile, installed "Authy" from there and then
> launched it through Kickoff. Works just fine here.

/etc/xdg/taskmanagerrulesrc:
****************************

[Mapping]
Gimp-2.8=GIMP
Google-chrome=Google Chrome
Google-chrome-stable=Google Chrome
Systemsettings=System Settings
oracle-ide-boot-Launcher=Oracle SQL Developer
Dragon=dragonplayer

[Settings]
ManualOnly=Wine
MatchCommandLineFirst=perl
TryIgnoreRuntimes=perl


I added the app the same way as you did via the Chrome Web Store. Interestingly this works for Chromium but not Chrome (from Google). I would just switch back to Chromium but casting my desktop only works for Chrome but not Chromium for some reason (I do this lots at work) and would rather not have to run two browsers.

In any case this does not change the fact that I can downgrade 5.9.5 on my Arch system and this works properly with Chrome so something has to have changed since that version.

Anything else I can do to try and debug this? I am a sysadmin but I am a bit of a noob when it comes to X related stuff outside of X conf and xrandr?
Comment 5 Kai Uwe Broulik 2017-06-21 09:14:28 UTC
Yes, we changed something in 5.10, massively simplifying the mapping logic. In 5.9.5 we used some crude regular expressions to map the WM_CLASS to a .desktop file. In 5.10 we use StartupWMClass which, as you can see, fits, I don't know why it doesn't work.

StartupWMClass=crx_pjkljhegncpnkpknbcohdijeoejaedia
WM_CLASS(STRING) = "crx_pjkljhegncpnkpknbcohdijeoejaedia", "Google-chrome"

We first try to apply the rules in taskmanagerrulesrc (which has none for Chrome in the file you posted, which is good) and after that the first thing we do is find a service with a mapping StartupWMClass.

Can you run `find /usr/share/applications/ -name *.desktop | xargs grep StartupWMClass` and see if there's any Chrome/Chromium-related output? Also try running the same on ~/.local/share/applications - we first try to match StartupWMClass to the app name before we go to the window class. Maybe there's a spurious chrome .desktop file and it picks that one then. I don't have one here, but who knows ;)
Comment 6 Ross Williams 2017-06-22 00:42:40 UTC
(In reply to Kai Uwe Broulik from comment #5)

Thanks for the info. That approach sounds like a better solution to the regex based approach. As you say the StartupWMClass and WM_CLASS are a match so it should be working:

StartupWMClass=crx_gaedmjdfmmahhbjefcbgaolhhanlaolb
WM_CLASS(STRING) = "crx_gaedmjdfmmahhbjefcbgaolhhanlaolb", "Google-chrome"

One more observation for you: the correct icon shows during launch then switches to being grouped under the chrome icon. Not sure if that indicates anything?

I ran the searches that you suggested and nothing appeared out of place. I have pasted the output below:

find /usr/share/applications/ -name *.desktop | xargs grep StartupWMClass

/usr/share/applications/libreoffice-draw.desktop:StartupWMClass=libreoffice-draw
/usr/share/applications/libreoffice-startcenter.desktop:StartupWMClass=libreoffice-startcenter
/usr/share/applications/libreoffice-base.desktop:StartupWMClass=libreoffice-base
/usr/share/applications/libreoffice-impress.desktop:StartupWMClass=libreoffice-impress
/usr/share/applications/libreoffice-writer.desktop:StartupWMClass=libreoffice-writer
/usr/share/applications/libreoffice-math.desktop:StartupWMClass=libreoffice-math
/usr/share/applications/google-chrome.desktop:StartupWMClass=Google-chrome
/usr/share/applications/google-chrome.desktop:StartupWMClass=Google-chrome
/usr/share/applications/google-chrome.desktop:StartupWMClass=Google-chrome
/usr/share/applications/sublime_text_3.desktop:StartupWMClass=subl3
/usr/share/applications/Discord.desktop:StartupWMClass=discord
/usr/share/applications/libreoffice-calc.desktop:StartupWMClass=libreoffice-calc

find ~/.local/share/applications -name *.desktop | xargs grep StartupWMClass 

/home/rwilliams/.local/share/applications/chrome-apdfllckaahabafndbhieahigkjlhalf-Default.desktop:StartupWMClass=crx_apdfllckaahabafndbhieahigkjlhalf
/home/rwilliams/.local/share/applications/chrome-fhbjgbiflinjbdggehcddcbncdddomop-Default.desktop:StartupWMClass=crx_fhbjgbiflinjbdggehcddcbncdddomop
/home/rwilliams/.local/share/applications/chrome-blpcfgokakmgnkcojhhkbfbldkacnbeo-Default.desktop:StartupWMClass=crx_blpcfgokakmgnkcojhhkbfbldkacnbeo
/home/rwilliams/.local/share/applications/chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default.desktop:StartupWMClass=crx_pjkljhegncpnkpknbcohdijeoejaedia
/home/rwilliams/.local/share/applications/chrome-gaedmjdfmmahhbjefcbgaolhhanlaolb-Default.desktop:StartupWMClass=crx_gaedmjdfmmahhbjefcbgaolhhanlaolb
/home/rwilliams/.local/share/applications/chrome-aohghmighlieiainnegkcijnfilokake-Default.desktop:StartupWMClass=crx_aohghmighlieiainnegkcijnfilokake

I also tried clearing the ~/.local/share/applications directory of .desktop files, deleted my Chrome profile and reinstalled Chrome just to get a fresh environment and I am still suffering the issue on a fresh profile (not logged in).

I'm going to have a look at the code myself when I get some time (use the ABS in Arch to build my own copy of plasma-workspace) but I have one question from a cursory glance at the code so far:

In terms of these two if blocks:

if (services.empty()) {
    services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ StartupWMClass)").arg(appId));
}

if (services.empty()) {
    services = KServiceTypeTrader::self()->query(QStringLiteral("Application"), QStringLiteral("exist Exec and ('%1' =~ StartupWMClass)").arg(xWindowsWMClassName));
}

I assume xWindowsWMClassName maps to WM_CLASS but what does appId refer to?

Thanks your help. I understand it is hell trying to debug something you can't reproduce :(
Comment 7 Christoph Feck 2017-06-28 20:45:00 UTC
From the comments it is not clear if more information is needed to understand the issue.
Comment 8 Christoph Feck 2017-07-17 16:40:41 UTC
Changing status, see comment #7.
Comment 9 Eike Hein 2017-10-24 06:59:02 UTC
Kai, ping?
Comment 10 Nate Graham 2017-12-14 00:51:05 UTC
Kai-ping! That sounds like it should be a delicious Chinese food dish. Mmmmm.
Comment 11 Eike Hein 2017-12-14 07:52:33 UTC
凯评 = Kǎi píng = Triumphant comment
Comment 12 Kai Uwe Broulik 2017-12-22 14:25:07 UTC
I never know which of the two is which but:

"crx_gaedmjdfmmahhbjefcbgaolhhanlaolb", "Google-chrome"

We end up matching google-chrome (appId) first, perhaps we should check for the (xWindowsWMClassName) first?
Comment 13 Julien HENRY 2019-12-19 17:18:29 UTC
I'm having the same problem with Slack and Chromium icons being merged in the task bar (and having the Slack icon).

Chromium installed from Fedora RPM Fusion:

> xprop | grep WM_CLASS
WM_CLASS(STRING) = "Slack", "Slack"

Slack installed from Slack website:

> xprop | grep WM_CLASS
WM_CLASS(STRING) = "slack", "Slack"

(note the case difference)

.desktop are both in /usr/share/applications/


> cat /usr/share/applications/chromium-browser.desktop | grep StartupWMClass
StartupWMClass=Chromium-browser
> cat /usr/share/applications/slack.desktop | grep StartupWMClass
StartupWMClass=Slack
Comment 14 Andrea E. Monti 2021-02-14 01:12:01 UTC
KDE Plasma 5.20.5 bug still here. I am on Manjaro, latest update.
Chrome apps show up in taskbar with chrome icon (thus group with browser one).

I found this reddit post with some tries of workaround, but with no luck
https://www.reddit.com/r/kde/comments/e3cmpn/chrome_apps_combining_under_chrome_icon_in/

A fix in the source would be great, but a workaround by manually tweaking something is also appreciated.

If needed to reproduce, you an find here the output of xprop and the .desktop file of youtube music chrome app.



xprop                                                                                          
_NET_WM_ICON_GEOMETRY(CARDINAL) = 2, 110, 40, 38
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_NET_WM_DESKTOP(CARDINAL) = 0
_KDE_NET_WM_ACTIVITIES(STRING) = "3392d53d-1c2e-4110-98a6-6775102db07a"
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_STATE(ATOM) = 
_NET_WM_USER_TIME(CARDINAL) = 5150195
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                program specified location: 44, 0
                program specified minimum size: 228 by 33
WM_NAME(UTF8_STRING) = "YouTube Music"
_NET_WM_NAME(UTF8_STRING) = "YouTube Music"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x2, 0x0, 0x0, 0x0, 0x0
XdndAware(ATOM) = BITMAP
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 5150160
_NET_WM_ICON(CARDINAL) =        Icon (32 x 32):
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       

        Icon (32 x 32):
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       
        ████████████████████████████████████████████████████████████████                                       


_NET_WM_BYPASS_COMPOSITOR(CARDINAL) = 2
_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED(CARDINAL) = 1
WM_WINDOW_ROLE(STRING) = "pop-up"
WM_CLASS(STRING) = "crx_cinhimbnkkaeohfgghhklpknlkffjgod", "Google-chrome"
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_PID(CARDINAL) = 1859
WM_CLIENT_MACHINE(STRING) = "acerPC"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, _NET_WM_PING, _NET_WM_SYNC_REQUEST


and 


cat .local/share/applications/chrome-cinhimbnkkaeohfgghhklpknlkffjgod-Default.desktop           ✔ 
[Desktop Entry]
Exec=/opt/google/chrome/google-chrome --profile-directory=Default --app-id=cinhimbnkkaeohfgghhklpknlkffjgod
GenericName=
Icon=chrome-cinhimbnkkaeohfgghhklpknlkffjgod-Default
Name=YouTube Music
NoDisplay=false
Path[$e]=
StartupNotify=true
StartupWMClass=crx_cinhimbnkkaeohfgghhklpknlkffjgod
Terminal=0
TerminalOptions=
Type=Application
Version=1.0
X-KDE-SubstituteUID=false
X-KDE-Username=
Comment 15 Andrei 2021-03-06 00:51:35 UTC
I think I have a [decent workaround](https://shevchuk.co/notes/2021/03/06/chromium-web-apps-on-kde-plasma). The problem is that task bar seems to ignore instance name when making grouping decision. It also does not update grouping even if you update window class manually. As a workaround, we have  to hide window from the task bar, then change its class and bring it back. But if we bring it back too quickly, taskbar still won't update grouping despite the new class, so we have to add some delay before bringing window back. So here is a script I use:

```sh
#! /usr/bin/env sh

TIMEOUT=10 # seconds
T0=$(date +%s)

if [ $# -ne 2 ] ; then
  echo "Usage: `basename $0`" '"class search regex" "new class"'
  exit 1
fi

while [ $(( `date +%s` - T0 )) -lt $TIMEOUT ]; do
  w=$(wmctrl -l -x | awk -v e="$1" '$3 ~ e { print $1 }' 2>/dev/null | head -n 1)
  if [ -n "$w" ]; then
    wmctrl -i -r $w -b add,skip_taskbar
    xdotool set_window --class "$2" --classname "$2" $w
    sleep 1
    wmctrl -i -r $w -b remove,skip_taskbar
    break
  fi
done
```

Basically, we search for our window by class using regex, then hide it, change its class and bring it back. All in a loop with a timeout, so we don't search forever.

Save it somewhere in your `$PATH`, e.g. `~/.local/bin/change-window-class`

You can use it like this: `change-window-class "^class-regex-to-search-for" "new-class"`

With Chromium web app:  
`chromium --profile-directory="App - Google" --app=https://calendar.google.com & change-window-class "^calendar.google.com" "web-app-google-calendar"`
Comment 16 Mitchell Krog 2021-04-15 09:26:52 UTC
I tried this for Youtube Music Andrei but its still being grouped with Chrome
`
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=YouTube Music
#Exec=/opt/google/chrome/google-chrome "--profile-directory=Profile 1" --app-id=cinhimbnkkaeohfgghhklpknlkffjgod
Exec=chromium --profile-directory="Youtube Music" --app=https://music.youtube.com & change-window-class "^music.youtube.com" "web-app-youtube-music"
#Icon=chrome-cinhimbnkkaeohfgghhklpknlkffjgod-Profile_1
#StartupWMClass=crx_cinhimbnkkaeohfgghhklpknlkffjgod

`
Comment 17 Nate Graham 2022-02-22 19:49:45 UTC
*** Bug 450703 has been marked as a duplicate of this bug. ***
Comment 18 Andrea E. Monti 2022-04-25 11:28:44 UTC
At least it seems that this problem has been solved on wayland recently, by a single line commit 
https://bugs.kde.org/show_bug.cgi?id=358277

Is there a way to apply a similar patch to X11?
Comment 19 Andrei 2023-02-14 03:08:23 UTC
I've updated my post on this above.
TLDR: no scripts needed, just use separate ----class and --user-data-dir for separate apps. E.g.:
`chromium --app=https://example.com --class=webapp-one --user-data-dir=/tmp/webapp-one`
and
`chromium --app=https://example.com --class=webapp-two --user-data-dir=/tmp/webapp-two`
— these won't be grouped.

At least this works for me for quite some time.

Example .desktop file:
```
[Desktop Entry]
Name=Gmail
Exec=chromium --app=https://gmail.com --class=webapp-gmail --user-data-dir=/home/x/.local/share/webapps/gmail
Icon=/home/x/Pictures/Icons/Gmail.png
Type=Application
```
Comment 20 Nate Graham 2023-02-14 17:40:03 UTC

*** This bug has been marked as a duplicate of bug 358277 ***