Thanks for the reply. I now ran gdmsetup in graphical environment (because Ubuntu 10.04 has abandoned "Login window" option in the menus) and disabled autologon to avoid accidental problems in the future.
Your proposed solution is not bad. It led me to find information in Arch Linux forum. This is how one can do it. Running gnome-session alone will result in a:
Gnome requires X Windows System to run. Gnome-session command does not start X. So, what you have to do is to add exec gnome-session to your ~/.xinitrc, and then start X with the command startx.
** (gnome-session:2563) WARNING **: Cannot open display:
But editing .xinitrc is a bit of a pain, if you're just experimenting with different window managers.
$ startx /usr/bin/gnome-session