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

Raspberry Pi OS • Re: Delay Auto Start by 30s.

$
0
0
You didn't say which OS you're running, which Desktop backend you're using, or which autostart file you edited. On the first two I'm guessing RPiOS and X11/lxde rather than one of the wayland options that came in almost two years ago with Bookworm.

A fiixed delay is an ugly hack and I strongly recommend against using one. 30s might work today, it might not tomorrow.

Option 1 (Best): Use a systemd service that depends on network-online.target to start chromium rather than autostart.

Option 2: Us a wrapper script based on the following pseudo code:

Code:

while I can't ping the server; do    sleep 5 secondsdonestart chromium
Before you ask, no, I'm not going to write it for you.

Option 3 (Worst): Us a wrapper script based on the following pseudo code:

Code:

sleep 30 secondsstart chromium
Be aware that this will delay 30 seconds before a restart too (e.g. as triggered by the @ prefix)

[shameless self promotion]
Some suggested reading: Running A Program At Start Up A Beginner's Guide
[/shameless self promotion]

Statistics: Posted by thagrol — Fri Aug 01, 2025 2:27 pm



Viewing all articles
Browse latest Browse all 3546

Trending Articles