I am going crazy here and am mega frustrated. I searched through forums for days now and tried all kind of different solutions. Most frustrating is, how blogposts and answers from 10 years ago are shown when searching and they do not work.
I have a python script that has various subloops. Mainly it is showing an image via Pygame, polling GPIO to which a RFID reader is connected and communicating via httpget with a network server.
Following code is in
crontab -e
@reboot (/bin/sleep 10; /home/admin/NinjaMazeSystem/autostart.sh >> /home/admin/NinjaMazeSystem/log 2>&1)
this calls
the autostart.sh that is called looks as follows:
#!/bin/bashcd /home/admin/NinjaMazeSystem/localcopypython3 NinjaMazeClient.py
as I had an error for missing XDG_Runtime_Dir I added this code to the beginning of my python code and it solved the error
if "XDG_RUNTIME_DIR" not in os.environ: os.environ["XDG_RUNTIME_DIR"] = "/tmp/runtime-root"
the log file shows what usually the console will output but no image is shown. How do i boot into my pygame app including the screen!?
I also tried using the /etc/..../autostart..