If you have your own webserver running on your OS X machine, then think of adding Google API calls. Implementing it is easy, but you need to install extra Perl or PHP libraries. A simple Google API example script plus helpful links can be found at kung-foo.tv.
I have seen a bunch of different threads on different mailing lists regarding problems with Sendmail on OS X because of permission problems. To make life easier, I created this StartupItem to deal with the problem. This has been tested on 10.1.4. I run postfix instead of Sendmail, so this isn't an issue for me, but in the interest of being helpful, here's a fix.
This startup item fixes the permissions on /, /etc and /etc/mail so that Sendmail (as distributed with 10.1.4 at least) will run. Read the rest of the article for the scripts...
[Editor's note: I had a minor database glitch this morning, and I just noticed that this article was under my by-line. I have now corrected it to reflect the original submitter; my apologies for the incorrect attribution!]
Here's a perl script that will create a new email in Mail.app. I wrote it so I can type "mail email@what.ever" in Terminal, and have it open up a new message in Mail.app (I've named it "mail", and put it into my own ~/bin directory). This will be of interest mainly to unix heads inured to typing "mail" into the command line.
I don't know if I'm alone with this, but I think that Terminal.app has lots of room for improvement. You don't get syntax highlighting in vim without some trickery, for instance. I used to stick to xterm in OroborOSX. But it's really slow. First I thought it all had to do with XonX, but after having installed Eterm, I see it's much faster, and it has a more accessible scrollbar as well.
For those who haven't heard of Eterm, it's the terminal application of preference with the Enlightenment window manager, popular together with Gnome. It's highly configurable and "themeable" for those who appreciate such things. If you have fink installed, installing Eterm is as simple as:
% sudo apt-get install eterm
[Editor's note: Eterm is a very nice terminal program. I trashed my fink installation tonight on accident, but it only took about 20 minutes to get it all running again, with eterm installed. Wiht lots of unique themes and fast scrolling, it's a nice alternative to the OS X Terminal.app.]
Want to display your hostname and current directory in Terminal.app's title bar? Now you can!
Create a script called chg_dir.sh (/Library/Scripts is a good place) with contents as follows:
#!/bin/sh dir=$1 if [ ! ${dir} ] ; then dir="$HOME" fi echo -n "^[]0;`uname -n`:${dir}^G"
NOTE: ^[ represents the escape key, ^G represent control-G. To type these non-printing characters in vi, use ctrl-V and then "escape" and "control-G".
Edit your .cshrc (or equivilant) and add these two lines:
echo -n "^[]0;`uname -n`:${HOME}^G" alias cd "cd !* ; /Library/Scripts/chg_dir.sh !*"
Now when you start a new terminal session, the title is set to "host:/home/dir". When you change dir it becomes host:/current/dir".
[Editor's note: There was another way to accomplish this same result posted in an earlier hint, but this one was unique enough to merit its own mention. I tested this, and it works as described. I added the two lines to my existing "aliases.mine" file, and placed the script in ~/bin. I still personally prefer this hint, which explains how to show the current command in the title bar, but the directory info is also useful.]
Over on freedb.org, there's an article by 'ruebenschuss' that covers installing the freedb server locally on OS X. freedb is an offshoot of the now-commercial CDDB, which is what many programs use to catalog and recognize inserted CDs.
Why would you want to install a local version of the database? The author writes:
Since OS X is a proper UNIX, it should be fairly easy to run the freedb on it. I've managed to compile the freedb server with only few changes and query it via telnet. It should be possible for any CD rip application to connect to "localhost" as cddb server and get the information there. This would make it possible to rip CDs without a connection to the internet.
The article also links to a separate page which contains the how-to instructions, the database files, and the server source code for installing on OS X.
At this point, installing the files locally will not allow iTunes to recognize CD's without an internet connection, but the article discusses how that may be possible in the near future.
I just installed mpg123, a command line MP3 player. It's not as comfortable to use as iTunes, but it works fine. A benefit of the command line interface is that it uses very little memory and less than half the CPU as compared to iTunes - a big plus if you are on an older G3. The binary is available on macosx.forked.net.
[Editor's note: In case you'd like to install this yourself from source, it's not that difficult. You'll need the Dev Tools installed, of course, but after that, just download the 0.59r source from the mpg123 homepage linked above, then visit the mpg123 OS X port page on SourceForge and download the patch files. Expand the archive, then read and follow the directions in README.MACOSX (basically rename a file, then 'make macosx' and 'sudo make install'). Once installed, typing 'mpg123 /path/to/mp3_file' will play the specified MP3 file. Type 'mpg123' without any parameters to see a command list.]
The Central Institute of Technology offers Learning UNIX, a free, self-paced self-study guide on UNIX. The course covers:
Module 1: Introduction to Unix
Module 2: vi editor
Module 2a: mail
Module 3: Shell scripts
Module 4: Terminals, devices and csh
Module 5: awk
[Editor's note: I browsed through this course, and althought it's targeted at Linux systems, much of what you read will be applicable to OS X. There are other online UNIX tutorials, of course; a few of them are linked from the Links page.]
I saw your earlier tip regarding changing the motd file, but this takes things a little further. I created a shell script that is run periodically via cron (run as root, so it has write permission to /etc/motd) that changes the message of the day based on the time. I stored the script in /usr/local/bin, set the execute flag and changed the owner to root and group to wheel.
Read the rest of the article for the script and an explanation as to how it works.
When first using dselect, the package manager with Fink, be very careful about letting it create users.
I wasn't paying careful enough attention and allowed Fink to create five or six new users, one of which was called "mysql". I already had a mysql user in order to run a MySQL server, but the new user Fink created overwrote that user, breaking my MySQL installation.
It is easy enough to remove that user, and recreate a mysql user, change the ownership of the correct files, and restore your MySQL installation, however, DO NOT use the Users preference pane in System Preferences to remove any of the users!
When Fink creates the users, if you check NetInfo, you'll see that each user's home folder is "/". Not good. Mac OS X assumes that when you remove a user, you, the admin, should take over the ownership of the former user's files. However, its not too smart about how it changes the ownership. Starting at the mysql user's home folder, /, OSX chowned EVERY SINGLE FILE stemming from the root directory to now be owned by me, nelsonj. To delete the user, you gave OSX root access, so it was able to change the ownership of all files, even those owned by "root". Things immediately ceased to work. I had to log out and log in as root (su and sudo don't work without the proper file ownerships). Tehn I had to change the ownership of everything back to root, then specify certain directories and change them back to my own. It's still not working 100%.
The lesson is either don't let Fink create new users, and/or don't use System Preferences to delete the users!
[Editor's note: I can't confirm this situation, as fink has never created a user on my system, but I thought a warning may be in order given the description of the situation! If you have further information, please post what you know about fink and user creation.]