How to Verify if Firefox is Running on Wayland in Linux
This article provides a quick and straightforward guide on how to
check whether your Firefox web browser is running natively under the
Wayland display protocol or falling back to the XWayland compatibility
layer on Linux. You will learn how to verify the active display protocol
using Firefox's built-in troubleshooting information page, as well as
how to confirm this externally using standard Linux command-line tools
like xlsclients and xeyes.
Method 1: Check Firefox Troubleshooting Information
The most reliable and direct way to check the display protocol is through Firefox itself.
- Open the Firefox web browser.
- Type
about:supportinto the address bar and press Enter. - Use the find function (Ctrl + F) and search for Window Protocol.
- Look at the value next to the Window Protocol
entry:
- wayland: Firefox is running natively on Wayland.
- xwayland: Firefox is running as an X11 application via the XWayland compatibility layer.
- x11: You are running a standard Xorg session, not a Wayland session.
Method 2: Use the
xlsclients Command
You can also verify the protocol from the Linux terminal by listing all active X11 applications. Since XWayland acts as an X11 server within Wayland, only XWayland apps will show up in this list.
Open your Firefox browser so that it is actively running.
Open your terminal application.
Run the following command:
xlsclients(Note: If the command is not found, you may need to install the
xorg-xlsclientsorx11-utilspackage depending on your distribution).Review the output:
- If firefox appears in the output list, it is running under XWayland.
- If firefox is missing from the list, it is running natively under Wayland.
Method 3: Use the
xeyes Utility
xeyes is a classic visual X11 program where a pair of
eyes follows your mouse cursor. Because of Wayland's strict security
model, xeyes can only track your cursor when it hovers over
XWayland windows.
- Open Firefox.
- Open your terminal, type
xeyes, and press Enter. - Move your mouse cursor directly over the Firefox window.
- Observe the eyes:
- The eyes stop moving: Firefox is running natively on Wayland.
- The eyes follow the cursor: Firefox is running on XWayland.
How to Force Native Wayland Mode
Starting with Firefox version 121, the browser defaults to using native Wayland automatically when a Wayland session is detected. If you are using an older version or your distribution has overridden this setting, you can force native Wayland mode manually.
Close all running instances of Firefox.
Open your terminal and launch Firefox with the following environment variable:
MOZ_ENABLE_WAYLAND=1 firefoxVerify the change using Method 1 (
about:support).To make this permanent, add
export MOZ_ENABLE_WAYLAND=1to your~/.profileor~/.bash_profilefile, then log out and log back into your Linux session.