#384 symlink detection in jmol.sh broken for relative links

Stuart Prescott

I just unpacked the jmol tarball into /usr/local/share/jmol/ and then to put jmol in my path I did this:

cd /usr/local/bin

ln -s ../share/jmol/jmol.sh ./jmol

And then jmol didn't work:

Jmol could not find its installed files.

If, however, I did the following:

ln -s /usr/local/share/jmol/jmol.sh ./jmol

then it works fine.

So.... two suggestions for you:

* in the jmol script, also search for /usr/local/share as well as /usr/share. /usr/share should only be touched by the distro packaging system (apt, yum, emerge etc) while /usr/local/share is for the sysadmin to monkey with.

* in the jmol.sh script, change your regexp to be '/.*' not '.*/.*' as what you have currently just looks for any slash in the path not necessarily one at the start


  • Bob Hanson
    Bob Hanson

    • assigned_to: nobody --> nicove
  • Bob Hanson
    Bob Hanson

    • priority: 5 --> 8
    • assigned_to: nicove --> egonw
    • status: open --> closed-works-for-me
  • Logged In: YES
    Originator: NO

    I looked at the problem, and both symlinks work for me. Moveover, I cannot find a trace of code in the .sh file that involves a hardcoded usr/share directory.

    About the second suggestion... I don't quite get what why not looking for any slash is not sufficient... as it works for me, I'm not eager to change the code.

    Please reopen this bug, if any symlink to the jmol.sh still does not work for you.

    Tested on Ubuntu hardy GNU/Linux.