Take a look here first.
After solving that problem, I noticed that KDM won't let me select GNOME session. I just have KDE and xterm. I reinstalled GDM and switched to it, but I still can't start GNOME and I hate KDE4. I noticed in Synaptic that there is GNOME package available, but unfortunately, it needs both swfdec-mozilla package and extensions for epiphany browser which are on my system mutually exclusive. How to work around that? I don't use epiphany at all, so is there some other way to restore my GNOME installation?