This is very useful tip for all debian users
You can prevent automatic running of the GUI when you bootyour debian machine by disabling your login manager be it KDM, GDM orXDM from running at boot time. To disable the login manager fromautomatically running at boot up, run the following command as root
#update-rc.d -f gdm remove
Replace gdm with kdm or xdm if they are what you use.
To start X manually, you would then have to login at the command prompt and enter the command startx.
To reset your login manager so that it runs at boot up, do
#update-rc.d -f gdm defaults
[I have tried it on the Debian lenny , but unfortunately, i never have successed.]