Skip to content

Commit b0a08c7

Browse files
Clément VillemurCalcProgrammer1
authored andcommitted
Added instructions to install udev rules for immutable systems
1 parent c541716 commit b0a08c7

2 files changed

Lines changed: 10 additions & 27 deletions

File tree

Documentation/UdevRules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ If you are using OpenRGB compiled from source (not as part of a package), using
1010

1111
* If you have installed OpenRGB from a package then latest udev rules are installed locally at `/usr/lib/udev/rules.d/60-openrgb.rules`
1212
* Udev rules are built from the source at compile time. When building locally they are installed with the `make install` step to `/usr/lib/udev/rules.d/60-openrgb.rules`
13-
* If you need to install the udev rules file manually you can also download the [latest compiled udev rules](https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/artifacts/master/raw/60-openrgb.rules?job=Linux+64+AppImage&inline=false) from Gitlab.
14-
- Copy this 60-openrgb.rules file to `/usr/lib/udev/rules.d/`
13+
* If you need to install the udev rules file manually you can also download the [latest compiled udev rules](https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/artifacts/master/raw/60-openrgb.rules?job=Linux+amd64+AppImage&inline=false) from Gitlab.
14+
- Copy this 60-openrgb.rules file to `/usr/lib/udev/rules.d/` or to `/etc/udev/rules.d/` if you're on an immutable system.
1515
- Then reload rules with `sudo udevadm control --reload-rules && sudo udevadm trigger`
1616
* There is also a [udev rules installation script available at openrgb.org](https://openrgb.org/udev.html).

scripts/openrgb-udev-install.sh

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
11
#! /bin/bash
22

3-
STEAMOS=0
4-
STEAMOS_READONLY=0
5-
6-
# Test for SteamOS and disable readonly mode if we're running on it
7-
if command -v steamos-readonly >& /dev/null
8-
then
9-
# Test if SteamOS readonly mode is enabled
10-
if sudo steamos-readonly status | grep 'enabled'
11-
then
12-
echo "steamos readonly mode is true"
13-
STEAMOS_READONLY=1
14-
fi
15-
16-
STEAMOS=1
17-
sudo steamos-readonly disable
18-
fi
19-
203
# Download udev rules file
214
wget https://openrgb.org/releases/release_0.9/60-openrgb.rules
225

23-
# Move udev rules file to udev rules directory
24-
sudo mv 60-openrgb.rules /usr/lib/udev/rules.d
6+
# If we don't have write permissions then we're running on an immutable distro
7+
if sudo test -w /usr/lib/udev/rules.d;
8+
then
9+
# Move udev rules file to udev rules directory
10+
sudo mv 60-openrgb.rules /usr/lib/udev/rules.d
11+
else
12+
sudo mv 60-openrgb.rules /etc/udev/rules.d
13+
fi
2514

2615
# Reload the rules
2716
sudo udevadm control --reload-rules
2817
sudo udevadm trigger
29-
30-
if [ "$STEAMOS" = 1 ] ; then
31-
if [ "$STEAMOS_READONLY" = 1 ] ; then
32-
sudo steamos-readonly enable
33-
fi
34-
fi

0 commit comments

Comments
 (0)