Potential Differences

Wed, 10 Mar 2004

Automate Plist Verification

Mac OS X can have some hard to diagnose problems if preference files become corrupted. Based on an initial idea on Macintouch, I read a couple of man pages and came up with an /etc/weekly.local file that looks like this.

#!/bin/sh

echo "Checking preference plist integrity"
find /Users/gvaughn/Library -name '*.plist' -print0 | xargs -0 /usr/bin/plutil -s

In detail, we’re finding all the *.plist files under your home directory’s Library subdirectory (substitute your username for ‘gvaughn’). The 0 on the print and xargs uses a NULL separator so we can handle files with spaces in their name. Then all the found files are passed to plutil for syntax checking. The -s option says to be quiet unless there’s a problem.

I hope someone finds this useful. If you find ways to beef it up, please let me know.

potential differences [/mac] permalink

Fri, 11 Apr 2003

OS X as a Postscript RIP

A couple of weekends ago, my old printer died just as my wife was working on taxes. She still hasn’t made the leap to OS X, so I had to get the new HP 5550 printer working from her desktop — quickly. The printer is attached to my SMC Barricade wifi router. Well, it ends up OS 9 can do IP printing, but it assumes the printer understands postscript, which mine doesn’t. I knew the CUPS framework could handle the rasterizing of postscript to the HP, so I just had to figure out how to do it from the OS 9 machine.

I had already discovered linuxprinting.org when I first setup the TiBook to print to the HP. Gimp-print gets a lot of press, but for HPs, I recommend hpijs. Another section of that site offers PPD-o-matic which allows the OS 9 machine to set various aspects of the printing through it’s normal IP printing infrastructure, even though it’s really an inkjet it’s printing to.

My last piece of the puzzle was to find an article at macosxhints.com to setup an lpd daemon on the OS X box. So, with some trepidation I pointed the OS 9 machine to print to the TiBook. I pictured OS 9 converting to postscript, spooling it out over ethernet to the router, which sent it over wifi to the TiBook, which then rasterized the postscript, and spooled it over wifi back to the router, which dumped it to the printer. Nothin’ but net! My jaw dropped when it worked flawlessly the first time I tried it. I love OS X!

Note that this solution would work with any printer that OS X can print to, and from any client that can talk to a networked printer, and it’s free. Did I mention I love OS X?

potential differences [/mac] permalink

Thu, 10 Apr 2003

Rendezvous Virtual Hosts

This is one of three websites I find myself involved in either setting up from scratch or giving a major face-lift. The other two are my hobby website for country guitarists that I’ve been doing for 10 years, COWPIE and my church website, Hope Reformed Church. So, on my TiBook I’ve got all three setup as apache Virtual Hosts. I thought it would be really cool to have them all published under Rendezvous, but it’s not as easy as it sounds. I’ve emailed Joe Maller a bit about it after reading his post on macosxhints and he told me today that he’d published an article on it over on O’Reilly’s site.

It’s getting late, so I doubt I’ll fully digest and play with his ideas this evening, but from a quick skim, it’s still too hackish for my tastes. For now I’ll just do without rendezvous. I’ve already entered the cowpie.local and hrc.local hosts in my /etc/hosts file, so it’s not too hard to bookmark them.

There’s an app called Rendezvous Beacon I downloaded the other day that I had high hopes for because it says it can advertise on behalf of another host, but I can’t get it to work. Maybe it’s because I registered my hosts in my /etc/hosts file and it’s only looking in the netinfo database. I haven’t had time to dig any further.

potential differences [/mac] permalink

Transparent Prefs

I love the fact that OS X has a hackable preferences infrastructure. So much of it is hackable which is what makes it such a great developer platform. I’m bringing this up because in order to get around the Blapp prefs problem I mentioned yesterday, I just opened the prefs file in the plist editor and took care of it :-)

potential differences [/mac] permalink