I installed Debian again to day on another machine and I needed to install X and Kde. That's easy to do when you know the right Debian package names but when you don't it's tough. Well here are the basic ones I needed to get X going: xserver-xfree86, xbase-clients, and xfonts-base. The "xserver-xfree86" package will try to help you configure X. If you need to reconfigure X because of a problem then use: "dpkg-reconfigure"
After that I installed "kdm" for a graphical login and changed my runlevel to 5 in inittab so it would boot to kdm each time. Last, I installed KDE. The main package for that is "kdebase". Then I tried to get IMAP running in Kmail. By default the installed Kmail does not have the right packages installed to use IMAP. The correct package to run IMAP for Kmail is "kdepim-kio-plugins". That makes no sense. I know that IMAP is a plugin for KDE but not installing that when Kmail is installed is stupid. I've seen complaints from other people about this. I agree. Also, you need to install the kmail package which is just called "kmail".
I also installed the following packages: openoffice.org, cups, xpdf, and mozilla-firefox.
I turned off a bunch of services I did not need or want running. For example to remove ppp: "update-rc.d -f ppp remove". I turned off ssh and I remembered I wanted it so to have it start back up so I used the command: "update-rc.d ssh start 98 2 3 4 5 . stop 98 0 1 6 .".
Also, go into cups config file and make it listen only to localhost with the line: "Listen 127.0.0.1:631". Theres no need to have it listening publicly.