1.set password for root:
sudo -u root passwd
2.change to root and input password:
su root
3.install vim:
apt-get install vim
4.input “vim /etc/lightdm/lightdm.conf” and input text:
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true
allow-guest=false
3.reboot,and now we can login with root.