Auto Login

Edit file /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf to add the configuration below:

1
2
3
[SeatDefaults]
greeter-session=lightdm-gtk-greeter
autologin-user=khadas
  • For tty1-tty6
1
khadas@Khadas:~$ sudo sed -i "s/ExecStart=.*/ExecStart=-\/sbin\/agetty --noclear --autologin root \%I \$TERM/g" /lib/systemd/system/getty@.service
  • For ttyS0
1
khadas@Khadas:~$ sudo sed -i "s/ExecStart=.*/ExecStart=-\/sbin\/agetty --autologin root --keep-baud 115200,38400,9600 \%I \$TERM/g" /lib/systemd/system/serial-getty@.service
Reboot to take effect.