Skip to main content
1 of 2
S0AndS0
  • 196
  • 1
  • 1
  • 7

The dirty trick I've used on RPi in the past was to put commands in my /etc/rc.local file just before the exit 0 line. In your case I'd try the following line and reboot.

python /full/path/to/file.py &

As you've stated that sudo level permissions are needed you may have to instead adjust the su command you've previously tried because right now it looks like you're trying to run under the pi user.

One warning about my suggestion of rc.local file usage, if your script exits with non zero status you'll not complete the boot so to be safer during tests you can try the following to ensue exit still equals 0

python /full/path/to/file.py & || exit 0
S0AndS0
  • 196
  • 1
  • 1
  • 7