Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if ubuntu can't get into the graphical interface?

Shulou Source: shulou.com Published: 2022-06-03 03:36:37 09月22日 Update

The solution to ubuntu's inability to enter the graphical interface:

Press ctrl+Alt+F1 in the login interface (either F2-F6 is OK), and then enter the user name and password to log in.

After logging in successfully, sudo-I, then enter the password to get root permission, and enter startx on the command line. You will be lucky if you successfully enter the graphical user interface.

In general, it will not succeed, there will be many lines of error prompts, including one indicating that you / home/ user name / .Xauthority has an error

Just to be on the safe side, make a copy of this file somewhere else in case it can't be recovered, and then delete it.

Execute cp / home/ username / .Xauthority / home/ before rm / home/ username / .Xauthority

After a successful deletion, execute startx again, and this time a line prompts If *, remove / tmp/.X0-lock and start again. Then, as prompted, we type rm / tmp/.X0-lock to delete the file.

When we are done, we enter sudo service lightdm restart. After the execution is finished, go back to the login interface and log in successfully to the graphical user interface.

Or you can try:

1. Use Ctrl + Alt + F1 to enter the character command line interface

2. Try restartx

3. If item 2 cannot be solved, try sudo service lightdm restart to restart lightdm.

4. If item 3 can't be solved, try sudo dpkg-reconfigre lightdm and choose lightdm.

5. If Article 4 cannot be solved, unity will have to be reinstalled.

Sudo apt-get update

Sudo apt-get install-reinstall ubuntu-desktop

Sudo apt-get install unity

6. If none of the above can be solved, we can only reinstall the system.

Tags: Interface user login success input user name prompt graphics line command password file user interface error again method place good luck character situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Shulou Information NVidia MySQL Shulou Technology