Linux gamepad support and /dev/input/event permissions

Started by
0 comments, last by pjcast 14 years, 2 months ago
Hello all- I've been working on a simple gamepad library. Eventually it will be multiplatform, but I've developing the alpha on linux. So far, everything has gone well. I've been using the linux input event model, using /dev/input/eventX files, to read and write to the attached devices. For instance, I've been able to read a variety of USB-attached gamepads and get rumble working, etc. However, with the latest Fedora release (12) I notice that permissions to /dev/input/eventX files have been restricted to root only. The kernel creates a /dev/input/jsX file for joysticks and gives it world-readable permissions, but that device doesn't support force feedback, and even if it did, the permissions would have to be writeable. In effect, the existing kernel permissions model makes truly interactive devices (with force feedback or any information flowing back to the physical device) impossible without root privileges or yet another daemon process to translate. Does anyone know what is going to happen here? I have no idea how I'm supposed to write a gamepad library now. Obviously I could write a gamepad daemon and ask all distributions to pick it up but that seems pretty silly. Hopefully someone on these boards has more information. -Thomas
Advertisement
You can write some udev rules that create the proper permissions for those files. I agree, that the stock rules simple suck.

This topic is closed to new replies.

Advertisement