On Debian (As of 2018-05-11, Firefox 60/52ESR, Debian sid):
Add a line to .xsessionrc
:
export MOZ_USE_XINPUT2=1
Graphical logins do not read a shell's startup files (/etc/profile and ~/.profile and so on) by default,
https://wiki.archlinux.org/index.php/Firefox/Tweaks#Enable_touchscreen_gestures https://wiki.debian.org/EnvironmentVariables