Ubuntu 16 and touchscreen scrolling in FireFox
Solution 1:
This worked for me (firefox 57.0.4, Arch Linux):
open
about:config
in firefox to setdom.w3c_touch_events.enabled=1
(default is 2).edit
/etc/security/pam_env.conf
and addMOZ_USE_XINPUT2 DEFAULT=1
reboot and restart firefox
(see also How can I get Firefox to recognize multitouch gestures on a touch screen? )
Solution 2:
Found this solution elsewhere: if I start firefox from the command line with
env MOZ_USE_XINPUT2=1 firefox
then touchscreen scrolling works for me. To avoid having to start firefox from the command line, you can edit the Unity app launcher exec code to include this. Default .desktop
resides in /usr/share/applications
but we'll copy it over to our home folder so that the changes we make are immune to be overriden by the package manager on update.
cp /usr/share/applications/firefox.desktop ~/.local/share/applications/
gedit ~/.local/share/applications/firefox.desktop
find the Exec
line in the [Desktop Entry]
section and change it to
Exec=env MOZ_USE_XINPUT2=1 firefox %u
Change the other exec lines too, if you feel like it. Those affect the options in the right-click menu.
EDIT:
At some point this stopped working (I think because of an extension I installed). To fix it, I had to go to about:config
in the browser, right-click, add a new boolean browser.tabs.remote.force-enable
set to true. Warning: this is not recommended and could break stuff.
Solution 3:
I found a browser plugin called Grab and Drag which adds this functionality to FireFox.