Advertisements
01 Jun

Getting Saitek X52 Joystick Working Within Linux

Now that Steam is available for Linux (How to install article coming soon) I have once again made the switch to 100% Linux. How that I have Steam installed I wanted to start playing Egosoft’s X3 series again, but for best performance this really needs a joystick. This is how I went about installing and using my Saitek X52 joystick in Fedora 18.

The problem is as of Fedora 17 the joydev kernel module was removed by default. The result is when a new joystick is plugged in the require paths in /dev/input/jsX are not being created, so your software and games can not find the device. So we need to reinstall the joydev module.

After installing the kernel joydev module the joystick and all its buttons are detected by the latest kernel (which as of writing is)

The Install Instructions for a fresh install

  1. Even though joydev was stripped from the default kernel it has been bundled into an easy to install package available in the yum repsitory

2. Now the kernel software is installed we need to load it. You can ether take a moment and reboot your PC, the modules will get loaded at boot time, or you can load them your self with modprobe

  1. After the new modules have been loaded you can plug your joystick in and you should see the new paths being created under /dev/input it will be something like /dev/input/js0. You can not test to make sure your joystick is being detected correctly using ‘jstest’

Installing Qjoypad Optional, mapping buttons to the keyboard

The Saitek X52 has over 30 buttons on it so the easiest way to set these up would be mapping them to keyboard shortcuts. Luckly, with a little Googling, I found a fantastic tool for this. Qjoypad is a Qt based program that will just sit in your tray and map any button presses to the associated keyboard shortcut.

There are no binary packages, that I could find, but installing from source is fairly painless. There are alternatives out there, but I haven’t spent any time with them. I found Qjoypad first, and for my purposes, it was perfect. If you find something you think is better please let me know in the comments!

  1. Install Qt dependancy packages

  1. Download the latest version of Qjoypad, as of writing that was 4.1.0
  2. Extract downloaded file

  1. Change directory into main source folder

  1. The distributed config file makes a check for qmake, unfortunitly this will fail in Fedora as the qt-devel package installed qmake as qmake-qt4 so we can just comment out the check in line 14-17

  1. Now run config to generate the Makefile

  1. Edit the new Makefile and append -lX11 to the end of line 19. I’m not ‘up-to-scratch’ with Makefiles and compiling, so I’m not able to give a good reason for this, I just now without it ‘make’ will fail to compile. If someone can explain it better than I leave a comment and I’ll happily update the article

  1. Now as root run the install

  1. Run QJoypad

Qjoypad will run in your system tray and can be opened by double clicking. From there you can setup your profiles and key bindings. There is support for multiple profiles as well so you are able to set different bindings for each of your games and load them as required.

I hope this has been of help to you, I know I’ll be refering to it after my next install. Please leave me a comment bellow if this was of help, or you’ve found any problems.

As always, if you have been, thanks for reading