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.]
Leave it to Mark Liyanage to keep us up to date with all that "just won't compile on OS X" software. This time - he's got the latest PHP 4.2.0 ready to go for us, either on his site, or through a simple shell script.
Read the rest of the article if you'd like to use the shell script update method...
Ever wonder what someone ment when they told you to RTFM? Well the answer isn't what you may think it is; it means they wanted you to go to the RTFM ftp server at MIT! They have a HUGE (as in really really big) archive of documents, records, and faqs of usenet resources, etc. One in particular people here might find useful is the Unix FAQ archive.
And have a look around, you'll find a lot more useful stuff there, too. In fact, I dare you not to get lost!
Ever wish the startup messages went by just a bit slower so you could read them? Especially in verbose mode? Then dmesg is for you. dmesg displays the contents of the system message buffer, including the startup messages seen in verbose mode. Just open the Terminal, type dmesg | more and see what went flying by on the screen during your verbose-mode boot. Try man dmesg for a bit more information on how it works.
There's a great program called GNU VCDtools that lets you do many things to VCD's. Buried inside the app is a program called vcdxrip. To get everything right you need a few arguements to have it put out a simple .mpg:
alias vcdrip '/Applications/GNU vcdtoolsX 1.0b.app/ Contents/Resources/vcdxrip --no-ext-psd -o ~/.Trash/blah -b'
[NOTE: Enter on one line with no extra spaces; shown on two for narrower display purposes]
Now whereever I am, I can rip a VCD into a mpg. It tosses the XML information into the trash and it doesn't drop out any other input. Nice clean MPEG result.
Last October, I wrote a beginner's guide to installing XFree86, fink and The Gimp on OS X (see this hint). At that time, it was easier to get the 'rootless' XFree86 installation outside of fink. Since October, the situation has changed and fink can now install the latest version of rootless XFree86. After stalling for quite a while, I decided it was time to upgrade my installed version.
Since I had originally installed XFree86 without the help of fink, I had to remove it that way as well. I intended, however, to use fink to install the newest version. Here's all I did to upgrade to the newest XFree86 release:
Remove the two existing X11 directories with sudo rm -r /usr/X11R6 and sudo rm -r /etc/X11
Remove the XDarwin application with sudo rm -r /Applications/XDarwin.app
Install the base Xfree86 installation with sudo apt-get install xfree86-base (41mb download)
Install the rootless patch with sudo apt-get install xfree86-rootless (5mb download)
While the guide was useful at the time it was written, the advances in fink and XFree86 have made it much easier to install a rootless XFree86 server. If I were starting from scratch today, I'd simply install fink then XFree86 as shown above; there is no longer any need to install XFree86 separately (unless you wish to do it that way, of course).
[Site administrative aside: Due to a very early morning commitment at work on Wednesday, updates will be published in the evening, Pacific USA time.]
Don't know if you guys know about this mailing list called UNIX Guru - but it is a very nice "Tip a day" sort of list. No BS, ads, etc. I have receivedd it for the past two weeks, and already I have learned a lot I did not know. These are just the sort of tips us macosxhints.com readers love. The kind of stuff you grab and throw in your goodie bag for the day you might need it. You can view the tips and sign-up for the newlsetter here:
What I really was missing on OS X so far was a small mailchecker. There are several programs for mail checking, but each one I tried takes almost as much RAM as Mail.app, which I use. So I wrote a little script, run by cron, which checks whether there are new mails (using fetchmail) and fires up Mail.app if there are.
Read the rest of the article for the script and installation instructions.