I recently upgraded my system from Linux Mint 18.3 to Linux Mint 19.
After upgrade I can't login to XFCE session. After entering password on the login screen, the screen goes black and a message is displayed:
rc.local: Cannot open display "default display"
And then the login screen is displayed again.
Just booting in recovery mode works, but without proper graphics support. Also I can boot normally if I select Linux 126.96.36.199 in GRUB menu, although the message above appears on system reboot. How can fix it, so I can login normally?
I've tried fiddling with default display settings
/etc/init.d/lightdm, but it seems it doesn't have any impact on this issue.
I found out that the message comes from
systemd: Started Network Manager Wait Online. systemd: Reached target Network is Online. systemd: Starting LSB: Start NTP daemon... systemd: Starting /etc/rc.local Compatibility... systemd: Starting LSB: disk temperature monitoring daemon... systemd: Starting LSB: Cisco AnyConnect Secure Mobility Client for Linux... rc.local: Cannot open display "default display" systemd: rc-local.service: Control process exited, code=exited status=255 systemd: rc-local.service: Failed with result 'exit-code'. systemd: Failed to start /etc/rc.local Compatibility.
This question made me learn a bit more about Linux internals. I found out that systemd runs rc.local for compatibility purposes and the topic from AskUbuntu community helped me debug rc.local.
I found out that the cause of the error message was the /etc/rc.local file, which was empty apart from the setxkbmap command which caused this message.
After commenting out this line the rc.local fails no more, but XFCE desktop fails to start anyway. I installed MATE and Cinnamon alongside and there seems to be no issues with them. Removing and installing XFCE didn't help, but that's of little concern to me as I can continue to use my system without any trouble.
The major lesson from it is that it may be safer to reinstall from scratch than to upgrade, but in case of not so critical system yoy may get away with upgrade with minor trouble.
The original question however is likely to remain unanswered.