Xubuntu: Nautilus overtakes XFCE on startup

Just had a nightmare hour trying to get my lovely clean Xubuntu desktop back to normal.

For some strange reason it was loading in the Gnome desktop over the top. All very odd, loaded up as XFCE for a second or two, but then flashed into Gnome – very irritating.

Finally managed to track down the problem which was Nautilus was automatically loading, which was then replacing the desktop. After about an hour of Googling and 15 minutes of going through all the session config variables to try and work out where it was loading, I finally came across this thread in the brilliant Ubuntu Forums which mali2297 recommended removing the .cache directory. I did, and it worked!

For example’s sake, I did this:

$ rm /home/rob/.cache -Rf

I just thought I’d share this in case someone else is having a similar problem.