Linux Firefox touchscreen support

By | November 23, 2025

I updated my laptop to Ubuntu 25.10 which no longer has Xorg. Since I am not a fan of Wayland due to issues with some applications I use have with Wayland, I decided to install the Mate desktop environment which has Xorg support. I then noticed that Firefox does not work well with touchscreens (No pinch and zoom and scrolling) unless you make a couple of adjustments. Below is what worked for me to resolve this issue.

Open Firefox and go to about:config. Search for dom.w3c_touch_events.enabled. Set the value to 1.

Now open the file /etc/security/pam_env.conf and add this line to the bottom of the file:
MOZ_USE_XINPUT2 DEFAULT=1
Save the file. Then reboot your computer. Touchscreen support such as pinch and zoom should now work just fine.