Version: (using Devel) Installed from: Compiled sources KDE 4.3.95. Ubuntu 10.4 Alpha 2+. On one of my machines, KDM always logs me into Gnome, no matter which desktop environment I used last. More specifically, although KDM updates ~/.dmrc with my choices, it ignores the contents of ~/.dmrc on login and defaults to "restricted guest", which loads Gnome. This means that I cannot get into KDE without explicitly choosing it from the menu! I was a bit puzzled that it only happened on this machine and not my other machine which runs the same software. After some thought, I now think that the interesting difference is that only this machine has an encrypted home directory. I think that KDM looks in the ~/.dmrc file too soon; this will of course fail if I have not yet unlocked my home directory. It should defer the lookup until I have been logged in. I haven't checked, but this probably applies to all the entries in ~/.dmrc, not just Session. Furthermore, there is something strange about my always getting the "restricted guest" type. As an experiment, I entered a number of bogus user names in the login dialog and looked in the menu to see which session type would be marked "(previous)"; the results looked random to me.
kdm has provisions for delayed home directories. seems like they don't work well enough. the pseudo-random session types for bogus users are intentional.
Same behavior in KDE 4.4.0. If you're having trouble reproducing this bug: It seems it only shows up if you have turned off showing the user list in the login screen. So, the previsions seem to be working, but not in this mode.
KDM is unmaintained and not used in KDE Plasma 5. SDDM is the login manager used in KDE Plasma 5. If you still have this same issue with SDDM, please file an issue on the SDDM bugtracker (after doing a search for existing issues first!): https://github.com/sddm/sddm/issues/