Installing joysticks and Game Pads

How do you install usb joysticks and game pads, I can not find clear instruction on the net. I am running 11.4 Classic.

Dunno… plug them in and send the output from:

lsusb

Joystick plugged in.

userone@office2:~$ lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0d8c:0201 C-Media Electronics, Inc. CM6501
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 045e:00dd Microsoft Corp. Comfort Curve Keyboard 2000 V1.0
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 006: ID 07b5:0217 Mega World International, Ltd
Bus 002 Device 004: ID 07d1:3c03 D-Link System AirPlus G DWL-G122 Wireless Adapter(rev.C1) [Ralink RT73]
Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
userone@office2:~$
userone@office2:~$ lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0d8c:0201 C-Media Electronics, Inc. CM6501
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 045e:00dd Microsoft Corp. Comfort Curve Keyboard 2000 V1.0
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 007: ID 07b5:9902 Mega World International, Ltd GamePad
Bus 002 Device 004: ID 07d1:3c03 D-Link System AirPlus G DWL-G122 Wireless Adapter(rev.C1) [Ralink RT73]
Bus 002 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
userone@office2:~$
Game Pad-

Install the joystick package:

sudo apt-get install joystick

Now with the devices plugged in, can you see if there are any files called js0, js1, js2 etc. in the /dev/input directory, and if there are, tell me which ones:

nautilus /dev/input

Yes there is a js0 and a js1 in the by-id folder they are listed as
file:///dev/input/by-id/usb-Mega_World_9902-joystick
file:///dev/input/by-id/usb-MegaWorldectronics_USB_Joystick-joystick

It would seem the system is recognising them then… have you tried them in a game that supports joystick input ?

You could also run:

jstest --normal /dev/input/js0

and

jstest --normal /dev/input/js1

to test them

and/or

jscal /dev/input/js0

and

jscal /dev/input/js1

to calibrate them.

I found a program that tests and calibrates joysticks jstest - gtk now I need a program that I can try them in.

Thanks for your help.

Where did you get jstest-gtk from for 11.04 ? … this info may help others, as it’s not (as far as I can tell) in the repo’s.

[EDIT]

It’s OK, I found them :wink:

jstest-gtk_0.1.0-1 from the GetDeb Apps PPA… insructions to add the PPA can be found here:
http://www.ubuntuupdates.org/ppa/getdeb_apps?dist=natty

Or if (like me) you’d rather not add the PPA repository, you can just download the jstest-gtk_0.1.0-1 package from the links below

32bit version for 11.04:
http://pkgs.org/ubuntu-11.04/getdeb-apps-i386/jstest-gtk_0.1.0-1~getdeb1_i386.deb.html
direct download link
http://archive.getdeb.net/ubuntu/pool/apps/j/jstest-gtk/jstest-gtk_0.1.0-1~getdeb1_i386.deb

64bit version for 11.04:
http://pkgs.org/download/ubuntu-11.04/getdeb-apps-amd64/jstest-gtk_0.1.0-1~getdeb1_amd64.deb.html
direct download link:
http://archive.getdeb.net/ubuntu/pool/apps/j/jstest-gtk/jstest-gtk_0.1.0-1~getdeb1_amd64.deb

Pleased you found it, by the way what’s wrong with PPA repository they seem to have some interesting items?

Nothing wrong with PPA’s as long as they specialise in what they add to your package manager… but getdeb have a LOT of software, some of which is different versions of software/libraries already included in Ubuntu… so when you run sudo apt-get upgrade, it will upgrade programs and dependencies you may not want upgrading, making changes to your system (that may become problematic) harder to keep track of… just a personal choice thing really.

There is nothing wrong with adding the getdeb PPA, installing ONLY what you want, then disabling it though :wink:

All I’m saying is it may upgrade things you don’t expect… or want… which may introduce problems that are harder to resolve later on… so I prefer to be selective.