Hi @b36401
I have find the solution. it's hard to do in systemd(maybe it's new for me):
1. create environmen file chromium first:
cat /etc/default/chromium
#OPTARGS="--xwayland --use-g2d=1"
XDG_RUNTIME_DIR="/run/user/0"
2. create a chromium.service file at /etc/systemd/system/chromium.service , put in the environmen file like following:
[Unit]
Description=launch chromium
[Service]
User=root
Type=oneshot
ExecStart=/bin/sleep 20
EnvironmentFile=-/etc/default/chromium
ExecStart=/usr/bin/chromium --no-sandbox --gpu-no-context-lost --enable-gpu-rasterization --start-fullscreen --kiosk --no-first-run --incognito http://localhost:3300/rpi.html > /dev/null 2>&1 &
[Install]
WantedBy=multi-user.target
3. run: systemctl enable chromium or
directly make a symbol link at :
/etc/systemd/system/multi-user.target.wants/chromium.service -> /etc/systemd/system/chromium.service
at /etc/systemd/system/multi-user.target.wants/. to run ln -s chromium.service ../chromium.service to make this link
.
try to run systemctl start chromium to test. works well.
power off and power on or restart . work well.
done
Thank you