Log in as root

 1,编辑/etc/lightdm/lightdm.conf:
gedit  /etc/lightdm/lightdm.conf

[Seat:*]
autologin-guest=false
autologin-user=root
autologin-user-timeout=0
greeter-session=lightdm-gtk-greeter

2,编辑/root/.profile文件,增加tty -s &&:
gedit /root/.profile 

if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

tty -s && mesg n || true

3. reboot

 

Guess you like

Origin www.cnblogs.com/wenlin-gk/p/10961035.html