Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installed webapps don't associate with their launcher on Wayland Ozone platform #216

Open
wjt opened this issue Mar 31, 2022 · 13 comments
Open

Comments

@wjt
Copy link
Member

wjt commented Mar 31, 2022

I learned that since Chromium 100, there is a "Preferred Ozone platform" setting in chrome://flags. If you set it to "Auto" (the default is "Default") then Wayland is used if available. It works quite nicely but something is awry with installed web apps.

  1. Browse to https://www.nytimes.com/games/wordle/
  2. Hit ⋮ → More tools → Create shortcut…
  3. In the “Create shortcut?” dialog, tick “☑ Open as window” and press OK
  4. Close the resulting window
  5. From GNOME's app grid, launch Wordle
  6. Hold Alt and press Tab, or check the running apps on the dash

With non-Flatpak:ed Google Chrome, Wordle appears with its own app icon in Alt+Tab and the dash. With Flatpak:ed Chromium, it is grouped together with my other Chromium windows.

@wjt wjt changed the title Installed webapps don't associate with their launcher Installed webapps don't associate with their launcher on Wayland Ozone platform Mar 31, 2022
@wjt
Copy link
Member Author

wjt commented Mar 31, 2022

Please forgive this being in screenshot form but I can't copy-paste from GNOME Shell's lg console.

Capture d’écran de 2022-03-31 15-37-12

r(4) is the Wordle window when Chromium is set to be a Wayland app.
r(8) is the Wordle window when Chromium is set to be an X11 app.

@wjt
Copy link
Member Author

wjt commented Mar 31, 2022

IIRC Mutter or Shell has some crazy heuristics for Chromium's WMClass in particular

@refi64
Copy link
Collaborator

refi64 commented Apr 7, 2022

This might be an upstream bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1164782#c6

@christianfosli
Copy link

This might be an upstream bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1164782#c6

I wrote that comment, it was running flatpak chromium though. I never tried non-flatpaked chromium as I assumed the results would be the same.

@zocker-160
Copy link

zocker-160 commented Apr 21, 2022

I have this same issue on Kubuntu on X11. It only happens when using the Chromium Flatpak.

Interestingly enough this problem does not happen with the Google Chrome Flatpak, where they fixed it some time ago
see: flathub/com.google.Chrome#39

@teohhanhui
Copy link

teohhanhui commented Sep 12, 2022

fwiw I'm using com.google.Chrome and am facing the same issue when running with --gtk-version=4 --ozone-platform-hint=auto (on Wayland). When running under XWayland it's fine.

@adombeck
Copy link

adombeck commented Dec 4, 2022

Same issue here when running Chromium or Chrome on Wayland via Flatpak. No issue when running Chromium without Flatpak.

@sepehr
Copy link

sepehr commented Dec 27, 2022

Experiencing same as @adombeck.

@ljrk0
Copy link

ljrk0 commented Mar 15, 2023

Having the same issue and solved it by editing the .desktop file similar as described here: https://forum.manjaro.org/t/web-apps-no-longer-have-an-icon/104534

For any application with hash $hash which opens to website https://$domain/$path on launch, the .desktop's Exec and StartupWMClass fields should look like:

Exec=flatpak 'run' '--command=/app/bin/chromium' 'org.chromium.Chromium' '--profile-directory=Default' '--app-id=$hash' '--app=$url'
StartupWMClass=chrome-$domain__$xpath-Default

where $xpath is the $path with all slashes / replaced by underscores _.

@chsjr1996
Copy link

Following the example of @ljrk0 I made this modification:

Before

StartupWMClass=crx_bdemgigmjhobefogpblhomeihekoaajf

After

StartupWMClass=chrome-bdemgigmjhobefogpblhomeihekoaajf-Profile_1

The changes includes replace crx_ to chrome- at the beginning and append the current Profile ID, in my case -Profile_1 (but this can be -Default in another Chromium profile).

@KibSquib48
Copy link

Sorry to bump but has there been any progress made on this anywhere?

@Malix-Labs
Copy link

Bump again

@benyaminl
Copy link

@KibSquib48 and @Malix-Labs you need to edit .desktop based on @chsjr1996 change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests