Read the statement by Michael Teeuw here.
Autostarts but doesn't run, will run on restart
-
I’m seeing a discrepancy where on boot it’s collecting xorg= blank versus xorg=755 on a stop/start after boot.
-
@ember1205 yes… I see that too…
-
It almost seems like the X desktop isn’t fully initialized when the pgrep command executes and it isn’t collecting info on the process as a result. The restart NEVER happens until X is fully initialized which means that it -can- collect info on the process from a restart or stop/start.
-
@ember1205 yes. I am looking for a resolution…
-
I just edited the run-start.sh script and inserted a ten second sleep before the pgrep command. It’s a bit “extreme”, but should hopefully demonstrate if that’s the issue.
WIthout the sleep, not detecting X simply moves on to a different test instead of trying again at least once before moving on.
-
@ember1205 yes, adding a sleep would ‘fix’ it
if only we knew how LONG to sleep… working on it…
if X is not running then we just launch serveronly and don’t look at its output
-
@sdetweil try 1 second… sleep 1
-
Sleep 10 allows the browser to correctly launch. I will drop to 1 second and validate that it will work or not (if not, I will tweak and tune).
Even with the sleep function ensuring that it allows X to finish initializing, chromium does not start correctly unless I wipe the ~/.config/chromium directory when I shut down.
-
@ember1205 people are constantly fiddling with stuff, you never know what you’re gonna get anymore.
-
Would there be more value in coding in a check for to see if it’s Raspbian or possibly even bullseye and adding a two second sleep if there is?
raspberry_pi=$(grep ID /etc/os-release | cut -f2 -d=) if [ "$raspberry_pi." == "raspbian" ] ; then sleep 2 fi xorg=$(pgrep Xorg)
Maybe there’s a better string to search for, but it might be a stop-gap that would help?