1.使用命令打开配置文件,命令如下:
sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
2.修改配置文件,添加如下内容
[SeatDefaults]
autologin-user=root
user-session=ubuntu
greeter-show-manual-login=true
3.修改profile文件
#前提是root权限
gedit /root/.profile
添加 tty -s &&