If you're running a guest Ubuntu on a Windows host, and if you're also trying to do some graphics driver mambo-jambo, it is highly likely that your Ubuntu will not like it after a while (especially after you reboot or end session). It falls in a login loop, even though your credentials (and .Xauthority, and /tmp, and $HOME permissions) are fine, you cannot login in. For this case, none of the other solutions will work, and if you check your ~/.xsessionerrors, you'll see an error related to GLX.
Xlib: extension "GLX" missing on display ":0".That means there is something wrong with your nvidia driver and best to KILL THEM ALL! (Again, if you're on a vm... Else, I don't recommend it that easily :) ). I first tried removing nvidia-current, however if you search for more, you can see that there are even more nvidia packages installed (nvidia-304, seriously??!).
dpkg -l | grep "nvidia"To search, use the above command, and to delete them all, use the following one:
sudo apt-get remove --purge nvidia-*
sudo apt-get install ubuntu-desktopIf you haste to login right after the first one, you'll get the more annoying "low graphics" error. Because it also deletes the nvidia-commons package, so try installing ubuntu desktop again, then login. Everything should be fine!
(Note: To accomplish all those operations, you need to fall to the command line from the GUI. Use Ctrl+Alt+F1 for that, and login to your account.)