Use USB Gamepads Under Linux
Replace that keyboard with a brand new joystick.
With the advent of Universal Serial Bus (USB) devices, true cross-platform plug-and-play seemed to be within the grasp of every computer user. Well, except Linux users. But don’t worry—using a USB game controller under Linux isn’t that difficult. (Yes, even if it’s a Microsoft Sidewinder pad.)
If you do not already have a USB joystick or gamepad, they can be acquired at practically any computer store, online at Newegg (http://www.newegg.com), Amazon (http://www.amazon.com), approximately one zillion other online retailers, or even your local Radio Shack. The Gravis Gamepad Pro (USB) is a fine entry-level model that should set you back around $20. And of course, if you have a PlayStation 2, Xbox, or other video game console controller lying around, you may want to check out “Use Console Controllers on your PC” [Hack #51] .
In order to use a joystick, you may need to descend into that magical realm known as the Linux kernel, as you are going to need a few kernel modules to make this all work. The first step in this process is to make sure you have the Linux kernel sources. You should refer to your distribution’s documentation on compiling kernels:
- Debian
http://www.debian.org/doc/manuals/users-guide/ch-ctsystem.en.html#s-rak
- Gentoo
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=7
- Fedora
http://crab-lab.zool.ohiou.edu/Kevin/kernel-compilation-tutorial-en/index.html (note that this is not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access