Deleting all hidden directories in the $HOME directory is a bit of overkill, and almost as drastic as reinstalling. Renaming ~/.gnome2 and ~/.config would be less drastic.
Some other things to look for are files owned by root. If you run a gui program as root, it could have altered a config file or log file, making it unreadable. These could be located in /tmp/ as well. If there was a runaway application that caused the .xsession-errors file to grow in size, filling available disk space, that can prevent logging in to Gnome or KDE.
After making some changes, such as hostname, you need to log out and log in again. Some other changes such as to group membership or the sudoers configuration can require a restart. Orphaned pid files in /var/run can prevent programs from starting. A kernel upgrade requires a restart.
Removing all files from /tmp/ often can help.