Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Has anyone managed to make natural scrolling work on Ubuntu 12.10? And with make work I mean to find a setup working for all the applications and not something based on Xmodmap which seems to be considered more an hack than a clean solution and in addition it doesn't enable natural scrolling on Nautilus.

I am asking that because the workaround I found to enable it with Magic Trackpads (i.e. tweak the setting Synaptic Scrolling Distance using xinput) doesn't work with Magic Mouses because such devices seem not to make use of the synaptic driver. Can you confirm that?

The following is the output of the command: xinput list-props 'Apple Magic Mouse'

Device 'Apple Magic Mouse':
Device Enabled (126):   1
Coordinate Transformation Matrix (128): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (247): 0
Device Accel Constant Deceleration (248):   5.000000
Device Accel Adaptive Deceleration (249):   1.000000
Device Accel Velocity Scaling (250):    5.000000
Device Product ID (243):    1452, 781
Device Node (244):  "/dev/input/event16"
Evdev Axis Inversion (251): 0, 0
Evdev Axes Swap (253):  0
Axis Labels (254):  "Rel X" (136), "Rel Y" (137), "Rel Horiz Wheel" (375), "Rel Vert Wheel" (376)
Button Labels (255):    "Button Left" (129), "Button Middle" (130), "Button Right" (131), "Button Wheel Up" (132), "Button Wheel Down" (133), "Button Horiz Wheel Left" (134), "Button Horiz Wheel Right" (135)
Evdev Middle Button Emulation (256):    0
Evdev Middle Button Timeout (257):  50
Evdev Third Button Emulation (258): 0
Evdev Third Button Emulation Timeout (259): 1000
Evdev Third Button Emulation Button (260):  3
Evdev Third Button Emulation Threshold (261):   20
Evdev Wheel Emulation (262):    0
Evdev Wheel Emulation Axes (263):   0, 0, 4, 5
Evdev Wheel Emulation Inertia (264):    10
Evdev Wheel Emulation Timeout (265):    300
Evdev Wheel Emulation Button (266): 4
Evdev Drag Lock Buttons (267):  0
share|improve this question
    
1  
I spent a lot of time on Google looking for possible solutions before ask that question here: unfortunately, none of them seemed to be a system-wide solution (ie. natural scrolling was not working with all the applications like for example nautilus which as I said above, does not honor Xmodmap setings). So please, if you have any kind of working solution, post it here. –  landimatte Dec 29 '12 at 20:16

2 Answers 2

up vote 5 down vote accepted

Find the device ID of your magic mouse by doing:

xinput list

Then set the inverse scrolling by doing:

xinput set-button-map ID 1 2 3 5 4

(replacing ID with the ID of your device)

share|improve this answer
2  
This works, but does not survive a reboot. –  Bram Sep 18 '13 at 3:43
    
you could create a script to run on login, but this method still doesn't reverse the scroll in system windows, e.g. Files –  Tamas Imrei Dec 12 '13 at 15:41

In order to automatically change to natural scrolling in boot time, I did the following steps:

  1. I created a simple script, as follows:

    mouse_id=$(xinput list | grep 's Mouse' | egrep -o "[[:digit:]]{2}") 
    eval "$(xinput set-button-map $mouse_id 1 2 3 5 4)"
    
  2. I made a soft link in /bin directory

  3. Finally, I added this script to startup applications

After a restart it works perfectly.

My script is not perfect but it works. Maybe someone can suggest a better script for this or better approach. Fill free to edit my script. (I am using Ubuntu 12.04.)

share|improve this answer

Your Answer

 
discard

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.