Dietpi - chromium not working properly

I am using chromium as in my application run process to show it on monitor and it is showing some errors

Openbox-Message: Unable to find a valid menu file "/var/lib/openbox/debian-menu.xml"
[3] [2732:2732:1112/100419.413880:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=egl-gles2,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].
[3] [2732:2732:1112/100419.488346:ERROR:viz_main_impl.cc(181)] Exiting GPU process due to errors during initialization
[3] [2811:2811:1112/100420.662874:ERROR:gl_factory.cc(102)] Requested GL implementation (gl=egl-gles2,angle=none) not found in allowed implementations: [(gl=egl-angle,angle=default)].

I reinstalled the menu and mesa-utils but no luck and
is there in dietpi any better way to start my application
right now it goes like this

concurrently --handle-input \
  "taskset -c 0 bash $GITHUB_UPDATES" \
  "taskset -c 1 bash -c 'cd \"$SERVER_DIR\" && npm run prod' || echo 'Server failed'" \
  "taskset -c 2 node \"$SERVE_UI\" || echo 'Live server failed'" \
  "taskset -c 3 bash $OPEN_BROWSER || echo 'Browser launch failed'"

and the chromium script

#!/bin/bash

# Loop until localhost:3000 is reachable
while ! curl -s http://localhost:3000 > /dev/null; do
  echo "Waiting for localhost:3000 to be available..."
  sleep 2
done
echo "localhost:3000 is available. Starting X server with Openbox and Chromium..."
# Ensure no lingering Chromium or X server processes
pkill -x chromium || true
pkill -x Xorg || true
# Start Xorg with Openbox on display :0 in the background
Xorg :0 &
# Give X server time to initialize
sleep 3
# Start Openbox as the window manager on :0
export DISPLAY=:0
openbox &
# Launch Chromium in full screen
CHROMIUM_FLAGS="\
  --kiosk \
  --start-fullscreen \
  --no-sandbox \
  --disable-infobars \
  --cursor-hide \
  --autoplay-policy=no-user-gesture-required \
  --new-window \
  --gl=egl-angle \
  --angle=default"
# Run Chromium with the specified flags
chromium $CHROMIUM_FLAGS http://localhost:3000

I don’t know why but I think that there has to be some better way of doing this.

1 Like