Running Lazarus IDE with rpi_hal lazarus / 32-Linux ---------------------------------------------------------------------- recog1 · 2020-09-11 14:12 Greetings all LAZ users! ....  PRIOR THREAD:   https://forum.lazarus.freepascal.org/index.php/topic,1 8118.msg110042.html#msg110042 [ ALSO, reminder to use "-dUseCThreads" in "Compiler Options" and "Custom Options" .... ] HAPPY to discover that from a terminal window ["sudo su"], run the LAZ shell so as to run LAZ with "rpi_hal" .... root@raspberrypi:/home/pi/Development/FreePascal/lazarus# sudo ./lazarus.sh RUNS LAZ IDE and allows "rpi_hal" to access GPIO ... ANY other ideas on this? ... Such as a simpler way from the Raspbian desktop? ... A way to start from Raspbian desktop "lazarus-ide" as root? ---------------------------------------------------------------------- MarkMLl · 2020-09-11 20:15 Quote from: recog1 on September 11, 2020, 04:12:17 pmANY other ideas on this? ... Such as a simpler way from the Raspbian desktop? ... Oh dear... do you mean that Raspbian /still/ doesn't have an easy way to add entries to the menu? QuoteA way to start from Raspbian desktop "lazarus-ide" as root? Why do you want to do that. Roughly translated: you don't want to do that... MarkMLl ---------------------------------------------------------------------- avra · 2020-09-12 19:13 From https://wiki.freepascal.org/Lazarus_on_Raspberry_Pi#Native_hardwa re_access: QuoteThe code may at first require to be run as root, i.e. either from a root account (not recommended) or via su. A better option is to add the user to the gpio group, the i2c group and the spi group. ---------------------------------------------------------------------- recog1 · 2020-09-15 11:42 Thanks guys for the reply...... However, I do NOT want to run "rpi_hal" as ROOT... In contrast I discover that a "wiringPi" program compiled in C, runs the GPIO pins as user "Pi" (or as ROOT)... Gordon's "wiringPi" is "installed"? ... CAN "rpi_hal" be likewise "installed" somehow? ... Is it a matter of "group memberships"? ... ---------------------------------------------------------------------- MarkMLl · 2020-09-15 13:24 Quote from: recog1 on September 15, 2020, 01:42:29 pmIs it a matter of "group memberships"? ... Go back and read Avra's last message, and the message he quoted. If for some reason group membership is inadequate, you can use POSIX capabilities. OK, /I/ can use POSIX capabilities... Starting an application program as root (or using elevated capabilities) isn't too bad, provided that you revert/relinquish before starting to run the main code. By and large you can do that in the .lpr file, before the forms are initialised. but there is ABSOLUTELY NO REASON to run- and I quote you here '"lazarus-ide" as root?' MarkMLl ---------------------------------------------------------------------- avra · 2020-09-15 14:11 Quote from: recog1 on September 15, 2020, 01:42:29 pmHowever, I do NOT want to run "rpi_hal" as ROOT... Did you read this part? QuoteA better option is to add the user to the gpio group, the i2c group and the spi group.