login to black screen in 18.04

Solution 1:

You have run some GUI application that has taken ownership of files in your personal area. The login manager isn't working because it doesn't have sufficient permission for the configuration files.

You can retake ownership of the files in your personal space by running this command:

$ sudo chown -R $(whoami):$(whoami) ~/

After running this command, you won't have any problems logging in.

Also insure the integrity of your login manager. You can do this by installing lightdm with:

$ sudo apt install lightdm

At the command configuration prompt select Lightdm.

You can toggle between the Lightdm login manager and the Gnome login manager with this command:

$ sudo dpkg-reconfigure lightdm