All programs store their configuration changes in your home directory (~), and a hidden folder (starts with a dot)
so, ~/.kde, or /home/you/.kde is the folder where KDE will store all it's settings. In fact, it's a micro version of /opt/kde/, considering the fact there aren't any programs installed in there.
Removing this folder will reset your KDE.
I don't know anything about that xsm file, but I seam to have the file too, and it's contents is exactly the same as yours. Rather concentrate on the /etc/X11/xinit directory
(and your ~/.xinit stuff)
one other thing: don't login as root in your graphical desktop. You're giving every program, virus, website leak, etc a license to destroy your entire system. (even flash your bios) Working as limited user works perfectly in Linux and the KDE.
if you need to install something, become root in a console (use "su"), and if it's a kde program, it will ask for your root password.