Page 1 of 1

running Dyalog as root

Posted: Fri Aug 11, 2017 1:09 pm
by ray
In another topic, Jason said
"... the only time you should run Dyalog as root is when you intend on binding on a TCP port lower than 1024 on Linux/Unix,..."

I find that for certain operations involving GPIO pins, one need to have root privileges.

It is not a problem if using command line via ⎕SH as they can be "sudo".

But for ⎕NA calls or ⎕ARBOUT/⎕ARBIN, I believe, Dyalog need to have root permission.

It may be possible to use chmod on the GPIO pins pseudo files such as /sys/class/gpio/gpio26 at run time from within APL via ⎕SH to get round the problem for at least ⎕ARBOUT etc, but I don't think it will work for ⎕NA calls.

Or is there any way to provide the equivalent of "sudo" when setting up ⎕NA "links"?

Re: running Dyalog as root

Posted: Fri Aug 11, 2017 2:33 pm
by AndyS|Dyalog
Hi Ray

No, there is no equivalent in ⎕NA, but I reckon that if you add your user to the gpio group you won't need to run with root privileges to access the pins in question.

Re: running Dyalog as root

Posted: Sun Aug 13, 2017 8:05 am
by ray
Thanks Andy

My user (pi) is already a member of the gpio group.

There is a discussion in ModMyPi on this subject:

https://raspberrypi.stackexchange.com/q ... ng-as-root

(The user JANE in the discussion, is the very knowledgeable lady who wrote the PIGPIO library that I am calling via the ⎕NA call.)

But I have not had any luck with the suggestions (so far).

Thanks again.