首先修改/etc/lightdm/lightdm.conf,设置autologin-user=root
并且按照ubuntu root账户登录时候报stdin:is not tty 进一步修改,防止登录时发生错误。