Linux - problems detecting information about components

Hello. I am using the following version of jinput:
jinput_linux_2005-12-04.tgz
java version = 1.5.0_06 from Sun
Running 2.6.15 under gentoo with gcc 3.4.5

Output of ControllerReadTest is below.
Everything about the component is null except for the value of it (take a button, it reports off or on but it does not report its name).

I am running the test with the following where everything is in the current directory.


java -Djava.library.path=. -classpath .:jinput.jar net.java.games.input.test.ControllerReadTest


OS name is: Linux
Linux plugin is supported
OS name is: Linux
Linux plugin is supported
Initing JInputLibrary
Shutdown thread created and run
Initing event interface
Initing joystick interface
Trying to open /dev/input/js0
Opened /dev/input/js0, trying to get device name
Getting button and axes information for /dev/input/js0
Initialisation of /dev/input/js0 completed
Trying to open /dev/input/js1
Opened /dev/input/js1, trying to get device name
Getting button and axes information for /dev/input/js1
Initialisation of /dev/input/js1 completed
Getting the number of event devices
Getting 0 event devices
Getting the number of joystick devices
Getting 2 joystick devices
Copying joystick device 0 to jinput device list 0
Copying joystick device 1 to jinput device list 1
Waiting on monitor
Gettign device name for jinput device 0.
jinput device 0 is 136168360
Gettign device name for jinput device 0, (Saitek Saitek X45)
Gettign number of absolute axes for jinput device 0 (8)
Gettign number of relative axes for jinput device 0 (0)
Gettign number of buttons for jinput device 0 (26)
Java working on device Saitek Saitek X45
Getting bus type for device 0
Getting supported buttons for jinput device 0
Getting suported relative axes for jinput device 0
Getting suported absolute axes for jinput device 0
Getting fuzz data for axis 0 on device 0
Getting absolute axes minimum value data for axis 0 on device 0
Getting absolute axes maximum value data for axis 0 on device 0
Getting fuzz data for axis 1 on device 0
Getting absolute axes minimum value data for axis 1 on device 0
Getting absolute axes maximum value data for axis 1 on device 0
Getting fuzz data for axis 2 on device 0
Getting absolute axes minimum value data for axis 2 on device 0
Getting absolute axes maximum value data for axis 2 on device 0
Getting fuzz data for axis 3 on device 0
Getting absolute axes minimum value data for axis 3 on device 0
Getting absolute axes maximum value data for axis 3 on device 0
Getting fuzz data for axis 4 on device 0
Getting absolute axes minimum value data for axis 4 on device 0
Getting absolute axes maximum value data for axis 4 on device 0
Getting fuzz data for axis 5 on device 0
Getting absolute axes minimum value data for axis 5 on device 0
Getting absolute axes maximum value data for axis 5 on device 0
Getting fuzz data for axis 6 on device 0
Getting absolute axes minimum value data for axis 6 on device 0
Getting absolute axes maximum value data for axis 6 on device 0
Getting fuzz data for axis 7 on device 0
Getting absolute axes minimum value data for axis 7 on device 0
Getting absolute axes maximum value data for axis 7 on device 0
Getting supported buttons for jinput device 0
Getting FFEnabled status for device 0
Java code thinks FF is disabled for device Saitek Saitek X45
Gettign device name for jinput device 1.
jinput device 1 is 136165296
Gettign device name for jinput device 1, (Logitech Logitech(R) Precision(TM) Gamepad)
Gettign number of absolute axes for jinput device 1 (2)
Gettign number of relative axes for jinput device 1 (0)
Gettign number of buttons for jinput device 1 (10)
Java working on device Logitech Logitech(R) Precision(TM) Gamepad
Getting bus type for device 1
Getting supported buttons for jinput device 1
Getting suported relative axes for jinput device 1
Getting suported absolute axes for jinput device 1
Getting fuzz data for axis 0 on device 1
Getting absolute axes minimum value data for axis 0 on device 1
Getting absolute axes maximum value data for axis 0 on device 1
Getting fuzz data for axis 1 on device 1
Getting absolute axes minimum value data for axis 1 on device 1
Getting absolute axes maximum value data for axis 1 on device 1
Getting supported buttons for jinput device 1
Getting FFEnabled status for device 1
Java code thinks FF is disabled for device Logitech Logitech(R) Precision(TM) Gamepad
Linux plugin claims to have found 2 controllers
Component count = 34
Component count = 12

So it seems that there is a permissions problem. If I run that very same program as root, then I get all the button names.
Looks like when I look at /dev/input/js* root owns them with read privildeges by everyone but no write.

So does anyone know how to change the group (chgrp) to js* when they are added to the system (since they go away when u unplug and replug the controllers, I don’t want to have to manually change the group to give myself priveldges). Btw, the group I will be using is games.

Hi

The permissions thing is something I keep failing to resolve under ubuntu too. I’ve for a FF controller so I need to write the events.

Endolf

P.S. Have you tried jinput2 beta builds?

OK. So I found a topic on this in the gentoo forums. Looks like the best way of handling permissions is to use the udev rules system.
udev is a 2.6 kernel feature, so not sure what the 2.4 folks will do.

Here is an easy way for folks to get the right permissions on their usb gamepads and joysticks.

Add the following line to /etc/udev/rules.d/10-local.rules (if it doesn’t exist, then create it).


SUBSYSTEM=="input", GROUP="games", MODE="770"

you can run udevstart which should change the permissions. I think a restart might be in order too.

Sources on udev:
http://www.reactivated.net/writing_udev_rules.html
http://gentoo-wiki.com/UDEV