How to enable touch-scrolling in Firefox
If you're experiencing issues with your touchpad or mouse while using Mozilla Firefox on Ubuntu, a simple system tweak can help resolve the problem. XInput2 is an extension to the X.Org Server that improves input device management, such as keyboards and mice. Enabling XInput2 can lead to a smoother browsing experience. Follow these simple steps to enable it.
Step-by-Step Guide
Edit the pam_env.conf
file
Open your terminal and use your preferred text editor to edit the pam_env.conf
configuration file. Run the following command:
sudo vim /etc/security/pam_env.conf
Add the configuration line
In the pam_env.conf
file, add the following line at the end:
MOZ_USE_XINPUT2 DEFAULT=1
This line enables XInput2 for Mozilla Firefox. By doing this, you'll ensure that Firefox uses XInput2 to manage input devices, improving the behavior of your touchpad and mouse.
Save and exit
After adding the line, save and exit the file.
Log out and log back in
For the changes to take effect, log out of your current session and log back in. This will reload the system settings and apply the modification to your configuration file.
Conclusion
With these simple steps, you can enhance your browsing experience in Mozilla Firefox on Ubuntu, especially if you're using a touchpad or mouse. XInput2 provides better input device management and can fix issues like erratic cursor movement.
For more details on this procedure, you can visit the original AskUbuntu post here.