2

When I open more than one image from Nautilus in ImageJ they all open in a new session. If I already have one session running and open a new file in Nautilus ImageJ also creates a new session. How can I change that?

2

The following solution works only for multiple files at once and not for new images. But to do this, I believe, you have to change the source code of ImageJ.


  1. Create an additionally private desktop file imagej.desktop.

    cp /usr/share/applications/imagej.desktop ~/.local/share/applications
    sudo chown $USER:$USER ~/.local/share/applications/imagej.desktop
    nano ~/.local/share/applications/imagej.desktop
    
  2. Find the Exec line:

    Exec=imagej %f
    

    and replace the line with

    Exec=imagej %F
    
  3. Save the file

  4. Restart nautilus

    nautilus -q
    

Add...  Accepts...
%f      a single filename.
%F      multiple filenames.
%u      a single URL.
%U      multiple URLs.
%d      a single directory. Used in conjunction with %f to locate a file.
%D      multiple directories. Used in conjunction with %F to locate files.
%n      a single filename without a path.
%N      multiple filenames without paths.
%k      a URI or local filename of the location of the desktop file.
%v      the name of the Device entry.
  • This works fine if I open multiple files from nautilus but still does not open new images in the existing session. – Marius Jul 9 '15 at 10:37
  • Yes, you're right. This works only for multiple files at once and not for new images. But to do this, I believe, you have to change the source code. – A.B. Jul 9 '15 at 10:47

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.