Sharing address books

Now that I’ve got my calendar stuff all figured out, it’d be nice to do the same with my address book and contacts. Right now, the “reference” version of my address book is stored in the Mac Address Book application. From there, I use Missing Sync to synchronize it with my Palm, and Apple’s iSync to send it to my bluetooth-enabled cell phone. This all works pretty nicely. The missing piece is making the email directory available to my mail client, Thunderbird. Now, this would be relatively easy if I only ran Thunderbird on my Mac. There are a number of tools out there that will take exported Mac Address Book data and import it into Thunderbird on the Mac. The problem is, I also run Thunderbird on various different Linux desktops at work and at home. It’d be great to have the same address book available on every mail client I use.

The other day I ran across this site which describes how to build a shared address book using a private LDAP server. This is a great idea that hadn’t occurred to me. Thunderbird has built-in Support for accessing remote address books via LDAP. If I use OpenLDAP (which is conveniently available as a Debian package), I can even run slurpd and keep replicated servers at home and work. This should be fun to try out.

Once the server is in place, the issue then becomes getting the Mac Address Book to synchronize with the LDAP server. That is probably going to be the biggest challenge of the project.

The drawback to this approach is that there’s no way to automatically update the LDAP database from Thunderbird. It essentially becomes a read-only data source. However, there are a few free web-based LDAP admin tools floating around, so I could probably adapt one of those to suit my needs. It’s not a perfect solution, but it might work.

Bluetooth and iSync

Bluetooth is a really neat technology. It’s got a lot of potential, but there are still a lot of issues with it. The pie-in-the-sky dream is that we will have all these different Bluetooth gadgets that all interoperate perfectly. The reality, of course, is not as rosy. There are lots of devices that speak Bluetooth, but for various reasons I won’t go into here, they don’t all work with each other, at least not without lots of fiddling. So, when something does work perfectly, it’s noteworthy. A little sad, but true.

This week I got a new Motorola e815 phone for work. One thing I’ve always dreadded about getting a new cell phone, is trying to get all of my stored contacts from my old phone into the new phone. It’s always been a tedious, manual process. Anyhow, the e815 supports Bluetooth. My Powerbook has an app called iSync, which purports to sync info from iCal/Address Book over Bluetooth to various models of phones. Fired everything up, went to Bluetooth Options on the Mac, paired it with the new phone, ran iSync, and my entire address book was transferred to the phone. The whole process took less than 10 minutes.

This is the way this kind of technology is supposed to work. I wish everything else was that easy. I initially tried to pair the phone with my Palm Tungsten E2, but I haven’t been able to get that to work. I’ve heard that it’s possible to get the phone to act as a modem so that you can surf the net on the Palm. However, if it doesn’t work out of the box, I’m not going to bother. It’s not a feature I’d use a whole lot, and I don’t want to waste a lot of time fiddling with it, especially if there’s a chance I won’t be successful. I’m just happy that I can transfer my address book to the phone. It’s always bugged me that I’ve got this great phone book on my Mac and Palm, but not on my cell phone, where I am actually making the calls.

Now, if I could just export the Mac address book to Thunderbird (on the Mac and all my various Linux boxes), I’ll be even happier…

Update on calendar stuff

I haven’t done much with my calendar stuff recently, for a couple of reasons; one being that work has been crazy and I haven’t had much time to hack on it, and another being that it’s all working without a hitch. I don’t even have to think about the Oracle Calendar stuff; my cron job auto-downloads it several times a day, and all I need to do is fire up iCal, refresh all calendars, and sync to the Palm. I see that Missing Sync version 5.0.3 final has been released, but beta6 is working fine for me so I’m not in a fired-up hurry to upgrade. I’m starting to make more and more use of iCal’s concept of multiple calendars; I already have a calendar with various family birthdays and anniversaries, and I’m going to do one with holidays. Holidays will be a good test of how the Palm handles repeating events, and how well Missing Sync translates repeating events from the iCalendar files to the Palm. I’ve also found myself using PHP iCalendar quite a bit when I don’t have my Mac handy. All in all, I’m really happy with how this whole thing has turned out.

What’s next? More features, of course. I’d really like to have attendee data for some of my meetings. Because of the performance issues involved with downloading attendees, I’ll have to do two separate downloads (a large range without attendee data, and a small range with attendees) and merge the two together. This could create some problems because of the way I’m munging UIDs for repeating events. Since I’m just appending ascending numbers to create unique UIDs, there’s the chance that the same event could get a different UID depending on the date range that’s being downloaded. I think before I try to do anything fancy, I need to rethink the way I’m assigning UIDs to events. This could present an interesting challenge. Anyhow, more on that later.

The Holy Grail of this project, of course, would be to have two-way syncing with Oracle Calendar, where changes I make on the Palm or in iCal will get back-propagated to Oracle Calendar. However, this increases the complexity of the project quite a bit, and I doubt I’ll ever go there. I don’t really miss the functionality all that much anyhow.

More on iDVD and DVD burning on the Mac

Well, unfortunately, it appears that iDVD doesn’t work quite as I had predicted in a previous entry. Apparently, even though it stores the encoded video between sessions, it still needs the entire uncompressed iMovie project to be able to do anything with the project. I learned this the hard way, after I had deleted some stuff from the iMovie, and found that I could no longer go into iDVD and burn a new disc. So apparently, the encoded data that iDVD stores is only there to speed up subsequent burns, and not for archival purposes. So, this is a bit disappointing, but that’s life (I guess they figure disk space is cheap, so why wouldn’t I want to keep 15+ gigs of uncomressed video around for every tape I shoot).

Basically, what I’m looking to do here, is just archive my DVD image somehow so that I can burn extra copies down the road. Once I’ve edited the video, created the menus etc., I don’t care about making further mods to the project itself, I just want to keep a copy of my work in case a disc goes bad down the road, or whatever. It appears that iDVD isn’t my answer here.

Fortunately, the solution turns out to be much simpler: Once I burn a project to DVD, I can just extract the image from the disc, and re-burn it to a new disc. Apple conveniently provides an article that describes how to do this.

In practice, this seems to work, but the process had a couple hiccups. I tried it out with one of my previously-burned discs. Extracting the data onto the hard drive went without a hitch. Then I went to burn the image onto a new disc. The first attempt failed. I took the disc out of the drive, and it had a physical glitch (appeared to be a speck of something, but I couldn’t wipe it off the disc) right where the burning stopped. On the second try (with a new disc of course), the disc burned successfully, but then it went to verify it (which I’m guessing just does a byte-by-byte comparison of the image on the DVD with the image on the hard disk), and that failed. However, the resulting disc played fine all the way through on the Mac.

My whole recent experience with DVD-R burning leaves me feeling not overly confident about the reliability of the media, but despite the glitches, I seem to end up with playable discs. Not quite sure what to make of it. At any rate, in the future, I think I’ll burn two copies of each iDVD project. One copy can be for archival purposes (to burn more copies down the road), and the other for playing. Alternatively, I could burn one copy and then extract the image, and save the image on my hard disk. Or I could do both (I believe iDVD can create disk images directly, but I haven’t tried it yet). When finished, I’ll delete the iMovie and iDVD projects. And, I’ll be sure to keep the source tapes around.

All in all, it’s great that this technology works as well as it does, but it’s got a bit of evolving to do before I will feel like I can completely trust it!

DVD Playback weirdness on the Mac

Well, I burned my second DVD today. I used the same parameters as my first disc, and the burn process was smooth (one thing I forgot.. in iMovie, when you go to auto-create an iDVD project, there’s no way to export only a subset of the actual content in iMovie. You have to physically delete the stuff you don’t want, then export. Bit of a pain, but shouldn’t be an issue for me any more beyond these first two discs — I’ll just do one iMovie per disc from now on).

After the burn, I popped the disc in the Mac and played some of it back. In one spot, it locked up. The app locked up and the drive seemed to be stuck seeking back and forth. I ended up powering down and rebooting. Tried again, froze up in the same spot. Bad media, maybe? Then, I took the disc home and tried it in my standalone DVD player. The same passage that froze the Mac, played fine in the standalone player. I haven’t viewed the rest of the disc yet, but I’ll do that tonight and see how it fares.

Seems a little odd that the Mac SuperDrive would have problems playing back media burned on the same drive.. Will have to check this out further.

Update 1/5/06: The entire disc played fine on my standalone Sony DVD Player. Not quite sure why the SuperDrive is having problems with it.

Followup: I just burned the exact same movie to another DVD. Playing it back in the Mac now. So far, no lockups (in particular, it did not lock up at the same spot it did with the other disc). I guess the SuperDrive must just not like the other disc. Odd, because the discs are the same brand (Fujifilm) and came from the same pack-of-50. Who knows?

I did learn something about iDVD today… when you go to burn a project for a second time, it re-encodes the menus and audio, but reuses the encoded video from the first run. This is nice, because it makes subsequent burns go much faster. I was wondering about this at first, because after the initial encoding it leaves the encoded MPEGs (4+ gigs worth) in the project directory. When I initially went to re-burn, and it started re-encoding the menus, I was wondering if it was going to go through the whole 2+ hour encoding process again, and if so, why did it bother saving all that encoded data from the previous run? Well, now I understand.

This also means that if I want to re-burn the discs at a later date, I should be able to safely delete the (huge) captured video data and just save the iDVD project.

Sync stuff working great

Today I gave the Mark/Space iCal sync conduit a really good workout, and it came through it without missing a beat. First off, I added the LOCATION field to the Oracle Calendar download. I’m not sure why I wasn’t pulling it down originally, I guess it was just an oversight. As a result, I now have location data for my meetings, and a lot of existing entries now have the additional field.

Next, I created a new calendar that has a bunch of repeating events (various birthdays and anniversary dates). Then I deleted all of the birthdays and anniversarys that I had stored in Oracle Calendar. Finally, I added a couple new events via the Palm.

In short: Add a new iCalendar field to several dozen existing events, add a new calendar consisting of repeating events, delete a dozen or so existing events, and copy a couple events from the Palm to the Mac, all in one sync. The Mark/Space conduit handled everything without a hitch. The deletions propagated, the new fields were added, and the new calendar was added with the proper recurrence rules.

This is really the way things are supposed to work when you pay for software: It should work, work well, and work reliably, and if it doesn’t, the company should stand behind the product and either make it work, or refund your money. So far, it looks like the $40 for Missing Sync was money well spent.

This also makes me curious about event recurrences. The iCalendar spec allows for some pretty fancy recurrence rules. I’m not sure if the Palm Date Book allows that much flexibility. If I were to define a really fancy recurrence (say, an event that happens the second tuesday of every month except March, or whatever) I wonder how that would propagate to the Palm. One of these days I’ll have to try it.

Incidentally, I created my birthday/anniversary calendar from scratch with a text editor. Then I copied it to my web server and subscribed to it with iCal. It worked fine, and seems to be a good way to handle relatively static calendars like this. The only requirement is that each event needs to have a unique UID. I used UIDs of the form:

YYYYMMDDTHHMMSSZ-#@concerto.ucs.umbc.edu

Where # is an ascending number. For the date stamp, I used the approximate time that I created the file.

Calendar stuff is up and running

I’m now up and running with the automatic Oracle Calendar export stuff. The other day I tested the Palm sync stuff out, to make sure event deletions were propagating properly to the Palm. Initially, they weren’t. However, after I followed the instructions that I got from Mark/Space support, everything worked fine. These instructions are worth repeating here, as they may come in handy down the road:

Go to Missing Sync and hold the ‘option’ key down while you double click on the ‘Mark/Space Events’ conduit. When the settings window appears, click on the ‘Advanced Options’ button and then click on the ‘Unregister Sync Client’ button.

Then sync, when you do, you will get a dialog box with an orange iSync icon on it. Check the box to erase the device, then click the ‘Allow’ button.

This appears to erase all the existing calendar data on the Palm, and download totally fresh data from iCal. In any event, upgrading to 5.0.3b6 and then following these instructions solved my sync issues.

The next step was to automate the export of the Oracle Calendar data. I did this with a cron script. Right now I have the script run every day at 10am, 1pm, 4pm, and 7pm. It connects to the calendar server, downloads updated data, and updates the iCalendar file on the web server. (This runs on my Linux box at work, concerto.ucs.umbc.edu, as user www-data.)

So far, this appears to be working fine. I plan on keeping an eye on it for awhile to see if there are any issues. With this piece working, I can start to focus on improvements. Here’s the current wish list:

  • Add timezone data to the iCalendar file
  • Download attendee data for a small window of time (maybe 1 month or so starting from current date). Don’t want attendee data for everything, as it makes the iCalendar download take too long.
  • Do I want to treat “declined” events any differently from “accepted”? Right now, there’s no differentiation between the two in the downloaded calendar. Addressing this would mean keying off the STATUS field somehow.
  • Split different types of events into separate calendars. Various event types include “Meetings”, “Daily Notes”, “Day Events”, and “Holidays”. I might also want to separate out “Daily Notes” and “Day Events” that are created by users other than myself; this might be a way of handling the “accepted/declined” issue.
  • Revisit handling of alarms, if necessary.

A few of these will require tweaks to the actual download process, and the others involve rewriting the iCalendar output in various ways.

VNC at Home

Yesterday I played around a little bit with VNC (Virtual Network Computing) on our home network. VNC can be used (among other things) to pull up a remote desktop on a local machine and treat it as if you were sitting at the remote machine. One of its appeals is that it’s multi-platform, unlike similar technologies like Microsoft’s Remote Desktop Services. At home, VNC’s basic appeal is convenience. For example, while sitting upstairs, I can pull up the display of my basement Linux server to make a quick edit in GnuCash. Another example: When I’m doing our taxes, I can work downstairs in the office (where all our records are), pull up the Windows desktop upstairs, and run the tax software there.

Installation on the Windows box was straightforward. I just downloaded and installed the distribution from RealVNC, and it installed both the viewer and server. No surprises, and it seems to work great.

For the Mac.. My only Mac is a laptop, and I can’t really see wanting to connect to it with VNC. Still, I looked into it anyhow. First I tried a product called OSXvnc, which seems to work OK, but then I learned that MacOS 10.4 (Tiger) has VNC functionality built in, so I can use that if I ever need it. What I’m really interested in for the Mac, is a good VNC client. And that’s the weird thing.. Apple includes built-in VNC server support, but they don’t supply a VNC client. And there seems to be no one “defacto” VNC client that most people use on the Mac. There’s one called VNCThing, which was very hard to track down, but appears to work. It appears to be orphanware, though. There’s another one out there called Chicken of the VNC which appears to be a little less stale. Once I’m ready I’ll probably try that one out.

Next up: The Linux box. First the easy stuff: RealVNC supplies a Linux VNC client that works fine. That brings us to the server. In grand Linux tradition, there is more than one way to do a VNC server, and none of the methods is a perfect solution.

  • Method 1: Creates a totally new VNC X “session” (for example, if the main desktop is host:0, the first VNC session would be host:1). Advantage: modular and efficient. Disadvantage: Doesn’t export your main desktop, so everything has to be done inside the virtual VNC session. To access that, you need to use a VNC viewer even on the host PC. Fine for remote access, but not real efficient for working on the host.
  • Method 2: Export the main X11 desktop using a polling server such as x11vnc. Advantage: works fine, no extra configuration required. Disadvantage: slow.
  • Method 3: Export the main X11 desktop using the VNC module supplied for XFree86 v4. Advantage: ties into the X server itself, so no polling is required and it’s very efficient. Disadvantage: Doesn’t work with direct rendering (DRI module) enabled. If I start the server with both VNC and DRI enabled, the server freezes the first time I try to access it remotely. This seems to be a compatibility issue between VNC and my particular video driver/card (ATI Rage Pro or somesuch, r128 driver). If I disable DRI, it works fine. So, if I want to use this solution, I have to give up direct rendering (which really isn’t the end of the world).

This is sort of a microcosm of what’s wrong with the current state of desktop Linux. Lots of potential, but lots of interoperability issues. I still haven’t decided which method to use, but I’m sure I’ll settle on one eventually.

Now that I’ve got VNC working at home, the next step is to get it so I can access my home Linux desktop from work. To do this I think I want to tunnel the VNC connection through SSH. Google turns up lots of tutorials on how to do this, so once I’m back in the office, I’ll try it out.

Poor Man’s Screen Protectors

Palm (among others) sells these screen protectors for use with their PDAs. Currently, their web site lists them at $19.99 for some unspecified quantity of them. One came packaged with my E2. It’s essentially a disposable piece of plastic with an adhesive backing. You’re supposed to trim it to fit the PDA’s display, and stick it on. The claim is that it protects the display from scratches and “improves handwriting recognition.”

At first I wrote these off as totally worthless, but then I tried the included one, and I was surprised to find that it actually does help with Graffiti. I can’t see using it with one of Palm’s older B&W LCD screens, but with the color screens it does seem to make a difference.

What is a rip-off, is what Palm is charging for what is essentially adhesive-backed sheets of plastic. Always the cheapskate, I went poking around the house, and found a roll of medium-grade sheet plastic that my wife and I bought a few years ago at Jo-Ann. No adhesive backing, but I decided to try it anyhow, hoping that static cling would hold it on the display. I trimmed it to fit, wiped it clean with a damp rag, and tried it out. So far so good. It clings to the display just fine, and seems to work just as well as the real thing. And, I can buy several yards of the stuff (enough to make hundreds, if not thousands, of screen protectors) for less than what Palm is asking for a single pack of theirs.

Do I rule, or what? I’d better go now, I need to go look for my life.

Softick Card Export II vs. Missing Sync Desktop Mount app

Now that I have an SD card for my Palm, I decided to try out a couple of apps that allow me to mount the card on my desktop computer. I’d like to be able to copy files (mp3s, documents, etc) directly to the card from my Linux box(es). Then, I can write a script to copy mp3 playlists to the device, etc.

First up: The desktop mounting app that came with Missing Sync. This works as advertised on the Mac, but unfortunately, when I plug into my Linux box it’s not recognized as a USB mass storage device. It might just be a matter of updating the Linux hotplug subsystem to assign the usb-storage driver to the device. But the fact remains that it didn’t work out of the box. I’m not sure if it’ll work at all actually.. the documentation isn’t really clear on how the app works. I’m assuming that somewhere it’s emulating a USB mass storage device, but I’m not sure if the emulation is being done by the Palm app, or the Missing Sync app on the desktop. Next time I’m in the office, I’ll try this out on my Mac there, where Missing Sync is not installed. If it works, then that tells me the Palm app is doing the emulation, and I should be able to make this work under Linux. Stay tuned.

The next app I tried was Softick Card Export II, which costs $15, but provides a 21 day evaluation. On the Mac, it worked identically to the Missing Sync app. When I tried it on the Linux box, it immediately recognized it as a USB mass storage device, and I was able to mount and browse the card. So if I can’t make the Missing Sync app do what I need, it looks like I can use this.

The “dark horse” option here is to not use the Palm at all, and just get a USB SD card reader. I’m sure this would work great, but it’s one more gadget I’d need to carry around. If I’m already carrying the Palm around anyhow, I might as well use that. Still, if I’m going to consider shelling out $15 for Card Export II, I might as well price the USB readers as well.

Update 12/29/05: I tried the Missing Sync desktop mount app on the Mac in my office (where I have not installed Missing Sync) and it didn’t work. So, it looks like I can rule this out as a general desktop mounting solution. I think for now, I’ll go ahead and buy Card Export II (which did work on the office Mac, BTW). I think it’ll always have some utility for me, even if I do eventually pick up a standalone USB card reader (which, BTW, can be had for less than the $15 that Card Export II costs).