Personal tools
You are here: Home Team Members Otto Mora Configuring a Joystick or Gamepad

Configuring a Joystick or Gamepad

by Otto Mora last modified Feb 23, 2010 11:56 PM

This howto details how to configure a joystick or gamepad for use with Fedora.

Applicable to Fedora Versions

  • Fedora 10-12

Requirements

Before you can use your joystick, you must ensure that the peripheral is supported in Linux and that the relevant drivers are installed.
  1. Check to determine if your joystick has support for Linux. You can search at: http://www.linuxcompatible.org/compatibility.html to determine if it will work on linux. You may need to download or compile drivers if your joystick is very new.

Doing the Work

Fedora ships with most of the required drivers to support joysticks. First we will look at the required libraries, then we will test and configure our joystick.

  1. Most joysticks are supported by the joystick tools library (http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/ ). Fedora will normally come with this package already included. However if you need to install it run the following:
  2. su -c 'yum install joystick'
  3. In order to test our joystick we will first need to load the userland interface into the kernel:
  4. su -c 'modprobe joydev'
  5. Now we need to configure the input method for your joystick.
    • If your joystick is plugged via usb then execute the following:
      su -c 'modprobe iforce'
    • If your joystick is plugged via the gameport then execute the following:
      su -c 'modprobe ns558'
  6. Now we can test the joystick. If this is the first joystick that you are plugging then it should have been mapped to /dev/input/js0 (If this is an additional device then you might need to change the name a little, look under /dev/input to see the path for the device). To test the joystick we can execute the following:
    jstest /dev/input/js0
  7. As you press buttons on your joystick you should see them reflected on the terminal screen (this is a good sign :-) ). However if nothing comes up on the screen or jstest returns an error message then you need to go back and re-check.

Disclaimer

We test this stuff on our own machines, really we do. But you may run into problems, if you do, come to #fedora on irc.freenode.net

Added Reading

Document Actions
Log in


Forgot your password?
New user?