vr.js icon indicating copy to clipboard operation
vr.js copied to clipboard

Improved udev rule?

Open jjsmclaughlin opened this issue 11 years ago • 0 comments

I've now managed to get the vr.js experimental usb driver working on linux. I stumbled upon an article which clarifies the difference between the PROGRAM and RUN assignments in udev rules:

http://www.reactivated.net/writing_udev_rules.html#external-run

I think it suggests that RUN would be a better assignment than PROGRAM for the udev rule contained in 'experimental/usb-driver/hacks/40-oculus.rules'. So the new rule would be:

SUBSYSTEM=="usb", ATTR{idVendor}=="2833", ATTRS{idProduct}=="0001", MODE="0664", GROUP="plugdev", RUN+="/bin/sh -c 'echo -n $id:1.0 >/sys/bus/usb/drivers/usbhid/unbind'"

I've checked this and it still works. It also might be worth pointing out that a user may not have the "plugdev" group on their system (depends on distro). This just needs to be any group that the user who'll be running the usb-driver belongs to.

jjsmclaughlin avatar Jun 02 '14 09:06 jjsmclaughlin