NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 631 - Turning ImageJ into a Fiji installation does not work
Turning ImageJ into a Fiji installation does not work
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Other
unspecified
PC Linux
: P5 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2013-07-11 09:27 CDT by Vassilis Kehayas
Modified: 2013-07-22 16:40 CDT
2 users (show)

See Also:

Description Vassilis Kehayas 2013-07-11 09:27:31 CDT
When following the instructions in here:
http://fiji.sc/Frequently_Asked_Questions#How_do_I_turn_my_ImageJ_installation_into_a_Fiji_one.3F,

I get the following error:
sun.org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getDirectory" of undefined (<Unknown source>#63) in <Unknown source> at line number 63
Comment 1 Johannes Schindelin 2013-07-11 14:32:48 CDT
Thanks for the report. I actually fixed this on a computer of some workshop participant in Woodshole early June but forgot to apply the same fix to the source code repository from where the link you found is actually fed.

This is fixed in https://github.com/fiji/fiji/commit/fa2bfe56
Comment 2 Vassilis Kehayas 2013-07-12 06:24:34 CDT
The installation now run with no errors but the plugins that are expected to be associated with Fiji are still missing.
Comment 3 Johannes Schindelin 2013-07-12 09:02:14 CDT
When I drag & drop the fix.js URL onto the ImageJ window, a text window appears with a Javascript and a comment in the beginning that asks me to start the Javascript with Ctrl+J (or Cmd+J on MacOSX).

Have you done that?

After that, the ImageJ window shows the statuses "loading remote updater" and "starting remote updater", respectively. After a moment, the updater pops up, offering to install a bunch of files. I clicked "Apply changes" to let it do that.

Have you seen that, and also clicked that button?

After that, it downloaded a bunch of stuff and then showed me a message that everything is installed now and I need to restart ImageJ to make the changes permanent. One problem there is that you will need to start the new, unified ImageJ launcher that is installed by the updater unless your ImageJ already came with it (likely the latter is only the case if you installed the very recent 1.47 from the ImageJ 1.x website).

After the restart, I got the message about a couple of duplicated plugins (which I will fix later, I already filed a ticket to remind myself of that task).

In any case, the restart should show all the plugins (but some Fiji-specific things -- such as having the recorder open new macros in the script editor -- will only work if you start it with the new ImageJ launcher).
Comment 4 Vassilis Kehayas 2013-07-12 09:35:42 CDT
Yes, I followed the same procedure. I had already ImageJ 1.47v, so I uninstalled and re-installed ImageJ, applying the fixer without updating to 1.47v and I still get the same issue.
Where is the new launcher located?
In a terminal I get this:

$ which imagej 
/usr/bin/imagej

This gives me a non-Fiji, vanilla ImageJ 1.46a.

Ubuntu 12.04LTS
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Comment 5 Vassilis Kehayas 2013-07-12 09:36:24 CDT
Yes, I followed the same procedure. I had already ImageJ 1.47v, so I uninstalled and re-installed ImageJ, applying the fixer without updating to 1.47v and I still get the same issue.
Where is the new launcher located?
In a terminal I get this:

$ which imagej 
/usr/bin/imagej

This gives me a non-Fiji, vanilla ImageJ 1.46a.

Ubuntu 12.04LTS
java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
Comment 6 Curtis Rueden 2013-07-12 10:31:20 CDT
If your ImageJ is at "/usr/bin/imagej" then I am guessing you installed ImageJ via the package manager? I would be very surprised if it is possible to transform such an installation into a Fiji one, due to both permissions issues and directory structure layout incompatibilities.

The Fiji updater only works when it has permission to modify the Fiji directory -- in other words, if you own that directory. It is much easier to download and unpack Fiji into your home directory and run from there: http://fiji.sc/Downloads
Comment 7 Vassilis Kehayas 2013-07-12 10:55:46 CDT
I wanted Fiji to be associated with a file format by default and I don't know how to achieve this except installing from package.

Running the procedure with gksudo succeeds.

But now if I don't run ImageJ with gksudo (as when double-clicking a TIFF file, my initial purpose) it reverts to vanilla ImageJ, whereas it's Fiji with gksudo.

Thanks for your efforts anyway. I think I need to understand more about how linux deals with default applications to make Fiji from my home folder be associated with TIFFs.
Comment 9 Vassilis Kehayas 2013-07-12 13:31:53 CDT
Thanks! I found a solution here:
http://askubuntu.com/questions/162612/how-can-i-add-an-application-to-the-list-of-open-with-applications
Comment 10 Johannes Schindelin 2013-07-12 14:45:19 CDT
Note that both the Fiji package you can download from http://fiji.sc/Downloads and the ImageJ package you can download from http://imagej.nih.gov/ij/download.html (or for that matter, from http://jenkins.imagej.net/job/ImageJ1-releases/label=master/) have an ImageJ launcher that will create a .desktop file as you require it when first started.
Comment 11 Vassilis Kehayas 2013-07-18 09:32:59 CDT
@johannes.schindelin:Exactly, except I had to modify 'Exec=command' to 'Exec=command %F'
Comment 12 Johannes Schindelin 2013-07-22 16:40:09 CDT
I incorporated your ideas (which I could finally verify using the proper documentation -- read: not StackOverflow) into the launcher which will write appropriate .desktop files starting with the next released version.