Enter a password to log on to Ubuntu and jump back to the logon page.
Symptom: after entering the password on the Ubuntu login interface, the black screen will pop up and text such as check battery state will pop up again.
Cause: the. Xauthority file owner in the main directory is changed to root, so that the. Xauthority file cannot be obtained when users log on.
Note: Xauthority is a startx script record file. When Xserver is started, read the file ~ /. Xauthority. Read the corresponding display record. When a client program is started to call XOpenDisplay (), it also reads the file and sends the magic code to Xserver. When Xserver verifies that this magic code is correct, it will agree to the connection. Observe the startx script and you can see that every time startx runs, a new record is added to ~ by using the xauth add command before xinit is called ~ /. Xauthority, used to run X authentication this time
Solution: Change the. Xauthority owner to a logon user (or simply delete. Xauthority ).