Few weeks back I messed up with my Ubuntu Graphics Manager and it stopped starting Gnome display manager.It stucks at command prompt with a message Xserver failed to start and I couldn't see GUI any more.Obviously, i tried 'startx' without success.Then I tried 'sudo dpkg-reconfigure xserver-xorg' to configure my graphics environment from command prompt.Some how I could configure only 4bit color depth and un fortunately it didn't allow me higher bit color depth.It was horrible to see the 4bit color depth screen and i decided to try other methods.If you have backup file of xorg.conf you can restore with 'sudo cp /etc/X11/xorg.conf.mysave /etc/X11/xorg.conf' where xorg.conf.mysave is your backup file.In my case i couldn't figure out the backup file correctly in /etc/X11 directory as there seems to be more than one.
I decided to try another method from ubuntu forums which says xorg 7.2 has a pretty useful feature.That is if you delete xorg.conf file then it will regenerate a new one with default settings.First I have checked the version of my xorg by typing 'X -version' and confirmed it is version 7.2.Then I have deleted my xorg.conf file by typing 'sudo rm /etc/X11/xorg.conf' .It worked like magic and i could see my GUI again.Thanks to ubuntu forums.