running Dyalog as root

For Raspberry Pi specific issues .. more general issues will appear in UNIX and Linux

running Dyalog as root

Postby ray on Fri Aug 11, 2017 1:09 pm

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"?
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 110
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: running Dyalog as root

Postby AndyS|Dyalog on Fri Aug 11, 2017 2:33 pm

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.
User avatar
AndyS|Dyalog
 
Posts: 165
Joined: Tue May 12, 2009 6:06 pm

Re: running Dyalog as root

Postby ray on Sun Aug 13, 2017 8:05 am

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.
Ray Cannon
Please excuse any smelling pisstakes.
User avatar
ray
 
Posts: 110
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 1 guest