Launch fink apps from xterm in Apple's X11

Jun 21, '04 09:14:00AM

Contributed by: harrr

I like fink because it's relatively simple to set up. For convenience, I use it only with binaries -- Tetex, GnuCash, xnmap, ... everything works with a few clicks of a mouse. But it took me ages to figure out the path problem. For some reason, Apple X11's xterm couldn't remember fink's /sw/bin path. I configured ~/.xinitrc (as recommended in fink FAQ and earlier hints) and various bash profiles. But I never got it right. The fink FAQ recommends to prefix fink applications with a source command. That works nicely. For example:

source /sw/bin/init.sh ; gnucash
But I don't want to prefix every command I type in a terminal window. For example, when sudo-ing xnmap or running latex on a file several times before launching xdvi. The fink FAQ recommends to customize applications in the Applications menu in X11 with the source prefix. That works. In X11, I chose Applications -> GnuCash to launch GnuCash. Very nice, indeed.

And here's the hint: Do the same with xterm. In Apple X11's Applications menu, choose Customize... and change the default entry for xterm to:
source /sw/bin/init.sh ; xterm -sb
That's it. fink applications launch in X11 from a command line. No need to configure system files, write shell scripts or prefix commands individually with source /sw/bin/init.sh. BTW, I use -sb to add a scrollbar to the xterm window.

I don't know if this hint is too obvious. The trick is that xterm is not a fink application. xterm launches also without the source prefix (which xterm returns /usr/X11R6/bin/xterm), so it took some time before I tried to prefix it also.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20040619080806356