When the Java server is run on Mac OS X as a daemon, it attempts to access the window system. It fails to launch and results in the following messages:
Jan 18 19:20:14 domain.com java[552]: Untrusted apps are not allowed to connect to Window Server before login.
Jan 18 19:20:14 domain.com java[552]: This user is not allowed access to the window system right now.
Please see the following:
http://stackoverflow.com/questions/18603055/getting-a-mac-to-trust-an-application-synergy-on-loginwindow
https://developer.apple.com/library/mac/technotes/tn2083/_index.html#//apple_ref/doc/uid/DTS10003794-CH1-SUBSECTION14
A daemon MUST NOT access the window server prior to login. To fix the problem, the server binary should be stripped of any GUI related code; it should never attempt to access the window system.
If necessary, I can provide the relevant launch daemon plist files and associated scripts needed to recreate the issue.
In response to the question below (can't add comments after it's marked as resolved) yes, '--nogui' works, 'nogui' fails and causes the error.
Linked issues
duplicates 1
Comments 9
I'm using:
java -Xmx4G -Xms4G -jar binaries/current.jar nogui
The 'nogui' option (according to https://minecraft.net/download) has no dashes before it. Is this a typo?
EDIT: Ayep. So it's not the binary, it's the documentation. On that page (and the linked Wiki page) there should be two dashes before 'nogui'. Someone should probably change that. 🙂
Both options with and without dashes work (i ran into the "dashes trap" a few days ago...)
But this ticket is duplicating MC-40824
Ah, didn't see that one. I searched for 'window server' but I missed that one.
Also, to be clear, you say in the other bug listing that both options are accepted - this is NOT the case on Mac OS X. Only the '--nogui' version is accepted. I can confirm this on the 1.7.4 jar. In the meantime, you can resolve this bug (Edit: beat me to it) as the other one is more directly relevant and more active.
Hm, according to the comments in MC-40824 it makes no difference if using "nogui" or "--nogui". I have no mac, cannot verify that.
Did I get you right that you don't get the errors with "--nogui" and the server runs ?
You can't comment after resolving ? Weird. This ticket is "resolved", but not "closed".
Nevertheless, then this ticket is not a duplicate of MC-40824, because there it makes no differences if "nogui" or "--nogui", maybe you can help out there ?
Okay, so the not-able-to-comment thing was a bug in Jira OnDemand... I was unable to log in for a few hours for some reason. Seems to be resolved now.
Okay, back up. THE ISSUE IS NOT RESOLVED. I'll continue posting on the other bug report since it matches what I see and it'll be better to have just one report for the issue. It seems that in some RARE occasions, it may succeed. The Apple documentation may be of use determining why - it appears the window server may have a strange lifecycle at login that causes it to succeed but only rarely.
So, this actually should be a duplicate.
See my response on MC-40824
Does it help if you start the server with the "--nogui" command option ?