The install script, and the "manual instructions" show that install of flask (and requests & python-dotenv) is done as an unprivileged user.
However, the installed tinyprogrammer.service works by calling python main.py as root.
For me, this means that the service fails to continue, because main.py halts when it finds "no module named flask"
I see others have installed flask as root, post install.
Instead, I altered the tinyprogrammer.service to run main.py as user not root.
I think both methods work.
My method was to edit the line in tinyprogrammer.service as follows: (Set to your raspberry pi username.)
#ExecStart=/usr/bin/python3 /home/<user>/TinyProgrammer/main.py
ExecStart=runuser -l tprog -c /home/<user>/TinyProgrammer/startmain.sh
and startmain.sh is
#!/bin/bash
python /home/<user>/TinyProgrammer/main.py
For me, this works and program runs as user not root.
However, currently I would expect that TinyProgrammer will not run 'out of the box', without intervention to make it run.
I have now a small family of them - so pleased!
The install script, and the "manual instructions" show that install of flask (and requests & python-dotenv) is done as an unprivileged user.
However, the installed tinyprogrammer.service works by calling python main.py as root.
For me, this means that the service fails to continue, because main.py halts when it finds "no module named flask"
I see others have installed flask as root, post install.
Instead, I altered the tinyprogrammer.service to run main.py as user not root.
I think both methods work.
My method was to edit the line in tinyprogrammer.service as follows: (Set to your raspberry pi username.)
and startmain.sh is
For me, this works and program runs as user not root.
However, currently I would expect that TinyProgrammer will not run 'out of the box', without intervention to make it run.
I have now a small family of them - so pleased!