Other contacts

Novi članci

Flickr Goodness


July 10, 2009 @ 20:33

Ultimate Linux Remote Control (Wiimote on Fedora)

Ultimate Linux Remote Control
I have been building Linux media center and one thing that was missing was a great remote control. I was impressed with Fiire Chief remote, but it is too expensive and the Fiire company stopped making it ;(
Then I found out that you can use Wiimote on Linux and that it costs 40$ on Ebay.
This guide isn’t intended only for those with Media Centers, because you can use Wiimote as a remote for any desktop application, presentations or even games.
There are some basic hardware requirement likes usb bluetooth dongle or bluetooth already built in your laptop and Nintendo Wiimote.
This guide is more focused on Fedora but you can use it with OpenSuse, Arch and Ubuntu. The main difference is how to install tools, other things should be same. There is also an Ubuntu guide that you can use as parallel with this guide.

Then you need to install tools and aplications that give you wiimote support:
yum install cwiid cwiid-wminput cwiid-utils
Now start wmgui application and from file menu choose connect, after that press buttons 1+2 on wiimote to put it in discovery mode so that wmgui can connect to it.
After Wiimote is connected try pressing buttons, if you see buttons work in wmgui app then everything is working ok.
Main utility that we will be using is wminput and it needs access to /dev/input/uinput interface so let’s give it ;)
su -
chmod 666 /dev/input/uinput

Now you as regular user can start wminput and use Wiimote as mouse pointer and also as customize it’s buttons.
If you see this, then you haven’t succeeded to connect Wiimote to your Linux machine:
Put Wiimote in discoverable mode now (press 1+2)...
No wiimotes found
unable to connect

But if you see this, then everything is working ok:
Put Wiimote in discoverable mode now (press 1+2)...

By default you have Wiimote working as a mouse with buttons A and B mapped as mouse left/right buttons.
Next step is to customize Wiimote buttons for specific application that you intend to use. You can use Wiimote in any application you wish but I see it as multimedia remote so I’ll show examples how to use Wiimote with Elisa Media Center (renamed to Moovida) and MythTV.
For MythTV I map button A to Enter key, button B to Escape key, Wiimote + and – keys to F10 and F11 for volume control, button 1 to P key for Pause/Play, and so on.
Here is how MythTV config file looks like:
# This is the wminput-mythtv file
Wiimote.A = KEY_ENTER
Wiimote.B = KEY_ESC
Wiimote.Up = KEY_UP
Wiimote.Down = KEY_DOWN
Wiimote.Left = KEY_LEFT
Wiimote.Right = KEY_RIGHT
Wiimote.Minus = KEY_FN_F10
Wiimote.Plus = KEY_FN_F11
Wiimote.Home = KEY_M
Wiimote.1 = KEY_P
Wiimote.2 = KEY_ESC

With this custom config file Wiimote will work optimally with MythTV:
wminput -d -w -c wminput-mythtv
There is still room for improvement in this config file. For example you can use Wiimote accelerometers and tilt Wiimote for fast forwards and rewinds functions. If you do that, or anything else, please provide your config file in the comments of this blog.
You can check out full Wiimote range of keys, and also check out MythTV shortcut keys so you can connect right keys together.
For Elisa/Moovida Media Center I use this config file:
# This is the wminput-elisa file
Wiimote.A = KEY_ENTER
Wiimote.B = KEY_SPACE
Wiimote.Up = KEY_UP
Wiimote.Down = KEY_DOWN
Wiimote.Left = KEY_LEFT
Wiimote.Right = KEY_RIGHT
Wiimote.Minus = KEY_DOWN
Wiimote.Plus = KEY_UP
Wiimote.Home = KEY_F23
Wiimote.2 = KEY_ESC

Also if you create config files for XBMC or Boxee please share them. If you have any additional questions feel free to ask me.


  • Fiire Chief remote
  • Wiimote on Linux project
  • Wiimote on Ubuntu Howto
  • Wiimote keys
  • MythTV shortcuts
  • Moovida Media Center
  • MythTV, Open Source DVR
  • XBMC Media Center
  • Boxee Media Center
  • Filed under english, fedora, linux


    1. Posted by Valent Turkovic (valentt) ‘s status on Sunday, 19-Jul-09 13:46:52 UTC – Identi.ca

      July 19, 2009 @ 14:47

      [...] http://kernelreloaded.blog385.com/index.php/archives/ultimate-linux-remote-control/ [...]

    2. Posted by Thad

      September 11, 2009 @ 5:44

      “chmod 666 /dev/input/uinput”

      You do realize you’ve just given every process on your system arbitrary control over input, right?

      Like the manpage says, it’s a little more secure if you set up a uinput group and set a rule to put uinput perms at 660 and uinput group ownership. Still not as secure as running it with sudo, but of course the point of having a remote is so you don’t have to type commands in manually.

    3. Posted by Vurp

      February 10, 2010 @ 19:10

      I use this file for Boxee:

      Wiimote.A = KEY_ENTER
      Wiimote.B = KEY_BACKSPACE
      Wiimote.Up = KEY_UP
      Wiimote.Down = KEY_DOWN
      Wiimote.Left = KEY_LEFT
      Wiimote.Right = KEY_RIGHT
      Wiimote.Minus = KEY_KPMINUS
      Wiimote.Plus = KEY_KPPLUS
      Wiimote.Home = KEY_ESC
      Wiimote.1 = KEY_SPACE
      Wiimote.2 = KEY_X

      The Home and B buttons do pretty much the same things.
      1 pauses/resumes and 2 stops playing media
      + and – adjust volume.

    4. Posted by Oa10712

      July 4, 2010 @ 7:31

      I know how to create new config files from my experience with a similar program in ubuntu, but where do you put the config files in fedora?

    5. Posted by valent

      July 4, 2010 @ 10:25

      you can put them anywhere you like.

    6. Posted by Oa10712

      July 4, 2010 @ 18:16

      then how do you load them? i tried putting the location of the file in, but that didnt work either.

    7. Posted by Bazu135

      August 24, 2011 @ 13:09

      Possibly a long shot, but is there a way to map two keys to one button? For instance, could you assign ‘Ctrl+Q’ to one button, rather than setting one as Ctrl and another as Q?

      Even longer shot, but is there a way to map a command line command to a button, to – for instance – enable yourself to launch or terminate a program via the remote?

    8. Posted by Francesco

      May 10, 2013 @ 11:41

      this is for xbmc buttons


      Wiimote.A = KEY_ENTER

      Wiimote.B = KEY_BACKSPACE

      Wiimote.Up = KEY_UP

      Wiimote.Down = KEY_DOWN

      Wiimote.Left = KEY_LEFT

      Wiimote.Right = KEY_RIGHT

      Wiimote.Minus = KEY_KPMINUS

      Wiimote.Plus = KEY_KPPLUS

      Wiimote.Home = KEY_TAB

    RSS feed for comments on this post · TrackBack URI

    Leave a Comment


      Flickr photostream

      SSL is required

      Meta meta :)