I have created a new Ubuntu 16.04 server installation today, added Ubuntu-desktop and mate-desktop, and now whenever I try to log in with the user I created during setup, the login screen comes back and no error message is displayed. I do Ctrl+Alt+F1, and there my login works fine.
I do ls and I have only Desktop directory.
So I saw some answers recommending deleting .Xauthority, which I did, but it did not help
I rebooted and tried MATE desktop. When I try to login, I get an error:
Could not update ICEAuthority file /home/myuser/iceauthority
and
Path for the directory containing caja settings need read and write permissions /home/myuser/.config/caja
I ran
chmod 777 .config
which enabled me to log in, but I can't see any menu or link or icon except a link to my home directory, so the system is unusable.
So what is going wrong?
Here is the ouput for tail xsession:


namei -l ~/.ICEauthority(note the capitalization) and [edit] your question to include the result – steeldriver Mar 24 '18 at 00:57.xsession-errorsfile? (you can add the output oftail ~/.xsession-errorsto your question) – steeldriver Mar 29 '18 at 12:51find ~ ! \( -uid $(id -u) -gid $(id -g) \) -lsto see what non user-owned files / directories exist in your home dir. – steeldriver Mar 30 '18 at 13:32