Apple Magic with Linux

I am not saying that Apple manufactured paraphernalia is the best available. To make records straight, I am an everlasting user of Logitech Marble Trackball mice. But to be honest Apple Magic Mouse and especially Magic Trackpad are useful and aesthetic tools for serious computer user, hacker etc. And best of all, they also work in Linux with minimal effort (if you are using fairly recent distro like Ubuntu 11.04). All you need is working Bluetooth hardware in your computer, since that is how both of these devices communicate with your computer. No USB, no wires.

Magic Mouse is an extremely low profile mouse, and its whole upper surface functions as a touchpad. There are no buttons, since the whole upper surface is like a button. Depending on where your finger or fingers are when you press it, that click will be interpreted as different mouse buttons. Surface recognizes movement too, so you can scroll both horizontally and vertically.

Magic Trackpad is basically just like a touchpad on any laptop. Except that Magic Trackpad recognizes up to ten separate fingers, and you may use vast amount of gestures to activate all kinds of actions on your desktop. Generally I hate laptop trackpads, since they are just one big nuisance. They are either too sensitive or not sensitive enough. Sometimes, while writing, they interpret your palm as a click, and suddenly the text you are writing will continue where ever the cursor happens to be. I think trackpad should be on either side of the keyboard – not below it – and with Magic Trackpad you have this option.

My favorite combination is to have Trackpad on left side of keyboard and mouse on right side (being ambidextrous helps). I actually use both devices as pointing and activation device but in a different manner. Mouse is generally faster to around on large twin-screen desktops but trackpad is more accurate. Trackpad is easier to use for fast scrolling on long documents, and I have programmed it to have certain gestures to switch from one virtual desktop to another, show all windows etc. Now I can make point-and-clicking with any hand that is not typing something on keyboard. After awhile i got so used to this arrangement that i do not even think about it anymore.

Apple Magic Mouse in Ubuntu 11.04
First of all you have pair Magic Mouse. This proved to be easy. In Bluetooth menu choose Set up new device.. Click Forward. Turn on the Magic Mouse and click it. Magic Mouse should appear on the list. Select it from the list and press Forward. When it is paired you should be able to move pointing arrow around the screen. That is all, all special functions (like scrolling) are immediately available. In Bluetooth menu you will find a new item, Apple Magic Mouse. You can access mouse preferences there, and set mouse speed and acceleration to your liking.

Magic Mouse acts as a three-button mouse in Ubuntu 11.04. Since the upper surface is just one big button, it depends where your finger is when you press it. If you keep your finger on right side of the upper surface when you press it, it is interpreted as a right button click. On center it is interpreted as a center button click, and on left as a left button click.

Apple Magic Trackpad in Ubuntu 11.04
Trackpad is a bit trickier. Pairing with it is not as easy as it was with Magic Mouse. And if you want to fully configure gestures, then a bit more work is needed too.

You have to be careful when you try to pair Trackpad with computer. It wants to use pin, but do not let it choose a random pin. Instead, force it to use ‘0000’ pin, which is available in pairing options. That worked for me. If you let it choose a random pin, it will be shown so fast that you do not have time to enter it, and pairing will fail. Actually this pairing was the hardest part in the process. After that everything went smoothly.

If you are using Unity in Ubuntu, certain gestures should work automatically. If you are using Classic Desktop, then no gestures work. But in both cases Trackpad works as basic pointing device just like normal touchpad. In any case, I was not satisfied with the gestures Unity provided, so I decided to use an application called ginn. If you do not already have it installed, then you can do it with


sudo apt-get install ginn

You can then edit /etc/ginn/wishes.xml and put there all gestures you might want.

It seem that ginn is a bit unreliable, and it may crash now and then. With classic desktop it was very hard to get working properly, but with Unity desktop it works OK. If you decide to use it with Unity, then you should also install Compiz Settings Manager


sudo-get install compizconcompizconfigfig-settings-manager

Apple Aluminum Keyboard
It is quite obvious, but Apple Aluminum Keyboard is a finishing touch with Apple Trackpad and Mouse – and it works with Linux, of course. This USB connected full size keyboard is pleasant to see and also pleasant to type. There are little quirks (I quess it is mandatory in Apple to something in their products that is NOT according to accustomed standards), like

  • no visible Insert key,
  • Function keys work differently (to get F1 you have to Fn+F1, just pressing F1 activates special function)
  • two keys (or actually their kaycodes) have been swapped. Key with characters and | produces other characters.
  • Alt is not where it is supposed to be

But it is quite easy to modify these things. To correct the swapped keys, all you have to do is to create a file .Xmodmap


gedit ./.Xmodmap

and put there lines

keycode 49 = less greater less greater bar brokenbar bar
keycode 94 = dead_circumflex degree dead_circumflex degree U2032 U2033 U2032

or whatever happens to check with your keyboard layout. Log out and log in, and those two keys are just they are supposed to be. In keyboard preferences you find lots of other options to tinker with.

Comments
One Response to “Apple Magic with Linux”
Trackbacks
Check out what others are saying...
  1. […] Apple Magic with Linux | TeknoMagus – wordpress.com […]



Leave a comment

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 105 other subscribers