sudo nano /etc/lightdm/lightdm.conf
如果没有lightdm.conf会自动创建,输入:
[SeatDefaults]
autologin-user=root
user-session=lubuntu
greeter-show-manual-login=true
创建50-ubuntu.conf 注意一定是ubuntu不是lubuntu
sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
输入:
[SeatDefaults]
autologin-user=root
user-session=lubuntu
greeter-show-manual-login=true
修改/root/.profile防止报错
gedit /root/.profile
将文件末尾的 “mesg n”,修改为 “tty -s && mesg n”