编辑文件/usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
增加如下配置:
1 | [SeatDefaults] |
- 对于tty1-tty6
1 | khadas@Khadas:~$ sudo sed -i "s/ExecStart=.*/ExecStart=-\/sbin\/agetty --noclear --autologin root \%I \$TERM/g" /lib/systemd/system/getty@.service |
- 对于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 |
重启系统生效。