Wii Remote as Mouse in Ubuntu 9.04


I’ve recorded a tutorial on how to set up a Wii Remote as a mouse in Ubuntu Jaunty Jackalope (9.04), and also written a text version below the video if you would prefer to use that. There is also a text version of this tutorial for those who like to copy and paste below this.

This tutorial is an updated version of the tutorial by Ubuntu Geek

To setup the Wii Remote as a cursor, you need three things. A Wii Remote, a computer with Ubuntu Jaunty 9.04 (I believe that this works on some older versions too), and a Bluetooth adapter (built in, usb, etc.).

First off, you need to install a few packages. These are already in the Ubuntu Repositories.

sudo apt-get install wminput wmgui lswm

Once that completes, you run the following command:


This commad finds the address of your Wii Remote, remember to press the 1 and 2 buttons on the controler to put it into discovery mode. When it finds the controller, it will give a hexidecimal number like this: XX:XX:XX:XX:XX:XX (the Xs being replaced by numbers).

Now we need to add some text to the end of the “/etc/modules” file, so that we can use the Wii Remote as a mouse. Open it up in gedit or the terminal (nano) by running this:

sudo gedit /etc/modules
sudo nano /etc/modules

Now, on a new line at the end, add “uinput” to the file, save and close, then restart your computer.

When the computer is booted up again, just run the following command, replacing “[XX:XX:XX:XX:XX:XX]” with the number that was returned by the lswm command.

sudo wminput [XX:XX:XX:XX:XX:XX]

Make sure to put the Wii Remote in discovery mode (1 & 2).

When Wii Remote is connected, the terminal will say “Ready.”. This will allow you to use the accelerometor in the Wii Remote to control the mouse by tilting the remote.

Unfortunately that is rather hard, so to get it to work like the Wii Remote does on the Wii, you will need to do a few extra steps.

Before anything, you need a constant bright light. Because of how the Wii’s remotes work, you can also use an infrared LED. I made one by modifying a normal TV remote using a couple of wires and a light switch.To see if the infrared light was working, I used a camera since you can’t see the infrared with your eyes.

Once you set that up, all we have to do is copy and edit a config file by running these commands.

[bash]cd /etc/cwiid/wminput
sudo mv default default.bak
sudo cp ir_ptr default[/bash]

Almost done! Now we need to edit the config file using gedit or nano again.

sudo gedit default
sudo nano default

In that file, you will need to remove the tiles (~) from “~ABS_X” and “~ABS_Y”. When that’s done, (save and) close out of it and run this to get the Wii Remote. Remember to press 1 & 2.

sudo wminput [XX:XX:XX:XX:XX:XX]

Once it is connected (says “Ready.”) then you can use the Wii Remote as your mouse. A demonstration by Jake is avialable below.

An example provided by Jake.