Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running the built-in Apache Tomcat 6.0 under Mac OS X Server 10.6.6. Tomcat runs Hudson and Hudson runs a script which needs to connect to the local WindowServer process. This does not seem to be allowed for the user appserver that Tomcat is configured to run under:

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

According to this technote connections to the window server are only allowed for the currently logged in user and for root. Is there a solution that does not require Tomcat to be re-configured to run as root or as the console user?

share|improve this question
add comment

1 Answer

Java allows so-called "headless" operation when performing certain AWT-related functions like creating off-screen bitmaps, performing image manipulation, etc. but there are some operations that actually require access to a real windowing system.

My guess is that one of these specific functions is being hit and I'm not sure you have any options at this point besides avoiding using that function.

What is the full stack trace of the error, and what function are you trying to use? Hudson ought to be able to generate graphics, etc. without access to the windowing system.

share|improve this answer
    
Tomcat is already launched with "-Djava.awt.headless=true". The program that needs to connect to the window server is a C++ program that is launched by a script. –  sakra May 25 '12 at 20:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.