Login  Register

How to set DISPLAY environment variable when running ImageJ with NO_SHOW option

Posted by Mike O'Leary on Dec 14, 2010; 6:39pm
URL: http://imagej.273.s1.nabble.com/How-to-set-DISPLAY-environment-variable-when-running-ImageJ-with-NO-SHOW-option-tp3686181.html

I would like to use ImageJ as a library with no UI to do image transformations. I downloaded the source for version 2.44K and built it, and when my code makes the function call

ImageJ ijObj = new ImageJ(null, ImageJ.NO_SHOW);

because I was told that an ImageJ object needed to be constructed for some operations to succeed, even if they don't directly use the ImageJ object, I get an error message when running on a Linux machine that does not have the DISPLAY environment variable defined. The machine doesn't have X Windows installed on it, and it seems unnecessary to install it just in order to set DISPLAY to a value to satisfy ImageJ even though my code doesn't display anything. Is there a value I can set DISPLAY to that is an acceptable way to enable ImageJ to do whatever it needs to do with it when it is running in NO_SHOW mode? Thanks.
Mike