*** This bug is a duplicate of bug 1732482 ***
    https://bugs.launchpad.net/bugs/1732482

I'm posting what I've learned so far but there is still much to figure.

> In the comment #5 you mention window classes as a way to do this feat.
The desktop file seems like a possible way to launch Chromium with a
specific window class which makes it a separate application. Is this a
correct deduction?

I messed up when transcribing the output for comment #5. I'm editing it
to fix it. Bottom line is: The classes are the same in Bionic/deb as
well (as the attached image shows), nonetheless the PWA does fall into a
different tab group.

Still in Bionic/deb, if I change StartupWMClass (regardless of matching
--app-id) in the desktop file though, then the unwanted behavior (PWA
grouped under Chromium) is observed if the application is opened from
inside Chromium, whereas trying the launcher itself fails to open the
PWA and only opens normal Chromium. So it just knows and needs to be
launched with the registered app-id, and Gnome Shell will expect that as
its class.

Back to the snap world, same observations apply, except that snap cannot
write to the a canonical XDG_DATA_DIR ($HOME/.local/share/applications)
and thus Gnome Shell is oblivious.

But if I try

  cp ~/snap/chromium/current/*/*.desktop ~/.local/share/applications

then I **can open the PWA from the dock and it behaves as a separate
application indeed**, but not if opened from inside Chromium, and their
classes do diverge in the success case:

--->
$ wmctrl -lx #Opened from dock item, different classes
0x01a00020  0 xterm.XTerm           canonical xterm
0x01c00003  0 chromium.Chromium     canonical Neuer Tab - Chromium
0x02800003  0 crx_mdpkiolbdkhdjpekfbkbmhigcaggjagi.Chromium-browser  canonical 
Google Chat - Chat
$ wmctrl -lx #Opened from inside Chromium, same classes
0x01a00020  0 xterm.XTerm           canonical xterm
0x01c00003  0 chromium.Chromium     canonical Neuer Tab - Chromium
0x01c00015  0 crx_mdpkiolbdkhdjpekfbkbmhigcaggjagi.Chromium  canonical Google 
Chat - Chat
<---

Also, as noted elsewhere, the path to the executable registered in the
desktop file points unfortunately to the unsandboxed binary, namely
/snap/chromium/2497/usr/lib/chromium-browser/chrome.

** Attachment added: "PWA from Chromium deb in Bionic"
   
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2007652/+attachment/5682104/+files/qemu-bionic.png

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to chromium-browser in Ubuntu.
https://bugs.launchpad.net/bugs/2007652

Title:
  [snap] PWA don't launch as applications, just another chromium window

Status in chromium-browser package in Ubuntu:
  Confirmed

Bug description:
  I have recently converted from deb to snap package of chromium and
  progressive web applications (PWAs) launch just as another window of
  chromium and are not recognized as separate application by the window
  manager (for example when switching using Super+Tab) or dock (grouped
  under chromium windows).

  This is either a regression of the snap package vs deb or ubuntu 20.04
  vs ubuntu 18.04 (I am not able to differentiate between these two
  since both happened together).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2007652/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to