Here's one, admittedly inelegant, method that should work on most any Linux system to kill gdm:
# ps auxw | grep gdm
[identify PID (the number following "root") of the first instance of gdm]
# kill [PID of gdm]
For example, when I do this, ps returns:
root 2221 0.0 0.6 11852 3168 ? S 12:15 0:00 /usr/bin/gdm
root 14463 0.0 0.0 11908 3444 ? S 12:28 0:00 /usr/bin/gdm
root 14464 0.1 1.5 13652 7864 ? S 12:28 0:00 /etc/X11/X :0 -nolisten...
etc.
The command
kill 2221
halts all instances of gdm and its child processes (including the X server).
Hope that helps.