Hi Mike
Sorry for responding so late, but I didn't get around it yesterday.
It might well be that localhost:0 is hardcoded in x2goclient for Mac. Not sure, though. Have you tried DISPLAY=:0 x2goclient [...]
Nope, that won't work on OS X. Let me elaborate.
OS X is not using X11 as all other UNIX(-like) systems do, but instead a proprietary drawing API called Cocoa (or the old, x86-only Carbon interface) based on the Quartz rendering/compositing engine.
On other UNIX(-like) systems, Cocoa/Carbon would be (for instance) Gtk/Qt and Quartz the X11 server.
In contrast to this, OS X does ship an X11 server, too, called "XQuartz", which is using the Quartz rendering engine.
Now that we covered Cocoa and Quartz, let's take a look at the Qt framework. Qt is essentially just another drawing API, providing widgets, manual drawing and whatnot. As you know, Qt can use the X11 system as rendering backend. What you may not know, is that on OS X, Qt can also use Cocoa is a backend, acting as a compatibility/portability wrapper using the Cocoa API. If using those kinds of libraries, for instance with x2goclient, your application will *not* use the X11 server at all but instead paint directly via Cocoa to Quartz.
Qt on OS X is most commonly used as this wrapper for Cocoa (because it works really well in that mode.) As such, x2goclient has also used this mode and I of course kept it this way.
This means, that whenever x2goclient is started, it's using the native Cocoa/Quartz rendering engine and we naturally can not assume that the X11 server on this machine is actually running.
Thus, the x2goclient code tries to start the X server first via a hardcoded path to startx (which sounds wrong to me, we should be using launchctl for that kind of stuff) and afterwards connecting to the hardcoded location TCP localhost:6000 (again, seems wrong, I'll try to get the current UNIX socket and connect to that instead or something like this.) Also, it should be noted that the environment variable DISPLAY it not used/handled in this code at all, so setting it is pointless (even more so for a Cocoa application. ;))
I hope I could shed some light on the internals and outline the work I have planned.
Best regards,
Mihai