Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 153396 - Can't open display
Can't open display
Product: cnd
Classification: Unclassified
Component: -- Other --
Macintosh (x86) Mac OS X
: P2 (vote)
: 6.x
Assigned To: Thomas Preisler
Depends on:
  Show dependency treegraph
Reported: 2008-11-18 15:29 UTC by Alexander Pepin
Modified: 2009-02-19 20:30 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2008-11-18 15:29:12 UTC
Steps to reproduce:
- create any project e.g. Welcome
- clean and build it
- try run the project
Result: Run failed due to "/usr/X11R6/bin/xterm Xt error: Can't open display:"
Comment 1 Thomas Preisler 2008-11-18 16:26:05 UTC
I see this once in a while too and I don't think it has anything to do with CND. Running xterm from terminal will also fail when it happens and I suspect some 
kind of Mac error. The error goes away if you re-login or restart.
Comment 2 Leonid Lenyashin 2008-11-18 16:57:22 UTC

From your comment it is not clear if you are going to fix it or not. If there is no problem with CND, then it does not
make any sense to keep this P1 open, in NEW state and w/o target milestone. My sense is that you should work it out with
QA and close as WONTFIX.

Comment 3 Alexander Pepin 2008-11-18 17:20:12 UTC
 this was found in build 200811180201. At the same time build 20081029 works pretty good on the same machine, so I
expect that something wrong with CND trunk. I tried to run NB with a fresh userdir but got the same result (failed). 
It's P1 as it prevents us from testing on Mac. 
Comment 4 Thomas Preisler 2008-11-18 17:38:02 UTC
I will try build and let you know. Please try and reboot your system and see what happens? I have seem this problem on and off for that past 2 month and it happened after one of the Mac software updates. Nothing really have changed in the way we open the terminal.
Comment 5 Thomas Preisler 2008-11-18 18:34:29 UTC
Downgrade to p2. Seems like problem is isolated to Alexander's system. I just tried today's build and have no problems. Still investigating...
Comment 6 soldatov 2008-11-28 09:40:41 UTC
I verified this bug on apepin's machine again after restart (with latest build) and I can't open xterm also.

P.S. Also I can't open xterm from terminal by default. But If I added 'export DISPLAY=:0' line then xterm appears
without problems (If launched NB from this terminal in this case xterm works in NetBeans also)
Comment 7 Egor Ushakov 2008-12-12 15:55:31 UTC
The problem is that on this system DISPLAY is not set by default and so xterm is unable to run.
Simple "export DISPLAY=:0.0" solves the problem.
We should consider adding DISPLAY to the environment if it is not present (in case we run xterm).
Comment 8 Thomas Preisler 2008-12-12 16:51:30 UTC
Most likely caused by the following change in MakeActionProvider:

if (System.getenv("DISPLAY") == null && conf.getProfile().getEnvironment().getenv("DISPLAY") == null) { // NOI18N

// Make sure DISPLAY variable has been set
if (HostInfoProvider.getDefault().getEnv(conf.getDevelopmentHost().getName()).get("DISPLAY") == null && conf.getProfile().getEnvironment().getenv("DISPLAY") == null) { // 

I will investigate some more and possible revert back to what it was previously.

Comment 9 Sergey Grinev 2008-12-12 17:36:10 UTC
possible fix:;node=dbdd51242711

we didn't checked for DISPLAY on Mac previously
Comment 10 Thomas Preisler 2008-12-12 18:00:22 UTC
I checked the 6.5_fixes sources and it *does* set DISPLAY on Mac if not set. I think this check was (by accident) removed when I fixed Adding the check back should fix Alexander's problem. Root cause of the X11 I'm seeing on my 
Mac is different although the symptom are the same: X11 display refused. Not even xterm from a terminal works and I have to restart X11 to get it to work 
Comment 11 Thomas Preisler 2008-12-12 18:03:52 UTC
I meant 6.5 sources. Fix for 153166 was backported to 6.5_fixes 6.5_fixes may be broken too.
Comment 12 Quality Engineering 2008-12-13 17:04:45 UTC
Integrated into 'main-golden', will be available in build *200812131401* on (upload may still be in progress)
User: Sergey Grinev <>
Log: possible fix for #153396 Can't open display
Comment 13 Alexander Pepin 2008-12-15 13:14:07 UTC
fixed with the last changeset
Comment 14 Alexander Pepin 2008-12-15 13:47:44 UTC
verified in build 20081215
need to be included into patch2 to fix the flaw in patch1
Comment 15 jinb 2009-01-07 20:04:10 UTC
fix backported into release65_fixes branch
Comment 16 Alexander Pepin 2009-01-19 18:55:07 UTC
verified in patch2

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo