A blog named for the muse of Astronomy containing musings by an astronomer

A fix for LaTeXit under Leopard

Posted on March 08, 2008 by Juan

[A better fix to this problem is to upgrade to LaTeXit 1.15, which was released on April 16, 2008.  It fixes the problems with Leopard and allows you to keep the default /etc/profile file for Leopard.]

Apparently, LaTeXIt, which I use to generate equations with Latex which can then be copied into Apple’s Keynote and Pages documents, locks up on launch a vanilla install of Leopard. This post on MacOSXHints.com provides a hack, but it wasn’t that nice, since it involves re-installing a particular version of latex. It turns out the solution was really much simpler and shows up in the comments on that page. In the comments, user Paolo Bosetti notes that

There is actually a much easier workaround: simply change your /etc/profile commenting the following lines (add the “#” at the begining):

# if [ -x /usr/libexec/path_helper ]; then
# eval `/usr/libexec/path_helper -s`
# fi

and adding the following two:
export PATH

Why so? Apple changed the Leopard way to set the PATH variable, and now it uses the /usr/libexec/path_helper command, which seems having troubles with LaTeXiT spawned bash scripts. If you make this modification to your /etc/profile, you are simply dropping the new path_helper in favour of the plain old way to set the PATH variable.

This also explains why I wasn’t seeing this on my laptop, since it kept the old /etc/profile file during the upgrade.

Another user comments that the fix could also be done without hacking the /etc/profile but instead just changing ~/.profile such that /opt/local/bin appears in the path last, since /usr/libexec/path_helper is supposed to read ~/.profile. However, I was unable to get this approach to work.

2 Trackbacks/Pingbacks

  1. 25 03 08 21:17

    Urania » Blog Archive » Leopard’s path_helper seems a bit buggy

  2. 16 04 08 10:57

    Urania » Blog Archive » LaTeXit Updated for Leopard Compatibility

2 to “A fix for LaTeXit under Leopard”

  1. antonio molins says:
    that was helpful; but is not the right way to do it. you can read in here how path_helper actually works, and you will see how to fix it without breaking other things (namely, your fix broke textmate's latex in my computer): just add a new text file under /etc/paths.d/ that includes the paths you want added, one per line. that fixes latexit, and does not break any other program.
  2. admin says:
    Thanks for that piece of advice. I will note that when I execute /usr/libexec/path_helper -s, the process hangs. This may be the issue that LaTeXit is having. I tried adding a /etc/paths.d/macports file containing the path /opt/local/bin, but /usr/libexec/path_helper -s still hung. I'll let you know if I do manage to get this to work

Leave a Reply

  • Translate

  • Astro Pic o' the Day

  • Archives

  • Admin

↑ Top