Gnome is so configurable that sometimes you end up breaking your window manager. Most of the local system settings for GNOME are stored in configuration files inside the following hidden directories in your home directory – gnome, gnome2, gconf, gconfd, metacity. You can remove these files to reset all the settings.
While in login screen Fedora users press (CTRL + ALT + F3) to switch to command line more, for ubuntu its (CTRL + ALT + F1). Now input your username and password to login in commandLine mode.
Type in rm -rf ~/.gnome ~/.gnome2 ~/.gconf ~/.gconfd ~/.metacity to remove the files and reset the settings. you can now reboot the system with reboot command.
If you have trouble getting into command line with the hotkeys, or if you use some other distros; you can use following method to boot into commandLine
in your grub Menu option, select your linux system (do not press return/enter key) and press e to go to edit mode. There you’ll find a line similar to (some details might be different but it begins with linux)
linux /boot/vmlinuz-3.5.2-3.fc17.i686.PAE root=UUID=efcef550-3385-47a2-8009-dc71ef936fea ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet
go to the starting of the line with your arrow keys and press end key to reach to end of line. Now add space and 3 to it so the above line looks like. The addition of 3 in the line results in runlevel boot or nongraphical boot
linux /boot/vmlinuz-3.5.2-3.fc17.i686.PAE root=UUID=efcef550-3385-47a2-8009-dc71ef936fea ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet 3
Now press CTRL+X or F10 to boot.
Now you’ll be taken to the commandLine Boot; Now just follow the above procedure 🙂