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.

  1. Open the Firefox web browser.
  2. Type about:support into the address bar and press Enter.
  3. Use the find function (Ctrl + F) and search for Window Protocol.
  4. 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.

  1. Open your Firefox browser so that it is actively running.

  2. Open your terminal application.

  3. Run the following command:

    xlsclients

    (Note: If the command is not found, you may need to install the xorg-xlsclients or x11-utils package depending on your distribution).

  4. 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.

  1. Open Firefox.
  2. Open your terminal, type xeyes, and press Enter.
  3. Move your mouse cursor directly over the Firefox window.
  4. 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.

  1. Close all running instances of Firefox.

  2. Open your terminal and launch Firefox with the following environment variable:

    MOZ_ENABLE_WAYLAND=1 firefox
  3. Verify the change using Method 1 (about:support).

  4. To make this permanent, add export MOZ_ENABLE_WAYLAND=1 to your ~/.profile or ~/.bash_profile file, then log out and log back into your Linux session.