How to run JBang with sudo? #1229
-
I'm creating a Pi4J example with JBang. Problem: the underlying native libraries needs to be called with 'sudo' to control the GPIO of a Raspberry Pi, and that seems to cause problems to run JBang. Do you happen to have some kind of guidance for this specific topic? My current draft content: https://github.com/Pi4J/pi4j.github.io/blob/main/content-draft/jbang.md When following this approach:
Sidenote: sudo is required because of how PiGpio is used as the underlying native library that actually handles the GPIO-interfacing. We are looking how we can prevent/work-around this, but are stuck with it at this moment... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hmm - so the issue is that jbang is not set up in the sudo context. What PATH is available ? If you installed with curl then doing “sudo ~/.jbang/bin/jbang …” should work ? |
Beta Was this translation helpful? Give feedback.
Hmm - so the issue is that jbang is not set up in the sudo context.
What PATH is available ?
If you installed with curl then doing “sudo ~/.jbang/bin/jbang …” should work ?