Auto strat app on desktop use

Guys I am looking for help on how to setup an auto start of an app once desktop is running.

I tried boot scripts via dietpi-config > AutoStart options > Custom. I added my command to /var/lib/dietpi-autostart/


# - Chromium
#xinit chromium

# - LXDE

# - Print hello
#echo -e "Hello"

#---Put your code below this line---
echo -e "Start in few second"
sleep 15
echo -e "start"
sleep 4
sleep 10

but durring the sleep, i could see on the console the login banner ask to “hit enter” and then when the command startx is call the desktop start but i got an error popup “no session for pid 658” then the electron-tutorial-app didn’t strat. :cry:

however when i call the command

systemctl status dietpi-autostart_custom

i got an “Active: active (running)”

hope i was clear

Much Thanks in advance


many thanks for your message. I guess you are trying to start automatically an application once desktop was started. Correct?

dietpi-autostart/ might not be the correct place.

Maybe you can have a look to the following links

hi Joulinar :slight_smile:

It works !!

I used the methode 1 of with the add of the ligne


to the /etc/xdg/lxsession/LXDE/autostart.

Thanks for you help ! :slight_smile: