Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Troubleshooting • Python Program will not autostart

$
0
0
I have programed several projects to autorun a python script on startup. I now have this program that does not start. I think it has something to do with the Raspberry Pi camera. Using a Pi4 running Bookworm.

Here is the program located in the /home/dsh/Documents folder:

from picamera2 import Picamera2, Preview
from libcamera import Transform
picam2 = Picamera2()
picam2.start_preview(Preview.QTGL, x=100, y=200, width=800, height=600, transform=Transform(vflip=1))
picam2.start()

I've tried @reboot python3 /home/dsh/Documents/recall.py. in crontab
and
[Desktop Entry]
exec=python3 /home/dsh/Documents/recall.py
in /etc/xdg/autostart/recall.desktop

On startup, there looks like a brief, blip before the desktop appears.

Any help much appreciated.

Statistics: Posted by makingwithheld — Mon Nov 24, 2025 11:30 pm — Replies 5 — Views 91



Viewing all articles
Browse latest Browse all 7503

Trending Articles