1 2 3 4 5 6
#!/bin/sh if [ "$TTY" = "/dev/tty1" ] && [ "$(id -u)" -ne 0 ]; then exec startx > /dev/null 2>&1 exit fi