Linux tip, Fedora tip / howto: setting up a joystick / steering wheel to work with CentOS

back to notes and tips index

Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.

setting up a joystick / steering wheel to work with CentOS

The context here is as follows:
  • I wanted my son to be able to play my commercial copy of Tuxracer (which I bought many years ago for $14.95 or so)(well worth the money :-)
  • This had to be with the "Logitech Wingman Formula GP" (a USB steering wheel), because keys are still too tricky for him
  • And running on CentOS 6.4, 64 bit (uname -r output:

The first step is to install a joystick driver (all steps as root):
  • yum install kmod-joydev
This driver is part of the ElRepo extra repository (so install that one first if you haven't already done so).

The first time I had to explicitly load the module:
modprobe joydev
but after later boots this does not seem to be required anymore.

The next step is to calibrate the "joystick" (i.e. the steering wheel which acts as a joystick, really). For this I managed to get two different tools running:
  1. jscalibrator, which comes with libjsw (you can skip step 1 of the install steps, since we've already installed a joystick driver)
  2. jstest-gtk, which is the nicer tool of the two. I had to run:
    yum install scons gtkmm24-devel
    before I could compile this one (by running "scons")

The final step is to set SDL_JOYSTICK_DEVICE before running Tuxracer (!):

setenv SDL_JOYSTICK_DEVICE /dev/input/js0

(or if you're running bash:
export SDL_JOYSTICK_DEVICE=/dev/input/js0

That should be it. As always, send me a note (using the form below) if something didn't work, you have a better solution, etc..

← back to notes and tips index
Please do not copy the text of this tip (© Patrick Min) to your web site.