if [ -z $DISPLAY ] && [ $(tty) = /dev/tty1 ] then startx -- -nocursor exit sudo reboot fi # Version 1.0: # Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.