Install and Use USB-Based Gamepads in Ubuntu

Game Pad Stock Image

Have you ever wanted to use your gamepad or controller to play your favorite classic console games in linux? I know I have, and I purchased a cheap Gravis GamePad Pro (USB) just so that I could play all my classics on my computer… Of course, to my demise, I had trouble installing the usb controller and I could not find much information over the internet. Most of the information had been scattered about so I decided to combine it all and write a quick installation and usage guide.You should begin by entering the following command into terminal:

sudo apt-get update

Followed by:

sudo apt-get install joystick

Make sure to set joystick to load at boot time. Now I left my controller plugged in 24/7 and it works without setting joystick to load at boot but I still recommend doing so.This last section is easy so if you are lazy, you can simply copy and paste the next set of commands. First we must install jscalibrator:

sudo apt-get install jscalibrator

Once that is completed, plug in your USB-based gamepad and wait a few moments. We must set up gamepad one by entering the following code into terminal:

sudo chmod 666 /dev/input/js0

If you have any other gamepads, just repeat this last step but incrementing the variable [js] by intervals of one, ie:

sudo chmod 666 /dev/input/js1

And you are now done, try out your controller with an emulator of a classic console or use it on one of your favourite linux-based games! And be sure to leave comments and suggestions, if something could be fixed or it does not work, leave a comment and I will respond as soon as I get it. :)

(Disclaimer: This information was compiled from multiple sources and from various comments on multiple blogs and message boards.)

13 Responses to “Install and Use USB-Based Gamepads in Ubuntu”

  1. TK Says:

    Thanks! This seems to have worked.

  2. leonidas Says:

    Thanks. Worked fine here under Kubuntu 7.10

    All I had to do was install ‘joystick’ and after replugging my gamepad, kcontrol module for joystick calibration detected it without doing anything special.

  3. booster Says:

    thanks alot man….this realy helped me out, i just cant belive it was so easy to do…lol…again thank you

  4. reaper Says:

    thanks m8 works like a charm

  5. bornagainpenguin Says:

    Thanks for this! I was skeptical but it actually worked on my Gutsy install. (I was skeptical because I’d been trying without success for so long,) But this worked! Now if I can oly get zsnes to stop insisting all my roms are bad….

  6. Mike Says:

    I am having problems with the Joysticks on my Logitech Dual Action (cheapo) USB controller. Ive used the jscalibrator and it calibrates the joysticks… but the emulators and games im using arent picking them up. what do you recommend?

  7. Spooky Says:

    Thanks for your efforts. I have a question, do you know why x-mame may not recognize the digital directional pad? The buttons work perfectly. Thanks again!

  8. TJG Says:

    Thanks, works fine with Ubuntu 8.04

  9. Fujaru Says:

    Thanks! works fine with my Ubuntu 8.04 too. It was so easy to do and just works.

  10. Spyter Says:

    Yeah Im a bit amazed it was that easy too. Appreciate the time you put into this comprehensive walkthrough. I hope to eventually understand why I did what i just did to make it work but at least it works for now.

  11. Brian Says:

    Thanks! New to linux, and this was easy, thanks to your instructions. Working on Fluxbuntu.

  12. Very Greatful Says:

    Thanks a lot man. I had just purchased a new gamepad without thinking about if it would be supported in linux or not, but this works great…

  13. CR Says:

    I have search and tried hundreds, at least it seems that way, and cannot get my usb gamepad to work. Including yours didnot work. I am assuming it is recognize because in the games i can use some of the buttons but i can not use analog or when they do work left looks up, right looks down, down looks right, and so on. If you could help I would appreciate it so much.


Leave a Reply