We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 243b4a7 commit a0d5cd7Copy full SHA for a0d5cd7
java/libraries/io/src/processing/io/LED.java
@@ -87,7 +87,10 @@ public LED(String dev) {
87
String fn = "/sys/class/leds/" + dev + "/trigger";
88
int ret = NativeInterface.writeFile(fn, "none");
89
if (ret < 0) {
90
- throw new RuntimeException(fn + ": " + NativeInterface.getError(ret));
+ if (ret == -13) { // EACCES
91
+ System.err.println("You might need to install a custom udev rule to allow regular users to modify /sys/class/leds/*.");
92
+ }
93
+ throw new RuntimeException(NativeInterface.getError(ret));
94
}
95
96
0 commit comments