Making xfig, as installed by fink, happy

I got a new Mac laptop last winter, and am still in the process of getting all of my old software installed on it. I spent most of the evening struggling with xfig, and want to record this my discovery for anyone else who is having the same problem.

I installed xfig using fink, and got the message

Either you have a very old app-defaults file installed (Fig),
or there is none installed at all.
You should install the correct version or you may lose some features.
This may be done with "make install" in the xfig source directory"

Running “make install” was useless. I found the solution here. In summary, if you are in the habit of running xfig by bringing up an X11 terminal and typing “xfig”, you probably want to be typing source /sw/bin/ ; xfig instead.

I know very little about what’s going on here, so I won’t try to explain more, but I found quite a number of message boards where this bug was discussed before finding one where it as solved, so I thought it might be useful to disseminate the solution. All credit goes to Alexander Hansen, whomever he may be, for figuring this out.

10 thoughts on “Making xfig, as installed by fink, happy

  1. I should note that the #fink channel on is among the most helpful technical support channels I have ever encountered in my life. Just recently one of the devs spent hours adding a package just because I mentioned in the channel that it was a missing dependency for something I wanted to build.

    If you have issues in the future with Fink, that might be the first place you would want to ask :)

  2. The file updates some environment variables so that xfig knows where to find other programs and libraries installed by fink. You can add the line

    . /sw/bin/

    to the file “.profile” in your home directory so that it’s automatically run whenever you open a new terminal, and then you should be able to just type “xfig”.

  3. I’ve had better luck with macports. All I had to do was type ‘sudo port install xfig’ and I was up and running in less than 10 minutes.

  4. (Disclaimer: my iBook no longer runs MacOSX so my information may be out of date)

    fink does its level best to “play nice” with MacOSX (and that’s a good thing). In particular, it tries to make sure that it installs stuff in a way that doesn’t interfere with the existing stuff. It does that by installing in the /sw directory. However, at some point you want the system to know of its existence otherwise you could never run any programs that fink installed. So there’s a script, /sw/bin/, which tells the system where to find fink-related stuff. So whenever you run anything finky, you should ensure that that script has been called. The best way is, as Steven Sivek says, to ensure that it is run at login. If you use bash, then calling it from .profile is a good way to ensure this. If you use another shell (you should be using zsh, of course), then put it in the correct file.

    If you run xfig by clicking on an icon, and you don’t run from login, then you need to create a wrapper script, say “myxfig”, which contains the line that you mention: “#! /bin/sh; source /sw/bin/; xfig”. Then that can be clicked on and xfig will be launched correctly. Of course, best is to load at login.

    Actually, best practice is to use TikZ and forego xfig altogether …

  5. There’s a Java clone of Xfig, creatively called “jfig” that you can get here:

    It works fine on OS X without any installation — just double-click the “jfig3.jar” file. Unfortunately, it seems like you can’t download it at the moment (some odd message about bugs having been found) so really this comment is pretty useless.

    In general, of late I’ve had better luck with than fink, though xfig actually works for me fine with fink.

  6. Why xfig and not, say, Inkscape?

    Aside from the drawing capabilities, I assume that, on a Mac, you’d really want PDF output for your figures, which xfig does not (AFAIK) provide.

  7. As for “Why xfig?”, because most of my collaborators use it, and I am still more familiar with it than with other vector graphics software. I’ve been playing with InkScape and find it better in most ways, although it has some habits which baffle me; my next solo paper with figures will probably be drawn in InkScape.

  8. Jacques, you can export to PDF in xfig; it comes out fine.

    Ah. It’s been a long time since I actually used xfig. Either I misremember, or PDF export feature is of more recent vintage.

    As for “Why xfig?”, because most of my collaborators use it…

    Mmmmm. Yes.

    I’ve been playing with InkScape and find it better in most ways, although it has some habits which baffle me; my next solo paper with figures will probably be drawn in InkScape

    The other thing I find annoying about most graphics programs (Inkscape included, but xfig is worse) are the hoops you have to jump through to include mathematical formulae in the figure.

    The only drawing package that (IMHO) does that right is the WYSIWYG graphics editor bundled in Instiki. For my last paper (136 figures), that proved invaluable, though I did have to figure out how to batch-convert the figures to PDF format.

Comments are closed.