To automatically run a python program when the PIXEL loads, you need to add a command to the autostart file that can be found here:
Here’s the process:
- Open the autostart file: sudo nano /etc/xdg/xsession/LXDE-pi/autostart
- Create a new line above the line beginning: @xscreensaver
- On the new line add the command to start your program or script. NB: You should include the full path name
- Save and exit with ctl x then y then Enter.
- Next time the Pi boots, your program will run.
Mike – G4WNC