gdm is the gnome display manager, it always you to select which window manager you want to use (KDE, Gnome, IceWM, etc.). You probably have kdm or gdm on your computer already. To edit that file you probably need to be logged in as root. To start gdm, just type gdm at the command prompt where you would have typed startx, or try kdm.
startkde will start KDE - startgnome will start Gnome, IIRC.