What OS and Pi are you using and which version of pygame?
On 4B, 400, and Pi5 with 2GB of RAM or more running RPiOS Bookworm the default desktop is wayland/wayfire so the X related startup methods won't work.
In my experience, pygamev2 needs the desktop so cron is unlikely to be sucessful. cron also runs in a limited environment and the error you quoted indicates this is part of the problem as the enivronment variable XDG_RUNTIME_DIR is not set.
[shameless self promotion]
Running A Program At Start Up A Beginner's Guide specifically sections 5, 6, and 8.
Cron – A Beginner's Guide
[/shameless self promotion]
On 4B, 400, and Pi5 with 2GB of RAM or more running RPiOS Bookworm the default desktop is wayland/wayfire so the X related startup methods won't work.
In my experience, pygamev2 needs the desktop so cron is unlikely to be sucessful. cron also runs in a limited environment and the error you quoted indicates this is part of the problem as the enivronment variable XDG_RUNTIME_DIR is not set.
[shameless self promotion]
Running A Program At Start Up A Beginner's Guide specifically sections 5, 6, and 8.
Cron – A Beginner's Guide
[/shameless self promotion]
Statistics: Posted by thagrol — Fri Oct 11, 2024 7:42 pm