Page 1 of 1

Mouse Scroll reverse (Natural) Cinnamon [SOLVED]

Posted: Thu Jan 18, 2018 8:57 am
by Ferrari1978
Hi, I'm having problems to use mouse scroll reverse, I'v tried some solutions posted but nothing works. Some help?
:)

Re: Mouse Scroll reverse (Natural) Cinnamon

Posted: Thu Jan 18, 2018 9:31 am
by Moem
If you can tell us what all you've tried, we don't have to repeat solutions that aren't going to work.
First of all, I assume you've tried the setting?

Re: Mouse Scroll reverse (Natural) Cinnamon

Posted: Fri Jan 19, 2018 11:09 am
by Ferrari1978
HI, sorry for not mentioned anything, next time I'll remember that but after a workaround from forums and try some solutions that not works for me, I discovered one discussion on Google talks which solved the problem, that I described below.

FIRST open terminal and load this:

xinput list

Take the ID for your mouse from the list showed

SECOND Now type in terminal with the following command to enable it
(Attention...place your deviceID at ## )

xinput --set-int-prop ## "libinput Natural Scrolling Enabled" 8 1

Example - in my case the command will be: xinput --set-int-prop 10 "libinput Natural Scrolling Enabled" 8 1

After that your mouse should works properly, but its a temporary solution, you need to put it in startup programs to work always after reboot.

So in Menu open Startup Applications and create a new entry by clicking in ADD button and choose Custom Command, a window will open so you can put a name like "Natural scroll" and in command put again the line below:

xinput --set-int-prop ## "libinput Natural Scrolling Enabled" 8 1

Finally click add and its all done.

Work for me.

Re: Mouse Scroll reverse (Natural) Cinnamon [SOLVED]

Posted: Wed Jun 20, 2018 11:14 pm
by laubster
According to the xinput manpage, --set-int-prop is deprecated under Mint 19.

The following shell script (based on some 2016 code from musicin3d) works for me; it avoids not only --set-int-prop but also hardcoding the device ID.

Code: Select all

mouseid=$(xinput --list \
    | perl -n -e 's@.*Wheel Mouse.*id=([0-9]+).*@$1@ and print')
xinput --set-prop $mouseid 'libinput Natural Scrolling Enabled' 1
If you want to put it all on a single startup custom command (avoiding a separate shell script on the filesystem), try the following.

Code: Select all

mouseid=$(xinput --list | perl -n -e 's@.*Wheel Mouse.*id=([0-9]+).*@$1@ and print') && xinput --set-prop $mouseid 'libinput Natural Scrolling Enabled' 1

Re: Mouse Scroll reverse (Natural) Cinnamon [SOLVED]

Posted: Sun Dec 30, 2018 11:48 pm
by om_haribol
Thank you very much. This basically worked for me too.

Here is an updated version; my mouse wasn't identified as a "Wheel Mouse" so that wouldn't have worked. This version just finds the first device with 'mouse' in the name, and uses that id.

Source code also available on my github repo: https://github.com/dubaaron/aaron-lib/b ... -scroll.sh

Just save this as "mouse-natural-scroll.sh" somewhere, and then add that to your autorun.

Code: Select all

#!/bin/bash

# Enable "natural scrolling" (reverse mouse wheel) in Linux

# to debug
# set -x

# get the mouseid by filtering output of xinput --list
# matches id of first device with word "mouse"
mouseid=$(xinput --list | sed -E '/mouse/I!d;s/.*?mouse.*?id=([0-9]+).*/\1/i;q')

#echo $mouseid

# set natural scrolling property to given mouseid
xinput --set-prop $mouseid 'libinput Natural Scrolling Enabled' 1

Re: Mouse Scroll reverse (Natural) Cinnamon [SOLVED]

Posted: Fri May 17, 2019 10:42 am
by wickedmonkey
om_haribol wrote: Sun Dec 30, 2018 11:48 pm.
Thank you so much for this. This issue was driving me mad and your solution works for me nicely.

I am really puzzled though as to why on earth natural scrolling is included in settings panel for touchpad but not for mouse...