You can play Nintendo Wii games on Linux if you know how to use the Wii remote with your computer. You can also use the Wii remote instead of a PC game controller to play any game using an emulator.
Instructions in this article apply to Debian-based Linux distributions such as Debian, Mint, and Ubuntu.
What You Need to Use a Wii Remote With Linux
In addition to a Wii controller, you will need to install the following Linux packages:
- lswm
- wminput
- libcwiid1
You can get all of these tools by entering a single sudo command in the Linux command terminal:
sudo apt-get install lswm wminput libcwiid1
If you are using an RPM-based Linux distribution, you can use YUM or a similar tool to get these applications.
How to Connect a Wii Remote to Linux
You can configure the Wii remote from the command line:
-
Open the Linux command terminal and enter the following command to get the Bluetooth address of your Wii controller:
lswm
-
Press and hold the 1 and 2 buttons on the Wii controller at the same time when prompted. If done correctly, a set of numbers and letters should appear in the terminal like this:
00:1B:7A:4F:61:C4
Make sure you have Bluetooth enabled on your computer. You may have to try a couple of times before your PC detects the Wii remote.
-
Enter the following into the terminal window to open the Nano editor so that you can setup a configuration file to map the Wii buttons to keys:
sudo nano /etc/cwiid/wminput/gamepad
-
Copy and paste the following into the bottom of the Nano editor file:
Wiimote.Down = KEY_RIGHT
Wiimote.Left = KEY_DOWN
Wiimote.Right = KEY_UP
Wiimote.1 = KEY_SPACE
Wiimote.2 = KEY_LEFTCTRL
Wiimote.A = KEY_LEFTALT
Wiimote.B = KEY_RIGHTCTRL
Wiimote.Plus = KEY_LEFTSHIFT
-
Press CTRL + O on the keyboard to save the configuration file.
-
Press CTRL + X to close Nano.
-
After configuring the button mapping, run the following command:
sudo wminput -c /etc/cwiid/wminput/gamepad
-
Press and hold the 1 and 2 buttons on the Wii controller at the same time again when prompted. The word "ready" will appear if the connection is successful. Start any game to play with the Wii remote.
One major advantage of the Wii controller is the D-pad, which works much better for old school games than the Xbox One thumb stick because it isn't quite as sensitive.
Configuring the Wii Remote for Linux
When you create your configuration file, it should already contain some text such as the following:
# gameport
Classic.Dpad.X = ABS_X
Classic.Dpad.Y = ABS_Y
Classic.A = BTN_A
The format for each line in the file is Wii controller button = keyboard button. For example:
Wiimote.Up = KEY_UP
The above command maps the Up button on the Wii remote to the up arrow on the keyboard. However, since you must hold the Wii remote on its side to play most games, you may want to map the Up button to the left arrow key:
Wiimote.Up = KEY_LEFT
Most emulators streamline the button mapping process, so after you've connected your Wii remote to Linux, you can further customize the controls for specific games and consoles. Some PC games even allow you to map mouse keys to the Wii controller.
You can see recommend controller settings for retro games at the Internet Archive Arcade website.
Wii Remote Buttons
You can use multiple Wii accessories with Linux including the Wii Classic Controller and the Wii Nunchuk. Below is a list of all the Wii controller buttons you can configure in the gamepad file:
Wii Remote
- Wiimote.Up
- Wiimote.Down
- Wiimote.Left
- Wiimote.Right
- Wiimote.A
- Wiimote.B
- Wiimote.1
- Wiimote.2
- Wiimote.Plus
- Wiimote.Minus
- Wiimote.Home
- Wiimote.Dpad.X
- Wiimote.Dpad.Y
Wii Nunchuk
- Nunchuk.C
- Nunchuk.Z
- Nunchuk.Stick.X
- Nunchuk.Stick.Y
Wii Classic Controller
- Classic.Up
- Classic.Down
- Classic.Left
- Classic.Right
- Classic.Minus
- Classic.Plus
- Classic.Home
- Classic.A
- Classic.B
- Classic.X
- Classic.Y
- Classic.ZL
- Classic.ZR
- Classic.L
- Classic.R
- Classic.Dpad.X
- Classic.Dpad.Y
- Classic.LStick.X
- Classic.LStick.Y
- Classic.RStick.X
- Classic.RStick.Y
- Classic.LAnalog
- Classic.RAnalog
Unfortunately, it is not possible to configure the Wii remote's motion controls with Linux, but you can still play ROMs of Wii games that don't require motion controls.
Keyboard Mappings
Below is a guide for the Linux keyboard to help you set up your configuration file.
KEY_LEFTALT
Space bar KEY_SPACE Caps Lock KEY_CAPSLOCK F1 KEY_F1 F2 KEY_F2 F3 KEY_F3 F4 KEY_F4 F5 KEY_F5 F6 KEY_F6 F7 KEY_F7 F8 KEY_F8 F9 KEY_F9 F10 KEY_F10 F11 KEY_F11 F12 KEY_F12 Num Kock KEY_NUMLOCK Shift Lock KEY_SHIFTLOCK 0 (keypad) KEY_KP0 1 (keypad) KEY_KP1 2 (keypad) KEY_KP2 3 (keypad) KEY_KP3 4 (keypad) KEY_KP4 5 (keypad) KEY_KP5 6 (keypad) KEY_KP6 7 (keypad) KEY_KP7 8 (keypad) KEY_KP8 9 (keypad) KEY_KP9 . (keypad dot) KEY_KPDOT + (keypad plus symbol) KEY_KPPLUS - (keypad minus symbol) KEY_KPMINUS Left arrow KEY_LEFT Right arrow KEY_RIGHT Up arrow KEY_UP Down arrow KEY_DOWN Home KEY_HOME Insert KEY_INSERT Delete KEY_DELETE Page Up KEY_PAGEUP Page Down KEY_PAGEDOWN