I tested again, and while I can confirm that the chromium snap cannot be
pinned to the favorite apps in a Fedora 29 VM without the
"StartupWMClass=chromium" line in its desktop file, Ubuntu doesn't seem
to be affected. I tested bionic and eoan, in the alternative gnome-
session, which has defaults similar to Fedora.
I dug a bit in gnome-shell's code to try and understand why it's needed
in Fedora and not in Ubuntu in the first place.
In get_app_from_window_wmclass():
/* first try a match from WM_CLASS (instance part) to StartupWMClass */
/* then try a match from WM_CLASS to StartupWMClass */
/* then try a match from WM_CLASS (instance part) to .desktop */
/* finally, try a match from WM_CLASS to .desktop */
The first two attempts will fail when there's no StartupWMClass.
The last two attempts would try to match, respectively, "chromium" (instance)
and "Chromium" (class name) to a desktop file name. I'm not sure by which magic
that would match against "chromium_chromium.desktop" (which is the name of the
desktop file installed by the snap).
In this light, adding StartupWMClass to the desktop file looks correct,
and won't hurt the existing matching logic on desktops where it already
works.
** Changed in: chromium-browser (Ubuntu)
Assignee: (unassigned) => Olivier Tilloy (osomon)
** Changed in: chromium-browser (Ubuntu)
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1750243
Title:
[snap] StartupWMClass missing in .desktop file
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1750243/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs