修改/etc/gdm/custom.conf
# GDM configuration storage
[daemon]
# Uncoment the line below to force the login screen to use Xorg
#WaylandEnable=false
#TimedLoginEnable=true
#TimedLogin=root
#TimedLoginDelay=1
AutomaticLoginEnable=true
AutomaticLogin=root
[security]
[xdmcp]
[greeter]
[chooser]
[debug]
# Uncomment the line below to turn on debugging
#Enable=true
红色部分需要加的