Forum Discussion
How to set the ozone platform hint flag
So, you can set these flags without needing to edit desktop files if you create the file "~/.config/microsoft-edge-[stable/beta]-flags.conf" or something similar. You may need to name the file in accordance with the program name (the one you could type in the terminal to launch Edge).
So for example for me on Arch Linux I have "~/.config/microsoft-edge-stable-flags.conf".
You might have "~/.config/microsoft-edge-beta-flags.conf". Or maybe just "microsoft-edge-flags.conf" I'm not quite sure what all the possibilities are.
In my microsoft-edge-stable-flags.conf I have:
--password-store=gnome-libsecret
--ozone-platform-hint=wayland
--gtk-version=4
--ignore-gpu-blocklist
The important part is the ozone-platform-hint line, the rest is stuff you may or may not need. I would begin with:
--ozone-platform-hint=wayland
And you probably don't need any more than this.
HOWEVER
I've noticed these flags don't seem to apply to any progressive web apps (PWAs) that have been installed, so in this case to prevent PWAs from running in XWayland I had to edit their desktop files (msedge-.....[loads of stuff].desktop) and add "--ozone-platform=wayland" to the Exec line in those.
I haven't found a fix for this, and it's quite annoying because the PWA desktop files seem to get overwritten periodically.