OSVR-Core icon indicating copy to clipboard operation
OSVR-Core copied to clipboard

Where should we package/install udev rules for Linux

Open rpavlik opened this issue 9 years ago • 3 comments

We need udev rules installed for Linux. At the very least we need them for the HID devices we can access.

My question is, what is the best, most distribution and yet most hand-builder friendly way of doing this? I've got rules for some Sensics HMDs (both the HID interface and the CDC interface, with the bonus of telling modemmanager to not look on the CDC interface) here: https://gist.github.com/rpavlik/98d21e14a7e6eeb52e95

Known Linux users, please chime in. I'm one of them, but I am not sure what the best practice for installing udev rules files from a CMake build system is.

rpavlik avatar Jan 14 '16 16:01 rpavlik

Those look like the right rules, including both setting permissions and giving names to the devices. We never found a good way to install things on Linux other than putting them into the package manager for each distro.

russell-taylor avatar Jan 18 '16 13:01 russell-taylor

I don't know about conventions either, but is there ar problem simply installing the rule file to /usr/lib/udev/rules.d/? Isn't that the default path on all distributions that use udev? Edit: Yea, thinking first and then writing a message could help. Users may set CMAKE_INSTALL_PREFIX to their own home directory and install with only their user rights. So attempt to install in /usr/lib/udev/rules.d, and have options for when it fails: 1) retry with sudo 2) skip.

By the way, the rules file needs to be updated for the HDK2. I have these three here:

SUBSYSTEM=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0b00", MODE="0666", GROUP="plugdev" # osvr sensors
SUBSYSTEM=="usb", ATTR{idVendor}=="0572", ATTR{idProduct}=="1806", MODE="0666", GROUP="plugdev" # osvr audio
SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="57e8", MODE="0666", GROUP="plugdev" # tracker camera for uvc-camera

and only the first one is included in yours.

A first step would be including this file in the osvr-core repository.

ChristophHaag avatar Aug 28 '16 13:08 ChristophHaag

Hi, I'd like to move this on so I can get a ppa/package together for ubuntu, so I created a pull request which installs the combined rules file to /lib/udev/rules.d. Please let me know if this is not the appropriate approach to getting this issue resolved! Marcus

toastedcrumpets avatar Oct 16 '16 21:10 toastedcrumpets