Dear All,
I have a raspberry pi3 with Raspbian 11 "bullseye", kernel 6.1 and the "old X11 server" with LXDE.
I have Node-Red v4 installed and enabled via "sudo systemctl enable nodered.service"
I want that after Node-red is starded and fully working, the web brower automatically open and show the Dashboard: "chromium-browser --kiosk http://localhost:1880/ui"
Which is the best and better way to do this?
- modify the "/lib/systemd/system/nodered.service" adding:
ExecStartPost=/bin/bash -c "sleep 15 && DISPLAY=:0 chromium-browser --kiosk http://localhost:1880/ui &"
AFTER the line:
ExecStart=/usr/bin/env node-red-pi $NODE_OPTIONS $NODE_RED_OPTIONS
- make a new systemd services: EXAMPLE:
sudo nano /etc/systemd/system/chromium-dashboard.serviceOther way?
adding:
Description=Dashboard Chromium Kiosk Mode.
After=nodered.service
Requires=nodered.service
Display=:0
[Service]
User=pi
Group=pi
Environment=DISPLAY=:0
ExecStartPre=/bin/sleep 30 # ritardo avvio...
ExecStart=/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk http://localhost:1880/ui
Restart=on-failure
RestartSec=5
[Install]
WantedBy=graphical.target`
Thanks in advance