I've compiled an xpad module from the xpad.c and xpad.h from this CVS for my Ubuntu Gusty installation in order to get my XBox Wireless Controller Reciever (for PC) working. For the most part it does, which is great. However, I have noticed a couple of things that keep it working the way *I think* it should be.
The permissions and groups of the devices created in /dev/inputs aren't what I think they should be. More specifically /dev/input/event* and if I am correct, /dev/input/mouse1 (on my system).
The files get created with the following attributes.
0 crw-rw---- 1 root root 13, 64 2008-01-07 21:09 event0
Unless I alter the above I get the following error messages from zsnes when I start it
Unable to poll /dev/input/event0. Make sure you have read permissions to it.
ManyMouse: 0 mice detected.
I get the same message for all the events. It's interesting about the lack of mouse detection as you will see in a second.
Changing the event*'s permissions or group solves the problem.
$ sudo chmod o+r /dev/input/event*
$ sudo chgrp plugdev /dev/input/event*
If I run zsnes after either of the above commands it starts without any errors, and works great. Also, as I eluded to before it now detects 2 mice, the later of which I assume is mouse emulation written into the xpad driver.
Using ManyMouse for:
Mouse 0: GenPS/2 Genius Mouse
Mouse 1: Macintosh mouse button emulation
Anyway the crux of what I am getting at is that it's my belief that the permissions for /dev/input/event* should have be 664 or the group set to plugdev just like js*. Is that correct or am I missing something?
Also is there any reason not to create symbolic links /dev/js* to /dev/input/js*? For some reason my gxmame settings aren't sticking and this seems like easy solution (which does work).
(sorry for the post length, but I wanted to be thorough.)
Log in to post a comment.