-
Notifications
You must be signed in to change notification settings - Fork 45
Linux non root access
Ricardo De Peña edited this page Dec 20, 2016
·
2 revisions
If you are in Linux and your are using node-hid by passing the "forceNodeHid": true option, you will notice that you will not be able to connect to the controller unless you are root. This can be mitigated by providing a udev rule file for that controller.
I followed node-hid's docs and made rule files for the Dual Shock 3 and DualShock 4 controllers that have been tested in Ubuntu and Antergos:
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0268", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
SUBSYSTEM=="input", GROUP="input", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE:="666", GROUP="plugdev"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
- Create either
61-dualshock3.rulesor41-dualshock4.rulesin/etc/udev/rules.d/ - Reload the rules
sudo udevadm control --reload-rules - Now disconnect/connect the controller