batchbuild fail on Mac OS X in SSH login

Logged on a Mac mini with OS X and run U3D batch build command:
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -projectPath /Users/alexq/myproject -executeMethod MyClass.BuildMyPlayer
But got an error message:
Unity[776] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

posting two questions won’t help at all…