According to author:
I made a big mistake in Red Hat 7.1 KDE. Just to see what it looked like, I chose Twm as the window manager. Primative or what! Nothing there! And I can't get KDE back! I've messed with /root/.Xclients.default and /etc/sysconfig/desktop but nothing good happens. In Slackware all I'd have to do would be run xwmconfig on the command line, but Red Hat has its own unique ways that I do not understand. Can anyone tell me how to get KDE back?
You don't say what your /etc/sysconfig/desktop file currently contains. Here's the code in /etc/X11/prefdm that makes use of it...
preferred= if [ -f /etc/sysconfig/desktop ]; then source /etc/sysconfig/desktop >/dev/null 2>&1 [ -n "$DISPLAYMANAGER" ] && DESKTOP=$DISPLAYMANAGER if [ "$DESKTOP" = GNOME ]; then preferred=gdm elif [ "$DESKTOP" = "KDE" -o "$DESKTOP" = "KDE1" -o "$DESKTOP" = "KDE2" ]; then preferred=/usr/bin/kdm elif [ "$DESKTOP" = AnotherLevel ] ; then preferred=/usr/X11R6/bin/xdm fi fi
So, to restore KDE, I think all you'd need to do is edit the file /etc/sysconfig/desktop so it contains a line like this:
DESKTOP="KDE"
(Or use KDE1 or KDE2, as appropriate. I'm not sure what the differences there are.)
If the problem isn't here, then you'd have to dig in deeper, by finding what user-specific startup files got changed when you selected twm as the window manager. It should be safe enough to just delete the file(s) in question, and let the previous defaults take effect.