Linux Joysticks and Gamepads
Setting up a Joystick or Gamepad in Oolite under Linux
[ EDIT: The author of xboxdrv has updated it to also work with non-XBox controllers and to directly accept an INI configuration file. It should be possible to alter oolite.cfg to this INI format. If anyone does this before I get round to it, please post on the [Forums]. ]
Linux distributions such as Ubuntu Lucid have many joystick and gamepad drivers built in. While they work out of the box, they offers limited configurability. Here I will outline a better alternative which works irrespective of whether your Linux distribution includes joystick support.
1. Install [XBoxDrv] - for Ubuntu there is a binary package. Installation instructions are [here].
2. Don't worry about all the stuff about sudo modprobe uinput and changing permissions on /dev/uinput etc.
3. Download [runxboxdrv] a wrapper I wrote to make using xboxdrv very simple. Hopefully, this will be included in a future release of XBoxDrv.
4. Also in the download are an Oolite configuration for xboxdrv: oolite.cfg and a key configuration for Oolite to go with it: keyconfig.plist
5. Extract them to your home folder and move keyconfig.plist to ~/.Oolite/Addons
6. Make runxboxdrv executable eg. chmod +x ~/runxboxdrv
7. Run from a menu icon or shell using: ~/runxboxdrv --cfg ~/oolite.cfg /usr/bin/oolite
8. The only joystick setup needed in Oolite is to set up the axes. The left hand analog stick left-right should be roll. The right hand stick is up, down, left, right.
9. Open oolite.cfg in a text editor to see the mappings of everything else. The option names correspond to those at [xboxdrv manpage] but without the "--"
10. The left shoulder button acts like a shift key and effectively almost doubles the number of buttons.
If you have any problems, post on the [Forums].