OpenSourcePhysics / tracker

Video analysis and modeling tool built on the Open Source Physics framework
GNU General Public License v3.0
206 stars 52 forks source link

On Linux Xuggle not available if /tmp/xuggle ends up owned by another user (e.g. root if as part of install) #42

Open brettle opened 2 years ago

brettle commented 2 years ago

To reproduce:

  1. Follow the installation instructions, accepting the defaults including to start Tracker post-install.
  2. Tracker starts and can use Xuggle. Note that a /tmp/xuggle directory will be created and it will be owned by root and not writable by anyone else.
  3. Exit Tracker and restart it as a non-root user. Tracker now complains that it can't use Xuggle.
  4. Exit Tracker and remove the directory with sudo rm -rf /tmp/xuggle
  5. Start Tracker again as a non-root user. Tracker no longer complains about lack of Xuggle. Note that /tmp/xuggle is now owned by the non-root user.
dobrown commented 2 years ago

Thanks for the great steps. Super helpful. I think I fixed this by deleting the /tmp/xuggle folder every time Tracker exits. I just posted this fix as a "beta" tracker jar on the Tracker website (https://physlets.org/tracker/). The link to download the jar is on the left partway down in "Recent Tracker versions".

Please copy the beta jar into /opt/tracker. Then open Tracker's preferences (Edit|Preferences) and set the preferred Tracker Version (Runtime tab) to the beta. Restart.

Now the /tmp/xuggle folder should be deleted when you exit. Does this solve the problem?

If it does, you could make the beta be your default by renaming it tracker.jar and replacing the existing.

brettle commented 2 years ago

Unfortunately, the problem still persists with 6.0.8. Exactly the same steps to reproduce. I see the change you made to the code to delete /tmp/xuggle and I'm not sure why it isn't working. The directory is empty, and I can delete it from the command line (as root). Maybe xuggle has some sort of lock on it?