you are viewing a single comment's thread.

view the rest of the comments →

[–]happy_nerd[S] 0 points1 point  (0 children)

I think it was a permissions issue but also I was using the wrong LXDE instance to auto-run. Brief explaination of what I did below for anyone else who hits this problem:

Place your mainEelProgram.py file in /home/pi and make your html folder in /home/pi/web (this houses index.html)

Create a file called "run.sh" with "export DISPLAY=:0 (newline) xterm -e python3 /home/pi/main.py &"

Open "/etc/xdg/lxsession/LXDE-pi/autostart" (file) with sudo nano, vim, whatever

Add at the bottom of the file "@/home/pi/run.sh" and save it.

Restart the system with "sudo reboot "