Open source, business, marketing, community
How to add Wayland support to Firefox snap in Ubuntu 22.04LTS (and more)

How to add Wayland support to Firefox snap in Ubuntu 22.04LTS (and more)

I spent a few hours ranting on twitter and searching furiously how to get Firefox to run in Wayland like it’s actually 2022, and like it used to run in Ubuntu 21.10! I hate it when features are removed!

So, I discovered that Mozilla told Canonical that they were ready to ship Firefox in snap package… but they weren’t and they still aren’t able to test the snap package with Wayland. What makes you think you’re ready to ship something if your CI is not ready? Anyway… And don’t tell me “it works with XWayland” because that was already annoying in 2019. Support for multiple displays each with different scaling has been a thing for a long time.

I had to learn a bit about these snap packages, something I have found absolutely no need for. There was nothing wrong in the APT package, if you ask me. Anyway, the solution is to create a new .desktop alias in ~/.local/share/applications/. Copy it from /var/lib/snapd/desktop/applications and modify the line starting with Exec=

Exec=env MOZ_ENABLE_WAYLAND=1 BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox %u

Thanks to this post on the snapcraft forum that put me on the right path to restored sanity.

As I was searching around, I found out also how to enable Wayland on Element:

element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland

And for Chromium, it’s a matter of changing the “Preferred Ozone platform” (I have no idea what that is, no interest in finding out either… it works) Just change the flag chrome://flags/#ozone-platform-hint as instructed by Phoronix.

 

Leave a Reply

Your email address will not be published. Required fields are marked *