Installing Fortune

tieng

Registered
I'm not really that Unix literate...has anyone had any luck installing the Unix Fortune program? Source available here .

I'd really like to be able to get this to run, and I have a feeling it involves just tweaking the makefile...could someone post instructions if you've been able to get it running?

Thanks,
--Gene
 
Hey tieng,

I spent a couple hours last night messing around with fortune and got it installed and working with a pretty big assortment of fortunes, including the "Jargon File," which is a great assortment of anecdotes and definitions of geek terms and culture.

I've just finished making it nice and pretty with a quick install method. Just be sure to read the README file. It's posted here:

http://www.users.qwest.net/~lscott44/macosx/

Have fun and let me know if it works for you!
 
Thanks for the work you did in getting everything to work.

I'm trying to learn more about OS X and Unix in general; if you have the time and could give me step by step instructions on where you got the source, and how you tweaked the makefile to make it work, I would really appreciate it and would get me that much farther in my quest to become Unix proficient...

Thanks again,
--Gene
 
Hey Gene,

I originally downloaded this version of fortune from here:

bsd fortune on versiontracker

If you compare the original to the modified version I think you'll see what's new and different. It had already been compiled in this distribution but I wanted to recompile it so I could put things into an accessible path. I also renamed the "datfiles" directory to "fortunes" because this is the traditional name for the fortunes data directory.

Strictly speaking this was a perfectly good version of the program but it didn't compile very cleanly under MacOS X. Lots of warnings about ambiguous if...else statements and a mis-declaration of the memset() function. I cleaned up the source code and added a 'make install' option in the Makefile.

Other things I've been able to get to compile under MacOS X include: joe, lynx, links, pine, DBI, and mod-perl. An awful lot of open source freeware is already set up to compile under Darwin/MacOS X so in a few cases there wasn't much to do. But today I was trying to get the xfdm window manager for X-Windows to compile cleanly and kept running into piles of dependencies. I finally gave up and settled for an older pre-compiled version.

If you have something you'd particularly like to get to compile I may be able to point you in the right direction, but generally I just keep tweaking until things start to work. It's been a lot of trial-and-error but it's starting to make a little more sense. Dependencies are tricky. When the 'configure' script can't find things where it expects them to be it can be pretty tough to sort out. There are two files on MacOS X that can sometimes help out:

/usr/share/libtool/config.guess
/usr/share/libtool/config.sub

If you copy these files into the distribution folder (where 'configure' lives) they can sometimes give hints to the script about how to carry out its business.
 
Slur...

Thanks for the help with fortune; it ended up working fine, and I appreciate the time you took in cleaning it up and fixing the makefile. You should submit your version to versiontracker; it's easier than installing the BSD fortune they have there.

Since I have your attention, here's another, completely unrelated question for you.

I know you can make shell scripts double-clickable executables; I'd like to have all the .tar.gz files I download with OmniWeb and IE get extraced with the command line tar util intead of with Stuffit Expander (expander just takes too long to launch).

Do you know of a way to make that happen?

Thanks in advance,
--Gene
 
There is a freeware app available called "DropScript." You can download it here.

You don't use DropScript itself to do the extraction, but it comes with two example scripts, "shove.sh" and "unshove.sh". If you drop "unshove.sh" on DropScript it creates a very small application called "DropUnshove" that you can use to extract tar and tar.gz files. Set this as your helper for extensions .gz and .tar in Internet Explorer and OmniWeb and they should do the right thing when you download files of these types.

(Note: In the preferences for Explorer's file helpers I had to change the assigned creator code from SITx to ???? before it would use DropUnshove to open the file; otherwise it would open with Stuffit.)
 
thank you, slur, it worked perfectly, after installing a C compiler. But one thing, now that i know how to use darwinports, may i ask, how do you uninstall it?
 
Back
Top