As stated on this bug [1], when kdm starts, it creates two links in /root/.kde: "cache-$HOSTNAME" and "tmp-$HOSTNAME". This is not very nice and causes trouble in some cases (see that bug for details). It would be nice if kdm could prevent those from being created, or - if they are required - create them somewhere in /var, where is the appropriate place for daemon data. [1]. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582568
Created attachment 48422 [details] Backtrace that shows where these files are created from Sune Vuorela had a look at the code and told me to run kdm_greet in gdb and break at KStandardDirs::KStandardDirsPrivate::createSpecialResource. According to him, this is the point where those links are created and the backtrace I have generated shows what code path is followed to create them. I attach this here for reference. From our judgement, it looks complicated to solve this issue and we are probably going to patch our kdm init script in debian to set KDEROOTHOME to point somewhere in /var. However, I believe that this is something that should be fixed in kde in the longer term. Those links are not used at all by kdm, so they should not be created.
blah. at this point, kdm has already set a virtual home. but lnusertemp tries to be secure and overrides it for root. to circumvent that, kdm would have to create the directories manually before kstddirs feels the urge to call lnusertemp. or some other hack. and looking below the appearances, the problem seems conceptually related to bug #233892.
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/