Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

The Apple Magic Mouse appears to work with Ubuntu so far, but only a couple multitouch functions seem to work. With the trackpad, there are lots of other functions with utouch. What I'd really like to do is map two-finger swipes to back/forward in a browser.

share|improve this question
Try looking for xev and xmodmap – nikhil Jun 7 '12 at 10:15
I found xev and xmodmap. Now what? – Jon Jun 10 '12 at 14:47
Were you able to find the solution? I want to be able to go back/forward too – bakytn Oct 12 '12 at 17:40
I'm thinking of buying a Magic Mouse, but navigating back and forward is fundamental when browsing the web. – speakman Nov 20 '12 at 10:04
As far as I know, there's still no way to do this. I wish someone would make a customization tool for the Magic Mouse. – Jon Nov 23 '12 at 22:00

I have set up this and many other gestures with touchegg. Install it via:

sudo apt-get install touchegg

Configurate touchegg via its configuration file located here:


Configuration for your desired gestures would be the following.


    <property name="composed_gestures_time">15000</property>

<application name="All">      

    <gesture type="DRAG" fingers="2" direction="LEFT">
        <action type="SEND_KEYS">Alt+Right</action>

    <gesture type="DRAG" fingers="2" direction="RIGHT">
        <action type="SEND_KEYS">Alt+Left</action>


It's important to follow the last hint of the FAQ if you want to setup two or three finger gestures.

 synclient TapButton2=0
 synclient TapButton3=0
 synclient ClickFinger2=0
 synclient ClickFinger3=0
 synclient HorizTwoFingerScroll=0
 synclient VertTwoFingerScroll=0

Create an executable shell script and fire it up on startup.

This deactivates the two and three finger taps and clicks of the synaptics driver as well as the two finger scrolling. If you want to keep the two finger tap to be the right mouse button click and the two finger scrolling you have to do it with touchegg as well.

I think the magic mouse reports itself as a trackpad as stated here.

share|improve this answer
The Magic Mouse isn't reported as a trackpad, but as a mouse. It also isn't one of the touchégg supported devices. – Jon Jan 25 '14 at 19:43

I'm not sure this will work with Magic Mouse, but with Magic Trackpad I successfully used xSwipe to get browser back / forward navigation, workspace switch, Scale and Expo actions.

share|improve this answer
If you read the other replies in this thread, you'll see that what works for the Magic Trackpad definitely doesn't work for the Magic Mouse. They're very different devices. – Jon Oct 21 '14 at 19:35

Have you tried touchegg? I was able to define some gestures on my MacBook's touchpad.

share|improve this answer
As far as I can tell, touchégg works with trackpads, but not with mice. – Jon Jan 20 '14 at 23:06

Easystroke Gesture Recognition can map a gesture to an aplication. you can findEasystroke Gesture Recognition in ubuntu software centre.

share|improve this answer
I don't want to be able to map a pointer movement to an action, but map a movement on the mouse's surface (without the pointer moving) to an action. – Jon Jun 17 '14 at 3:26

At the moment of writing this, mouse driver hid-magicmouse does not report two-finger swipe any differently than one-finger. So no application level solution is possible. You have to watch the development of kernel module. Magic Mouse is seen in system as a very basic mouse with two scrollwheels. It will not be detected by any touchpad software.
On the contrary, Apple Magic Touch is seen as a very advanced touchpad and can be assigned many more functions than as in MacOS.

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.