Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've enabled natural scrolling via Ubuntu Tweak's miscellaneous options, but that doesn't seem to take effect for horizontal scroll - neither in web browsers, nor in nautilus or other native applications.

Is there a way to enforce this behavior on horizontal scrolling as well?

I'm using Ubuntu 12.04.

share|improve this question
up vote 2 down vote accepted

There is also a "nicer" xorg.conf based way to make the inverted <V_DISTANCE> and <H_DISTANCE> settings (determined according to @Eliran's answer) permanent:

Create a directory /etc/X11/xorg.conf.d/, and in it a file like 51-synaptics-tweaks.conf, containing:

Section "InputClass"
    Identifier "touchpad"
    Driver "synaptics"
    MatchIsTouchpad "on"
        Option "VertTwoFingerScroll" "on"
        Option "HorizTwoFingerScroll" "on"
        # In the following lines, use your own negative V_DISTANCE / H_DISTANCE values.
        Option "VertScrollDelta" "-113"
        Option "HorizScrollDelta" "-113"

This follows Ubuntu's recommendations in the /usr/share/xorg.conf.d/* example files and also Archlinux instructions. To see the effect, restart X of course :)

share|improve this answer
nice and clean, +1! – Eliran Malka Feb 25 '15 at 10:42
actually, this is awesome. accepting :) – Eliran Malka Jun 3 at 15:12

Instead of using a designated application to configure natural scrolling, a script can be made to reverse the scrolling directions - both on the vertical and the horizontal axis.

  1. First, obtain the xinput prop related to the scrolling distance (note the variables wrapped in angle brackets):

    $ xinput list
    ⎡ Virtual core pointer id=2 [master pointer (3)]
    ⎜   ↳ Virtual core XTEST pointer id=4   [slave pointer (2)]
    ⎜   ↳ SynPS/2 Synaptics TouchPad id=<TOUCHPAD_ID>   [slave pointer (2)]
    ⎣ Virtual core keyboard id=3    [master keyboard (2)]
  2. Fetch the appropriate values for that prop:

    $ xinput list-props <TOUCHPAD_ID> | grep "Scrolling Distance"
        Synaptics Scrolling Distance (<DISTANCE_KEY>):  <V_DISTANCE>, <H_DISTANCE>
        Synaptics Circular Scrolling Distance (301):    0.100000
  3. Than, create the script file to apply the reversed directions, by negating the values for vertical / horizontal distance. Feed the variables returned earlier:

    nautilus -q
    nautilus -n &
  4. Grant the file with execution permissions, set it to run at startup, and there you have it.


This method was ported from Andy C.'s old web blog, to create a self contained answer. Thank you, Andy, for providing an elegant, system wide solution.


  • It seems that calling nautilus is breaking the script on 13.04. Omitting the two calls to nautilus solves it.
  • Natural scrolling (both vertically and horizontally) is working properly out-of-the-box in 14.x, so no need for scripting there, just toggle the "Natural Scrolling" in the Mouse & Touchpad options.
share|improve this answer

As an alternative to using script files or Ubuntu Tweak, you can also try the app called "Natural Scrolling", made by Zedtux. It will come as an indicator.

To install it, the easiest way is using a terminal:

sudo apt-add-repository ppa:zedtux/naturalscrolling
sudo apt-get update
sudo apt-get install naturalscrolling
share|improve this answer
i'm aware of that. it seems, however, to fail the task for some native applications. plus, it seem redundant to install an application (and clutter up the panel with yet another indicator) solely for that purpose, while a four-liner script can resolve this, possibly better. thanks for the alternative anyhow. – Eliran Malka Oct 20 '12 at 3:55
Interesting that your script works for any window ! I indeed have a bug with this. I'll have a try with your solution. – Agmenor Oct 20 '12 at 7:34

In xfce4 (Xubuntu, Ubuntu Studio,...) you can add this on the console:

echo 'pointer = 1 2 3 4 5 7 6 8 9 10 11 12' >> .Xmodmap
xmodmap .Xmodmap
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.