I was changing the theme in my Ubuntu 12.04 to Mac OS theme, constantly installing, logging in and out, rebooting when trying to fix things along the way. While I was doing a reboot, it froze, for the first time, showing letters on the screen that goes "checking battery state...".
I searched the internet with my mobile phone, found a solution which was:
sudo apt-get install gdm
Everything turned back to normal, and I didn't know what gdm was at that moment. I continued on changing and completing the new theme, then I wanted to change the appearance of the loggin screen, which turned out to be the gdm.
So I changed it again to lightdm, rebooted, and it froze again when the ubuntu purple screen was showing. Found a solution, which was to press Alt+Prt Sc Sys Rq, typing R E I S U B at the same time, letter by letter. I rebooted again, and it froze again, now in the screen where it said "could not write bytes: broken pipe".(I assume the error has something to do with using Windows 7 and Ubuntu in dual boot.)
So using the same method, I got an access to the terminal, and typed
sudo apt-get install gdm (which told me that I already have it)
sudo dpkg-reconfigure gdm
Then changed the setting from lightdm to gdm from the screen. And now there was no freezing...
I can't figure out where the problem arose, and not sure where to look for to fix the problem. What should I do to be able to use lightdm?