Skip to content

Commit

Permalink
Merge pull request #3643 from dorodnic/simple-udev
Browse files Browse the repository at this point in the history
Simplify udev-rules application
  • Loading branch information
ev-mp authored Apr 3, 2019
2 parents edfb6c8 + 4a8ec16 commit e053cc6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ The scripts and commands below invoke `wget, git, add-apt-repository` which may
**Note** on graphic sub-system utilization:<br />
*glfw3*, *mesa* and *gtk* packages are required if you plan to build the SDK's OpenGl-enabled examples. The *librealsense* core library and a range of demos/tools are designed for headless environment deployment.

3. Install Intel Realsense permission scripts located in librealsense source directory:<br />
`sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/` <br />
`sudo udevadm control --reload-rules && udevadm trigger`
3. Run Intel Realsense permissions script located from librealsense root directory:<br />
`./scripts/setup_udev_rules.sh`
<br />

4. Build and apply patched kernel modules for: <br />
Expand Down
20 changes: 20 additions & 0 deletions scripts/setup_udev_rules.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -e

echo "Setting-up permissions for RealSense devices"

exec 3>&2
exec 2> /dev/null
con_dev=$(ls /dev/video* | wc -l)
exec 2>&3

if [ $con_dev -ne 0 ];
then
echo -e "\e[32m"
read -p "Remove all RealSense cameras attached. Hit any key when ready"
echo -e "\e[0m"
fi

sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger

echo "udev-rules successfully installed"

0 comments on commit e053cc6

Please sign in to comment.