Unable to open display error (on MACs)


#1

I just ran into this error myself while trying to run the latest compiled CellProfiler (7522, aka branch 7184) on my mac. It wouldn’t launch when I clicked on the CellProfilerForMacI.command script, and this was the Terminal output:

[quote]…
Warning: Unable to open display ‘:0.0’. You will not be able to display graphics on the screen.
??? Error using ==> imshow at 191
IMSHOW requires Java to run.

Images:imshow:needJavaFigure
Warning: 1 invisible figure(s) exist at MCR termination.

If your application has terminated unexpectedly, please note that
applications generated by the MATLAB Compiler terminate when there are no
visible figure windows. See the documentation for WaitForFiguresToDie and
WAITFORCALLBACKS for more information.

logout

[Process completed]
[/quote]

The fix is to comment out (or remove) the line in the .command file

In Mac OS 10.5+ (Leopard, and beyond I assume), you do not need to manually specify the DISPLAY variable, as ‘launchd’ will handle it for you.
http://www.macosxhints.com/article.php?story=20071028135730303.

Hope this helps,
Dave