Login  Register

Conflicting ImageJ sessions in different X11 sessions

Posted by JiHO-2 on Jun 30, 2009; 7:00am
URL: http://imagej.273.s1.nabble.com/Conflicting-ImageJ-sessions-in-different-X11-sessions-tp3691840.html

Hello,

I am encountering a very strange behavior. Here is the situation:

ImageJ is called from within a shell script with the syntax:
        java -Xmx2000m -ijpath $pathToIJ/plugins -jar $pathToIJ/ij.jar -eval  
"some macro code"  > /dev/null 2>&1
The parent shell script runs on a Ubuntu Linux machine, latest and  
greatest. Each user has a *local* installation of the code (bash  
scripts + ij.jar and plugin class files). Each user also works on  
local images, on his account.
User 1 starts IJ through the script and leaves it running.
User 2 opens a new session (through ssh -X or locally using user  
switching, so that User 1 is still connected).
User 2 tries to run the bash script = all windows appear on the  
desktop of User 1 !! There is also a message:

                Macro Error

Duplicate call in line 1.

run("Image Sequence...", "open=/... rest of my inline macro


IJ seems to detect that it was already running and sends the windows  
to the running instance. Is that expected?

This strikes me as very odd, and a potential security vulnerability.

On this machine users:
- each have their own group
- write files as rw-rw-r-- (but since they each have their own group  
they can't write to each other's home directories)
- all belong to the group "users", so that they can share data which  
is present on another drive (not the one accessed here)

When I try to reproduce this manually such as:
#run this as user 1
wget http://rsb.info.nih.gov/ij/download/jars/ij142q.jar
java -jar ij142q.jar -eval "run('AuPbSn 40 (56K)');"
# leave IJ running
#and this as user 2
wget http://rsb.info.nih.gov/ij/download/jars/ij142q.jar
java -jar ij142q.jar -eval "run('Bat Cochlea Volume (19K)');"

IJ opens correctly for user 2. So this seems to be something specific  
to my code, but I really don't know where to look.

I would very much appreciate any pointers to help me debug the issue.  
I cannot provide access to the machine (it is on an internal network  
only) but I can run anything that's needed to debug this.

Thanks in advance. Sincerely,

JiHO
---
http://maururu.net