How to autostart my c++ program

Hello there

I give images to rgb matrix panels with my non gui rgb matrix panel program.

but I can’t get results even though I add my program to dietpi-autostart nogui autologin section at startup.
./home/dietpi/main &&./main

Did you try to run this script manually from console?

If it is not a long running process but a oneshot task, you may want to add it instead to:


as well probably better to specify the full path to where the script is located.

Jep, works since by default systemd starts in /, i.e. ./ == /, but to rule out issues when starting from a different directory, always use absolute paths.

Interesting, is it probably running too early, is there some hardware detection or other service it must wait for? Quick test would be to add some sleep 10 or so to the script to delay it and see whether it helps. Otherwise what runs in postboot.d is the same as if you’d run it on a local console session on tty1.

not solve :frowning: how to make that