5 ms·
I am currently trying Ubuntu for the first time in a long while and it comes with Firefox as the default browser. My problem is that Firefox has a "snapping" s
by JonathanBeuys 5y ago
I am currently trying Ubuntu for the first time in a long while and it comes with Firefox as the default browser.
My problem is that Firefox has a "snapping" scroll behavior that I find very annoying. When I move my fingers on the touchpad of my laptop, that does not immediately move the page. Instead, it waits until I moved a certain distance and then moves in one big swoosh.
Starting Firefox from the command line like this solves it:
MOZ_USE_XINPUT2=1 firefox
Is there a way to make this permanent or accomplish the same via a setting in about:config?
- makeworld 5y agoYou can make it "permanent" by editing the .desktop file your Firefox is launching from when you click it in Ubuntu. You can change the Exec= line to be Exec=MOZ_USE_XINPUT2=1 firefox, or maybe Exec=env MOZ_USE_XINPUT2=1 firefox
- JonathanBeuys 5y agoThanks, the "env" version works! Although the scroll is more fine grained now, it looks kinda wobbly. Almost as if there is a raster interrupt at play, lol. As if the screen gets repainted mid scroll and then needs another round until the whole screen is updated.
- chmod775 5y agoYou can put export MOZ_USE_XINPUT2=1 into your ~/.bash_profile or ~/.bashrc (edit: or just ~/.profile under ubuntu). You'll have to logout/login to "apply" that. Alternatively you can edit the .desktop file of Firefox, but that might not catch all the ways in which firefox may be launched.
- JonathanBeuys 5y agoHmm.. I tried to execute "export MOZ_USE_XINPUT2=1" in the terminal and then start FF from the GUI and it did not have an impact. So I guess it would also not work in .bashrc. But not sure.
- chmod775 5y agoNo that's not how that works. Environment variables are inherited from parent processes. If you just put that in a sibling process (like a terminal), it won't run firefox with that variable if you run it from the GUI. Your .bash_profile allows you to set up the environment for your entire session.
- jraph 5y agoI would not expect my desktop environment to run my .bash_profile. Especially when I don't even use bash as my default shell. I'm afraid each desktop environment probably has its specific way of adding environment variables.
- kadoban 5y agoYou can just set that environment variable permanently, I believe usually in your ~/.profile file or one of those. Let me know if you need more info.
- JonathanBeuys 5y agoIsn't ~/.profile also executed every time I start a shell?
- kadoban 5y agoYes. But does it matter? That envirornment variable doesn't sound like it'll hurt anything. If you only run firefox via a desktop icon or the os menu, you could target it there instead if you prefer.
- HMH 5y agoI have this set in /etc/environment and it's working fine for me.
- JonathanBeuys 5y agoOh wow, I never heard about /etc/environment. At which occasions does it get executed?
- HMH 5y agoAt login via pam, see man 5 environment for details: https://www.man7.org/linux/man-pages/man5/pam_env.conf.5.html https://www.man7.org/linux/man-pages/man5/pam_env.conf.5.htm...
- chousuke 5y agoSo environment variables on Linux are tricky business; basically, the answer depends on how your desktop session is set up. Usually, PAM will load environment variables during session initialization; I'm pretty sure that's the thing that reads /etc/environment. See man pam_env; though whether it works depends on whether that module is enabled in your PAM configuration. You can also have other things read environment variables. If a user systemd instance is launched that starts the rest of your session, that will load environment variables from various places (it also affects things launched indirectly through it, eg. via D-Bus, that can't inherit your environment from the shell) The "last" level in a typical GUI session is the shell in your terminal which will read the "traditional" files, but they aren't usually very useful for GUI applications because the GUI applications generally aren't started from any process that has a shell in its ancestry nowadays.
- perihelions 5y agoAlso ~/.config/environment.d/ (equivalent, but user-local). Wiki for the curious: https://wiki.archlinux.org/title/environment_variables#Per_user https://wiki.archlinux.org/title/environment_variables#Per_u...