Enter the root user
After entering the password with the su command, enter the root user first, because when a non-root user edits and saves a file, it will prompt that it cannot be saved.
Modify User Properties Profile
vi /etc/gdm/custom.conf
Set up autostart
Add two lines under [daemon], set auto start, auto start defaults to True, user is root
# GDM configuration storage
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=root
[security]
[xdmcp]
[greeter]
[chooser]
[debug]