Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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

This is on a Mac.

What I'm trying to do, is setup Jenkins to automate our builds. To test the configuration, I'm running the UE4Editor app on the command line as the Jenkins user.

 /Users/Shared/UnrealEngine/4.2/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor "/Users/Shared/Jenkins/Home/workspace/Game (AdHoc)/mainline/Game/Game.uproject" -run=Cook -MapIniSection=AllMaps -TargetPlatform=IOS -buildmachine -Unversioned -fileopenlog -abslog="/tmp/cook.txt" -stdout -FORCELOGFLUSH -CrashForUAT -unattended -AllowStdOutLogVerbosity

It fails with the following error:

 _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

The exact same command above works when run as the normal, logged in user. It appears as though UE4Editor needs to run as the logged in user in order to access the graphics card or display? Is there a command line option or something we can do to work around this problem?


Product Version: Not Selected
more ▼

asked Jul 09 '14 at 03:30 PM in Packaging & Deployment

avatar image

16 1 1 3

avatar image innogames Dec 09 '14 at 05:22 PM


I encounter the same problem with UE 4.5. We currently set up Jenkins 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 jenkins user it works fine. But if I run it in a Jenkins JOB then I receive the same error: CommandUtils.Run: Run: /private/var/lib/jenkins/unrealengine/Engine/Binaries/Mac/UE4Editor.app/Contents/MacOS/UE4Editor /var/lib/jenkins/workspace/MyProject/MyProject.uproject -run=Cook -MapIniSection=AllMaps -CookCultures=en -TargetPlatform=IOS -buildmachine -Unversioned -fileopenlog -abslog="/var/lib/jenkins/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 Jenkins job.

Any advises on this?

thanks ciao Matthias

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

As UE4Editor is a regular, 'proper' Mac application and even in unattended mode we have to make AppKit calls it will require access to the WindowServer. This is the normal function of OS X and it is not something that can be easily changed (or possibly changed at all depending on what is actually causing the dependency) in UE4Editor. As such the UE4Editor needs to be run with an account logged in and under a user with sufficient privileges to access the WindowServer. Apparently whatever user Jenkins is using to launch the editor has insufficient privileges and hence it doesn't work.

more ▼

answered Dec 09 '14 at 06:03 PM

avatar image

marksatt-pitbull STAFF
1k 31 4 44

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question