Well, it’s not a good thing to pull the drive while mounted. You could just shut the system down without rebooting remove the USB. Or just wait till OS restarts.
Try this first, if that fails try the below steps.
- Log in to try
Ctrl + Alt + 3 - Then run this command
ls -lAand see the permissions of this file.Xauthority. - If the permission looks like this
-rw------- 1 root root 53 Jul 29 13:21 .Xauthority - You need to take ownership by running
sudo chown <yourusername>:<yourusername> .Xauthority - You might need to do the same for this file
.ICEauthoritybut owning the above should do the trick. - Now reboot and see.
- If this fails remove
Xauthorityby usingrm ~/Xauthority.