Using Firefox quantum 57 and Ubuntu 17.10, I am unable to scroll a web page by touching the screen and sliding the page. However this works in Chrome browser.

How to make touch-screen scrolling work in Firefox Quantum?


1 Answer 1


The same solution for Firefox 50 and Ubuntu 16.xx still works for Firefox Quantum 57 and Ubuntu 17.10: Ubuntu 16 and touchscreen scrolling in FireFox

The solution is to launch firefox using:

env MOZ_USE_XINPUT2=1 firefox

You can make this permanent by modifying the launcher using the following:

sudo sed -i "s|Exec=|Exec=env MOZ_USE_XINPUT2=1 |g" /usr/share/applications/firefox.desktop

To undo this change, use:

sudo sed -i "s|Exec=env MOZ_USE_XINPUT2=1 |Exec=|g" /usr/share/applications/firefox.desktop

EDIT: Per @poomerang's comment below, if you are using the Snap version of Firefox, the path in the above commands should be /var/lib/snapd/desktop/applications/firefox_firefox.desktop

Comparing touch scrolling in Firefox Quantum, using this solution. with touch scrolling in Chrome:

  • Scrolling is one finger only; two finger scrolling causes the web page to zoom. This is different from Chrome, where you can scroll using two fingers, but still pinch to zoom or un-zoom.
  • You can only scroll vertically or horizontally, depending on which direction your initial motion is in; this is different from Chrome, where you can scroll horizontally or vertically (or in circles) without lifting your finger(s).
  • YOU ARE A GOD PJ!!! I've been searching for how to do that for 2 months now and using half baked extensions for touch dragging that really didn't work that well. Funny thing is that I came across this answer while searching for something completely different... Thanks! Commented Jan 22, 2018 at 22:45
  • After a bit of testing, it seems to be too unstable to be usable, probably why it's still off by default. It works great at first but as soon as you long click to select text, it makes a context menu popup and things turn really buggy after that. Ah well. Probably a work in progress. Commented Jan 22, 2018 at 23:25
  • @thebunnyrules I think I'm having the same problem as you, check out bugzilla.mozilla.org/show_bug.cgi?id=1451587 if you have the chance. Commented Apr 5, 2018 at 1:12
  • 1
    Ok so, when you extract the source, find: <mozsource>/gfx/thebes/gfxPrefs.h . Open that file and look for ui.click_hold_context_menus.delay ( the full line is DECL_GFX_PREF(Live, "ui.click_hold_context_menus.delay", UiClickHoldContextMenusDelay, int32_t, 500); ) You want to change that 500 at the very end to 9999 (that's 500ms of delay to 10 second). That's it. You won't have a context menu anymore but at least touch will be stable in X11. Once you get touch working, I'd really recommend the Tablet Gestures addon, it puts ff on parity with chrome for touch at that point. Commented Apr 22, 2018 at 3:28
  • 1
    This still works for Ubuntu 22.04, BUT: the file to modify is no longer /usr/share/applications/firefox.desktop (doesn't do anything), but /var/lib/snapd/desktop/applications/firefox_firefox.desktop . Apparently
    – poomerang
    Commented Dec 26, 2022 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .