X2Go issue on macOS Catalina – X2Go can’t start XQuartz

If you are running X2Go and you get following error

It means something is wrong with your XQuartz installation. First of all, it might be you haven’t installed XQuartz at all. In that case, take a look here: https://www.xquartz.org/releases/.

Another issue might be related to some dangling connections and in fact, issue is somewhere else than missing XQuartz. If you open Console application, it might be you will find crash report for X11.bin application. Something like this

Process:               X11.bin [1603]
Path:                  /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin
Identifier:            org.macosforge.xquartz.X11
Version:               2.7.11 (2.7.112)
Code Type:             X86-64 (Native)
Parent Process:        x2goclient [1599]
Responsible:           x2goclient [1599]
User ID:               501

Date/Time:             2020-01-16 11:15:33.932 +0100
OS Version:            Mac OS X 10.15.2 (19C57)
Report Version:        12
Bridge OS Version:     4.2 (17P2551)
Anonymous UUID:        3B3D6D71-2262-1293-1753-FEEB93B6A0D3


Time Awake Since Boot: 12000 seconds

System Integrity Protection: enabled

Crashed Thread:        5

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
X.Org X Server 1.18.4 Build Date: 20161025
Cannot establish any listening sockets - Make sure an X server isn't already running
abort() called

It means that you have to clean up X11's lock files and sockets. Simply remove

> sudo rm -rf /tmp/.X11-unix

Some people advice to reinstall different version of XQuartz – e.g.: XQuartz-2.7.7. Well, it will look like reinstalling older version solved your problem, but in fact, you simply applied solution that works by accident. It’s simple, when you install XQuartz it cleans stuff and you get the fresh start.