Home >Operation and Maintenance >Linux Operation and Maintenance >Solve the problem that Ubuntu cannot enter the graphical interface

Solve the problem that Ubuntu cannot enter the graphical interface

hzc
hzcOriginal
2020-06-12 11:33:4225440browse

Solve the problem that Ubuntu cannot enter the graphical interface

Solution to the problem that ubuntu cannot enter the graphical interface:

Press ctrl Alt F1 (F2-F6 can be used) on the login interface , and then enter your username and password to log in.

After logging in successfully, sudo -i, then enter the password to obtain root permissions, enter startx in the command line, if you successfully enter the graphical user interface, good luck,

Generally It will not succeed. There will be many lines of error messages. One of them will tell you that there is an error in /home/username/.Xauthority.

To be on the safe side, copy this file somewhere else. To avoid being unable to recover and then perform the deletion operation,

First execute cp /home/username/.Xauthority /home/, and then execute rm /home/username/.Xauthority,

After successful deletion , execute startx again, this time there will be a line prompting If ******,remove /tmp/.X0-lock and start again. Then follow the prompts, we enter rm /tmp/.X0-lock to delete the file.

After completion, we enter sudo service lightdm restart. After the execution is completed, return to the login interface and log in to successfully log in to the graphical user interface.

Recommended tutorial: "linux tutorial"

The above is the detailed content of Solve the problem that Ubuntu cannot enter the graphical interface. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn