How can I execute UE4Editor on the command line as a different user than what is logged in?

Hi

I encounter the same problem with UE 4.5.
We currently set up CI for Windows and Mac. For windows everything is working fine.
On Mac we have problems.

I use this Bash call to start build, cook, and package process.
Build/BatchFiles/RunUAT.sh BuildCookRun -project=“$WORKSPACE/MyProject.uproject” -noP4 -IOS -clientconfig=$CONFIG -cook -maps=AllMaps -NoCompile -stage -pak -archive -archivedirectory=$WORKSPACE/SecretAge -Build

Engine is build from github source.

When I run this in the bash as the user it works fine. But if I run it in a JOB then I receive the same error:
CommandUtils.Run: Run: /private/var/lib//unrealengine/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor /var/lib//workspace/MyProject/MyProject.uproject -run=Cook -MapIniSection=AllMaps -CookCultures=en -TargetPlatform=IOS -buildmachine -Unversioned -fileopenlog -abslog=“/var/lib//Library/Logs/Unreal Engine/LocalBuildLogs/Cook.9.txt” -stdout -FORCELOGFLUSH -CrashForUAT -unattended -AllowStdOutLogVerbosity
UE4Editor: _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
Build was aborted

This call is invoked after compiling it successfully. It seems that he wants to start the Unreal Editor which seems to be not allowed within a job.

Any advises on this?

thanks
ciao