top bar

Linux installation from source (Ubuntu)

Revision as of 07:37, 28 August 2009 by Hamid.ohadi (Talk | contribs)

General remarks (Ubuntu)

We assume installation of ImageJ in "/usr/local/ImageJ". In addition to ImageJ and Micro-Manager, you need the following programmes:

  • svn for obtaining the repository
  • sun-java6-sdk or better/equivalent
  • autoconf
  • automake
  • swig
  • libace (>= 5.6.3)
  • libace-dev
  • g++
  • libtool

In addition, note that:

  • File versions might have changed, check before using the names given in the instructions.
  • Some operations have to be performed as "superuser" ("sudo …").
  • Permissions of the new ImageJ directory might have to be set properly.

General remarks (Gentoo)

Currently the dev-libs/ace (>=5.6.3) package is masked. Unmask the package by issuing:

 $ sudo echo "dev-libs/ace" >>  /etc/portage/package.keywords
 $ sudo emerge dev-libs/ace

The ImagaJ ebuild can be downloaded from Digest and install the ebuild (see


1. Installing ImageJ

Get the Linux version of ImageJ from, move it to "/usr/local" and unpack it as described in You will have a directory "/usr/local/ImageJ" with everything needed to run ImageJ (you can start ImageJ from the terminal: "cd /usr/local/ImageJ", followed by "./run").

2. Get Micro-Manager from the repository

Make a directory somewhere (e.g. "~/src"), move to it ("cd ~/src") and get Micro-Manager with the command "svn checkout htpps://". This will download all the necessary files from the repository into "~/src/micromanager1.3/".

3. Beanshell and swingx

Move to the new directory ("cd micromanager1.3") and copy beanshell and swingx from "~/src/micromanager1.3/classext" to the "plugins" directory of your ImageJ installation: "sudo cp classext/bsh-2.0b4.jar /usr/local/ImageJ/plugins" and "sudo cp classext/swingx-0.9.5.jar /usr/local/ImageJ/plugins".

4. Create a new micro-manager directory in /usr/lib

"sudo mkdir /usr/lib/micro-manager"


From within "~/src/micromanager1.3", type "./".

6. Run configure

"./configure --with-imagej=/usr/local/ImageJ". You have to add the option (--with-imagej), because the default assumes a different localisation of ImageJ.

7. Run make


8. Install as superuser

"sudo make install"

9. Run ldconfig


10. The starting script

Starting ImageJ with the scripts provided in the ImageJ directory (run, script, see 1 above) will start ImageJ, but Micro-Manager, although now in the plugins directory, will not work properly because the path to /usr/lib/micro-manager is missing. Write your own script containing the 4 lines given below ("mmscript"), save and move it to /usr/local/ImageJ.

11. Running Micro-Manager

cd to "/usr/local/ImageJ" and start ImageJ with your new script ("./mmscript &"). In the plugins menu of ImageJ, start Micro-Manager –> Micro-Manager Studio.


cd /user/local/ImageJ
export LD_LIBRARY_PATH=.:/usr/local/lib:/usr/lib/micro-manager:/usr/local/ImageJ
java -mx1200m -Djava.library.path=/usr/lib/micro-manager:/usr/local/ImageJ -Dplugins.dir=/usr/local/ImageJ -cp /usr/local/ImageJ/ij.jar:usr/local/jdk1.5.0_04/lib/tools.jar ij.ImageJ

script for Gentoo

Edit '/usr/bin/imagej' according to this:


export LD_LIBRARY_PATH=.:/usr/lib/micro-manager

if !([ "${IJ_HOME}" ]) ; then
if [ -d ${IJ_HOME}/plugins ] ; then
if !([ "$IJ_MEM" ]) ; then
if !([ "$IJ_CP" ]) ; then
	IJ_CP=$(java-config -p imagej):$(java-config -O)/lib/tools.jar
	IJ_CP=$(java-config -p imagej):$(java-config -O)/lib/tools.jar:${IJ_CP}
$(java-config --java) \
	-Xmx${IJ_MEM}m -Dswing.aatext=true \
	-cp ${IJ_CP} \
	-Duser.home=${IJ_HOME} \
	-Dplugins.dir=${IJ_PLG} \
	-Djava.library.path=/usr/lib/micro-manager \
	ij.ImageJ "$@"

You could run the Micro-Manager in one go by issuing:

 imagej -run "Micro-Manager Studio"
© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact