vim /etc/gdm/custom.conf 增加下面内容

  1. AutomaticLoginEnable=true
  2. AutomaticLogin=rocky # your username

修改结果如下:

  1. # GDM configuration storage
  2. [daemon]
  3. # Uncomment the line below to force the login screen to use Xorg
  4. #WaylandEnable=false
  5. AutomaticLoginEnable=true
  6. AutomaticLogin=rocky
  7. [security]
  8. [xdmcp]
  9. [chooser]
  10. [debug]
  11. # Uncomment the line below to turn on debugging
  12. #Enable=true