#982877 firefox-esr: please provide an official way to run using wayland

Package:
firefox-esr
Source:
firefox-esr
Description:
Mozilla Firefox web browser - Extended Support Release (ESR)
Submitter:
Andres Salomon
Date:
2021-05-06 20:27:09 UTC
Severity:
wishlist
#982877#5
Date:
2021-02-15 19:32:53 UTC
From:
To:
In a wayland environment, by default firefox will run as an X
application using Xwayland. This can be changed with 'export
MOZ_ENABLE_WAYLAND=1' before calling firefox-esr, but that isn't
integrated into a desktop environment. It would be good to get it
integrated.

One possible way to do this is based on what Fedora does: create
a firefox-wayland package that depends on firefox-esr, and just
contains the script /usr/bin/firefox-wayland with:

#!/usr/bin/bash
#
# Run Firefox under Wayland
#

export MOZ_ENABLE_WAYLAND=1
exec /usr/bin/firefox "$@"



I'm actually not a fan of this, as there's already enough permutations
of firefox binaries and packages between firefox and firefox-esr, and
adding more with firefox-*wayland would get annoying.

Another option (and the one that I think I'd prefer) is to just include
firefox-wayland.desktop and firefox-esr-wayland.desktop files in the
firefox and firefox-esr packages. That would just set the variable and
then run whatever version of firefox the package has installed.

A 3rd option is to set the variable through systemd, apparently:

https://wiki.archlinux.org/index.php/Environment_variables#Graphical_environment

I haven't tried it, and I don't think I'd want the user forced to fight
environment variables if they want to go back to firefox using X, so
I'm not a fan of that method.

#982877#10
Date:
2021-05-06 20:22:51 UTC
From:
To:
On Mon, 15 Feb 2021 14:32:53 -0500 Andres Salomon <dilinger@queued.net>  wrote:

 > In a wayland environment, by default firefox will run as an X
 > application using Xwayland. This can be changed with 'export
 > MOZ_ENABLE_WAYLAND=1' before calling firefox-esr, but that isn't
 > integrated into a desktop environment. It would be good to get it
 > integrated.


Thanks for the hint. I added "export MOZ_ENABLE_WAYLAND=1" to my
~/.profile file, restarted the session, and now Firefox and Thunderbird
run on Wayland by default (they respect the fractional scaling so that's
how I know they run on Wayland).