Two-fingered scrolling is working fine, but is there a way that I can reverse the direction (natural scrolling)? It seems backwards opposed to the way OSX does it.
Two-fingered scrolling is working fine, but is there a way that I can reverse the direction (natural scrolling)? It seems backwards opposed to the way OSX does it.
First way: using GNOME Settings
I don’t know which version of Ubuntu you’re using, but in Ubuntu 13.04 to Ubuntu 20.04 (I guess), it’s possible via Mouse and Touchpad settings.
So first, open System Settings > Mouse and Touchpad. As seen in the screenshot below if there’s an option for content sticks to fingers, check it. Then the scrollbars will work in reverse direction. I recommend clicking the "Test Your Settings" button to try it out.
Second way: using DConf Editor
This is also accessible via DConf Editor as well. To install DConf Editor, run:
Then go to
org.gnome.settings-daemon.peripherals.touchpad
and checknatural-scroll
.You can also set this option on the command line:
On Ubuntu 20.04
The DConf path has been changed to:
org.gnome.desktop.peripherals.touchpad
and so does the command:There are several ways to enable system-wide inverse or natural scrolling for the mouse. Only two ways I have tried will enable it for all windows, including gedit, terminal, software center, nautilus, and others. The easiest way to do it is to do the following. This method will need the latest version of the xserver-xorg-input-evdev driver, which you can get from here. I know it will work because I am using it and tested it previous to writing this version of a guide I previously wrote for Fedora 21. Make sure that you have reverse scrolling turned off in Ubuntu-Tweak, or you won't see the effect of the changes. In addition, for those users who do not want to use natural scrolling on your system now that reverse scrolling will be system-wide, those users can use this option to turn off natural scrolling on a per user basis. Now, to get started...
Update/install Evdev to latest version and reboot before continuing this guide.
Get your mouse device id by running the following in a terminal:
Take that number you got (just the number after "id=") and replace "{device id}" with that number in the following command:
It is case sensitive unless you use -i in the grep command. Write down the numbers you find in the output from that command (in my case it was the number 1, shown three times and separated by commas). You will use the negative values of the numbers you get in your output. Also, make sure to write down the property number (it will be in parentheses in the output; in my case it was (272) in Ubuntu and (273) in Fedora).
Note: If you get no output containing the property "Scrolling Distance" this method will not work for you and you will need to stop here and skip to the alternate way shown below this guide.
Run the following command in your open terminal:
Now, run the following command (you can use your favorite text editor instead of nano but I use nano):
In the file you have opened in your preferred text editor, paste the following (but be sure to change the numbers to the same comma-separated numbers you got from step 3; in my case the number was 1 so I put -1):
Save the file and exit the text editor. No need for a reboot. Just issue the following command (substituting the property number and the negatives of the numbers you got in the third step, and the device id you got from the second step):
You might need to quit nautilus and restart nautilus on some systems (skip this if natural scrolling is working in nautilus after running the above command). Press Alt+F2 and run each of these commands separately:
That's it! You should now have system-wide natural scrolling that will be persistent.
Alternate method:
If you do not want to install the latest version of Evdev (or, if your mouse doesn't have the "Scrolling Distance" property even in the latest Evdev), you can do the following:
Run the following command in your open terminal:
Now, run the following command (you can use your favorite text editor instead of nano but I use nano):
In the file you have opened in your preferred text editor, paste the following:
Save the file and reboot. As above, individual users can switch it off on a per-user basis by using Ubuntu-Tweak to "turn on" natural scrolling (it will be the reverse of the system-wide setting on a per-user basis but will not affect the actual system setting for other users who will want to use natural scrolling).
Note: The alternative method here will not work if you have the latest Evdev installed, such as in Fedora 22. Use the Evdev method above. Also note: Neither method will work with libinput in Wayland. You will need an alternative way of doing it per user or otherwise. If using libinput, make sure to remove the files created as above, and create a startup item in a desktop file. After creating the desktop file, place the following in the Exec line (be sure to use the device id for your mouse and the naturalscrolling property number for your mouse while using libinput; my device id was 11 and the property was 272; adjust yours accordingly).
Following that, save the file and logoff. When you logon again you should have natural scrolling on a per-user basis or may be able to set it in the autostart for all users.
The simplest and in my opinion the best way to achieve this on Ubuntu 12.10 and above (didn't test it on 12.04 and below) is to edit synaptics configuration:
On 16.04, copy this file under
/etc/X11/xorg.conf.d/50-synaptics.conf
, then edit:add those lines in the
Section "InputClass"
Identifier "touchpad catchall"
:So that it reads like follows:
Reboot (or read on) and have fun with natural scrolling :)
If you want to try your settings without reboot, you can use
synclient
The changes are immediately applied, but won't stay after reboot if you don't add them in
50-synaptics-conf
file.Note for GNOME or Cinnamon:
If you're using GNOME or Cinnamon desktop manager, there is a good chance that GNOME/Cinnamon's settings can override your custom settings. To prevent GNOME/Cinnamon's settings override yours, open dconf Editor [
dconf-editor
] and edit following entry:Uncheck active.
P.S.:
The default value is
111
and it indicates the speed, that means you can play with the value to adjust the scrolling speed to you favor. Giving it a negative value makes it simply to scroll in reversed direction.UPDATE: This solution does not work for apps that use GTK3, such as core Gnome apps like Nautilus (file browser). See D Charles Pyle's answer below for a workaround that works in all applications. Or follow Gnome bug 682457 for progress on a core fix that won't require a workaround.
You can use "Natural Scrolling" to have a system wide inverse scrolling.
What is Natural Scrolling?
Natural Scrolling is a GNOME Applet allowing you to reverse the direction of scrolling. You push your fingers upwards to move the page content upwards (and downwards for downwards) just like on iOS devices. Don't move scrollbars anymore but your file.
Install Natural Scrolling:
Natural Scrolling can be installed from its PPA.
Hit Alt+Ctrl+T to open terminal and run following commands:
How to enable Natural Scrolling?
Once installed, Hit Super key (Windows key) to open Unity dash and search for "natural scrolling" and open it. You'll see a new indicator in Unity panel, Click on it and select your device. In the preferences you can set it to start at login. That's it!
On Ubuntu 14.04 to Ubuntu 20.04, go to "Settings", then "Mouse & Touchpad" and select "Natural Scrolling".
The reverse scrolling you're talking about is called "natural scrolling," and can be enabled several different ways in Ubuntu. Here's an article on OMG! Ubuntu! detailing how to install the software that will get you what you need. If you're familiar with Ubuntu Tweak, you can also enable it in the latest release.
Get the device-id using:
Get the numbers from this command:
For example, a sample output:
Here, the numbers 102, 102 are of our interest. In your case, they would be something else. Just put negative of those numbers in the below mentioned config.
Edit ~/.profile and put these lines at end of file.
Logout and login, natural scrolling should work fine.
The Natural Scrolling application referred to in Basharat Sial's answer does not fix natural scrolling in certain system windows.
As an alternative, I recommend the guide provided in this answer. You won't need the natural scrolling application anymore when you use his guide.
The easiest way to set natural scrolling system-wide and for it to work with all system apps, is to set up the following file(s).
Touchpads only:
/usr/share/X11/xorg.conf.d/20-natural-scrolling-touchpads.conf
Mouses only:
/usr/share/X11/xorg.conf.d/20-natural-scrolling-mouses.conf
For both mouses and touchpads, create both files.
Then, reboot.
The benefit of using one of these two configurations is they are not device-specific. You can plug in other mouses or touchpads or keyboards with touchpads, and it'll work.
Please follow below steps to system widely change the scrolling.
xev -event mouse
. You will get one small box and when you bring your mouse into that section you will get a lot data getting generated into the Terminal.~/.Xmodmap
file by usingcp ~/.Xmodmap ~/.Xmodmap.bak
.cat ~/.Xmodmap
. Output would be likepointer = 1 2 3 5 4 6 7 8 9 10 11 12
echo "pointer = 1 2 3 4 5 6 7 8 9 10 11 12" > ~/.Xmodmap && xmodmap ~/.Xmodmap
worked. Note switch of4
and5
.