If you want a program or script to run when the system starts up, then this can be done using systemctl. This method is universal: autorun also works on headless servers, not just when you enter a graphical desktop environment. This method is universal and will work on all systems where systemctl is present (e.g. Debian, Linux Mint, Ubuntu, Kali...