running Dyalog as root
3 posts
• Page 1 of 1
running Dyalog as root
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"?
"... 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.
Please excuse any smelling pisstakes.
-
ray - Posts: 238
- Joined: Wed Feb 24, 2010 12:24 am
- Location: Blackwater, Camberley. UK
Re: running Dyalog as root
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.
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.
-
AndyS|Dyalog - Posts: 263
- Joined: Tue May 12, 2009 6:06 pm
Re: running Dyalog as root
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.
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.
Please excuse any smelling pisstakes.
-
ray - Posts: 238
- Joined: Wed Feb 24, 2010 12:24 am
- Location: Blackwater, Camberley. UK
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group