Recently in Mac Category

As I mentioned last week, I've been working on upgrading my system from 10.5.7 to 10.6.3, performing as clean of an install as possible to clear out years of crud under the hood. I've wrapped up the last of my upgrades, and am up and running on a freshly built system.

The only real hiccup was with the Postfix compile, once that was sorted, everything else was fairly straightforward, simply a matter of grabbing all of the various packages to make everything here run, run through all the necessary compiles, then finally transfer over various changed files since the last copy.

Here is a list of the software currently installed for mail and web services:

Xcode 3.2.2
PHP 5.3.1 (10.6 built in version)
Apache 2.2.14 (10.6 built in version)
MySQL 5.1.45
Postfix 2.7
Dovecot 1.2.11
Cluebringer 2.0.10 (Policyd 2.0)
PCRE 8.0
DBI 1.609
DBD-mysql 4.014
Net-Server 0.97
Net-CIDR 0.13
Config-IniFiles 2.57
Cache-FastMmap 1.35

Initially I needed to copy the etc/postfix directory to preserve configuration files when installing the new Postfix,also copied over /var/mail to bring over the mail stores used by Postfix/Dovecot, and a handful of other config files, /Library/Webserver for the web pages.

To get Apache running, there were some simple edits to enable the built in PHP, and setting up the correct vhosts again; I hand edited the files to match the old config to keep from introducing any unneeded changes.

I think that the only real surprise was that there weren't more surprises. I now have everything running in 64 bit mode on the new server, with the exception of some 3rd party apps. Sweet.

In my web searching recently, I came across DIYMacServer, a site who's focus is all about running Postfix, Apache, PHP, Dovecot, and related code on the Mac. There are numerous articles about each software update that comes down the line, and the author, Richard Valk, does a great job at documenting everything he can about changes each update brings, and how it effects his system.

So, I'm trying to compile Postfix 2.7 on my new 10.6 system. During make, I get this:

In file included from dns_lookup.c:152:
dns.h:23:29: error: nameser8_compat.h: No such file or directory
make: *** [dns_lookup.o] Error 1
make: *** [update] Error 1

A google search found a suggested fix, in /src/util/sys_defs.h, the following line should be commented out:

#define RESOLVE_H_NEEDS_NAMESER8_COMPAT_H

With this line commented out, I'm able to get a good build, but at what cost? Presumably this is going to break some of the name resolution that Postfix uses, which would not be good. After reporting this on the Postfix mailing list, I spent some additional time researching the issue, but ironically kept coming up with various pages that mirror the Postfix list, and kept coming back to my own posting... Time to switch gears.

It's upgrade time again here, and I've made the decision to set up a brand new system on the Mac Mini here. The current system originally started out under 10.3, was then upgraded to 10.4, then 10.5, and also saw at least one hardware switch in there. While fairly stable, I know there's a lot of crud under the hood left over from all the various installs, upgrades, and software changes. So, I'm setting up a new server completely from scratch on Snow Leopard, Mac OS X 10.6.3. I've set up a spare Mini for this work, so I can have both systems up and running simultaneously.

In my prior posting, I set up a script to handle the syncing of my iTunes library between my home system and the carputer. The script works fine, but executing it via the Terminal is a pain. With OS X, it is possible to rename a shell script with an extension of .command, which will allow it to be double clickable in the Finder, but this unfortunately will cause Terminal to launch, show the output, and then leave the Terminal window open when the script finishes. There are a few hacks to get around this, but the most common solution I've found is to instead call the shell script via AppleScript. As usual, this has caused a few additional headaches...

Syncing an iTunes library between two computers isn't a straightforward task, normally for this I would simply drag the necessary files between two computers, but for the carputer project, this wasn't desirable. I need some way to keep the two systems in sync with a minimum of fuss and effort. Fortunately, there is a terminal command called rsync that is ideal for handling this task. Rsync works over an ssh connection between the two systems, and since this is running via a script, the login for this connection needs to run without asking for a password, so the use of ssh keys is required. There are a number of good tutorials on setting this up on the web, so I won't document that process here.

The script I need also needs to address a few other issues, including the system sleeping, which presented a few additional wrinkles. As things stand now, the carputer will be a laptop, and will run via the power adapter most of the time. When the car shuts off, the power adapter will be off, and the laptop will be on battery power. The Energy Saver settings are set to sleep the laptop after 1 minute. Obviously, if I'm in the middle of syncing data, I don't want the system to sleep, so the script will override this.

Finally, the script needs to check if the system we're syncing data from is reachable, and abort if it isn't. So, that being said, here is the current script I'm using:

There are a number of front ends used for Mac based carputers, unfortunately most of them are either abandoned projects, lacking in features or polish, or otherwise not quite exactly what I wanted. My main objective was simply to use this as a big, fancy iPod, my old click-wheel iPod just isn't quite cutting it anymore in the car. Something that used cover flow would be ideal, easy to navigate, clean interface, in short, what I was looking for was basically already part of the Mac OS, Front Row.

My main issue with Front Row, though, was that my plan was to use a touchscreen interface for the carputer, and Front Row did not allow for such use, it used keyboard input only, or the Apple IR remote, which is basically a remote keyboard, mouse or similar inputs aren't used. What I wanted, ideally, would have been some way to remap the touchscreen input, so that I could touch the top or bottom of the display for up/down arrows, left/right sides for left/right, etc. Unfortunately, I wasn't able to come up with any software that would let me capture inputs this way, so I was back to square one.

A number of folks had recommended the Griffin PowerMate for controlling Front Row, but I wasn't terribly happy with that solution either. At this point, my plan is to use a Logitech Precision Gamepad to control the action, and the USB Overdrive software to remap the controls for what I need.

After some testing, I found that I really only need four keystrokes, up, down, return, and escape to do all I need done in Front Row. My plan for phase two of this project is to disassemble the gamepad, remove the d-pad portion of the controller (lots of soldering and hacking there) and fabricate a new housing for this that would be placed at the steering wheel for easy access, that is, unless some better idea comes along.

So, with the controlling part done, the next thing I needed done in software was a way to keep my tunes in sync with my home system. Time to start coding...

November 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30        

About this Archive

This page is an archive of recent entries in the Mac category.

iPhone is the previous category.

Movable Type is the next category.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 5.031