I've spent a day trying to research this problem and haven't found anythging to permanently fix my problem.
After the dist-upgrade I found that programmes like Aptus, Synaptic etc won't start anymore. I authenticate them with password and then nothing happens. I then Googled that Network Manager may be involved, so I disconnected the wifi internet connection to try it out and it made no difference. However, if I log out and back in again and disconnect then everything opens as normal. If I reconnect the wifi again they all fail to open again. It seems that Network Manager (and probably x-server?) is involved but I can't work out how.
I had a Clone Image I took before the dist-upgrade and applied it. It looks like the problem was there before the dist-upgrade, so that wasn't to blame.
I have studied the .xsession-errors file and have found this error when trying to start synaptic etc: "Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused".
Anyone have any idea whats going on here?
All Sparky tools got two changes:
1. use differen config of sparky-xterm
2. use pkexec instead of gksu/gksudo
Did you reboot after upgrading?
[SOLVED]
It seems, for some strange reason, that systemd decided to change my hostname to "localhost.localdomain". Read more here: https://www.centos.org/forums/viewtopic.php?t=47101
The fix is: hostnamectl set-hostname myownhostname. Trust me to find some obscure bug! I almost did a complete reinstall as well.