AutoStart: Kiosk Mode AND Custom script?


I am setting up DietPi in Kiosk mode and have everything running properly. (the Pi comes up in Kiosk mode, utilizing the 7" touch screen, hitting YouTube website for testing)

I’ve also installed Node.js and have a local website that runs in the background through a Custom Autostart script using Forever.

The catch is I can’t do both at the same time. I either have to choose “Chromium” as the AutoStart Option, or “Custom” script. (I want the kiosk mode to point to the local website) Is there a simple command to add to my custom script that will launch the Kiosk Mode script or is there another best practice I should follow to achieve this?



You could try to start your Webserver using a systemd service. This way the Webserver is started independent from any login process and could run in parallel to your kiosk mode.

Thanks for the suggestion. In looking at systemd service, I noticed the following file:


which runs my custom script:


So I just duplicated that file to:


and enabled it:

systemctl enable webserver.service

Then I went back into dietpi-config and set AutoStart to Chromium and it all works!



good that it i working this way.