Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved udev rule? #28

Open
jjsmclaughlin opened this issue Jun 2, 2014 · 0 comments
Open

Improved udev rule? #28

jjsmclaughlin opened this issue Jun 2, 2014 · 0 comments

Comments

@jjsmclaughlin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant