Adam Rice

My life and the world around me

Category: technology (page 6 of 12)

Ambient notifications in Mail

A blog entry at O’Reilly discusses how the author has set up Mail to notify him of incoming messages. I do something similar, using a more layered approach, so in the interest of meticulously documenting everything you can do with Mail, as well as exploring ideas for ambient notification in mind-numbing detail, here goes.

When the topic of using OS X comes up, I tell people that if you drink Apple’s kool-aid and use its apps religiously—Mail, Address Book, iCal, iPhoto—then it will pay off for you. Since they hook into each other, and other apps hook into them as well, you really do get synergistic benefits. For example: if you keep all your contacts in Address Book, you can filter your mail in useful ways. If you create groups in Address Book to categorize your contacts, mail filters can be more useful.

I filter my mail based on whether the sender is in my clients group or my friends group; each goes to its own mailbox, and other actions are triggered as well.

When I receive messages from friends, their names are spoken aloud to me using this script.

When I receive messages from clients, the “work bell” rings (this is something Mail can do on its own), and a Growl notification appears on-screen using this script. I’d like to make it so that clicking on the notification blob opens the message in question, but I haven’t figured that part out yet. These notification blobs are actually pretty intrusive (they sit there until you click on them to dismiss them), but this was an intentional decision: if it’s work-related, I probably want to be interrupted.

When I receive messages from people I’ve never corresponded with before, it’s very likely those messages are spam. So I filter messages where the sender is not on my previous recipients list (this is a handy, and I suspect little-known feature in Mail) to a “holding pen” mailbox that is essentially a waiting room for my junk box. This makes it a little easier to prioritize and batch-process mail in the eternal struggle for inbox zero.

Recently, I discovered DockStar–this lets me see how many messages are in each of several boxes. This alone would almost be enough, but I like the extra channels of information I get.

The trouble with Mail

I’ve recently started reading Hawk Wings, a blog focused mostly on Apple’s Mail.app and other personal-information programs like iCal and Address Book. I’m always keen on ways to tweak Mail, but I was moved to actually write about it by the recent post Mail’s most annoying bug. It got me thinking about all the ways Mail could be better.

When it was released with OS X 10.0, Mail was barely usable. I had used Eudora up to that point, but when I made the switch to X, I decided to leave the old OS behind completely. While Eudora was available, it did not handle Japanese; it only handled Japanese on OS 9 thanks to a plugin that had not been ported to X (I know nothing of the state of Eudora’s i18n today). I looked at some third-party alternatives, and gladly would have paid for one that I liked, but I found nothing that I liked better than Mail, so I stuck with that.

Today, Mail is a pretty good program, but it has obvious problems, and even if those were all fixed, would be solid but not innovative.

Bad/no keyboard equivalents: Mail lets you read messages one of two ways: by splitting the window into a message-list pane and a message-viewing pane, or by showing each message in its own window. My natural inclination (probably inherited from Eudora) is to open each message in its own window, but when you do this, it is impossible to use the keyboard to navigate between messages while viewing the message. You need to close the current message window, then arrow up/down, then open that message. It’s a small thing, but multiplied out hundreds of times a day it adds up. I am dumbfounded by the lack of this, as well as some of the strange keyboard commands that are there—the commands to send and check mail, two of the most common e-mail activities, are obscure and non-mnemonic.

Bad threading: Mail tries to group messages by thread, but also groups based on subject line. I have a client that uses the subject line “request” on every message he sends me, so every time he sends me work, I need to disclose an increasingly ungainly list of messages (I keep all the old ones around just because I am that way). Another weakness in this quasi-threading is that it is “flat”–it doesn’t show which message is replying to which. This is possible. Properly threaded e-mail been possible for decades. Apple should be able to figure it out.

Inclusion of .sig in body: As far as I can tell, most civilized mail clients segregate the signature line from the body of the message when you are editing. Not Mail. This means you needs to edit around the .sig, or add it back after you’ve deleted it.

Reply format oriented towards top-posters: I’m not going to say that top-posting is wicked and only evil, stupid people do it, but I don’t do it. [Update: Holy crap, look at the passions this topic arouses.] When replying to an e-mail, I try to interleave my points with the sender’s points. Mail is set up to encourage top-posting though: it places the cursor on a blank line above the quoted text, and prefaces the quoted text not with a salutation but with a more bureaucratic “on such-and-such a date, so-and-so wrote:”. So there’s that wasted blank line, and a first line that I almost invariably wind up editing (if you get e-mail from me that has that introductory line unedited, it means either that I’m really busy, that you are bugging me, or that I don’t know how to address you). Again, customized salutation lines have been around for a very long time. Mail should solve this and not assume that everyone is a top-poster. And when I want to interleave my response into the quoted text, Mail does a lazy job. The helpful thing would be to create three blank, unquoted lines with the cursor on the middle line. Mail creates one blank unquoted line. If I’m inserting a comment between two paragraphs of quoted text, there will be one blank quoted line just hanging there—it should clean that up. I think Eudora did.

Simple filtering: I use a lot of rules in Mail to direct my mail into the appropriate slots. I know that Boolean logic can get confusing, but Mail could offer an expert mode for creating rules like “If (A or B) not C” Yes, I know that Mailsmith can do this. I also know that Mailsmith has no support for Japanese. i18n is a real bright spot in Mail: before Mail, e-mail containing Japanese was a frequent PITA. I still have occasional problems with it, but the problem is mostly solved.

No queue for outgoing mail: This is another one of those Eudora features I miss. With Eudora, it was possible to write a message and queue it for delivery later (indeed, this was the default, though it was also possible to send immediately). Not with Mail: you send it, it’s gone. A five-minute grace period would save a lot of mistakes.

So far, these complaints are just of the “this is broken” variety. There are lots of ways Mail could actually be innovative.

Presentation of threads: This is one thing where gmail is out in front: it shows “conversations,” including both messages you received and sent as part of the conversation. Even if Mail would show all the messages in a mailing-list thread in one window—ideally with proper threading indicated—I’d be very happy. If it could go a step further and strip off all the detritus of footers and excess quoting, I’d be amazed.

Mailing-list handling: As long as we’re talking about mailing lists, Mail should be smart enough to recognize “hey, you’ve subscribed to a mailing list” and offer to set up special mailboxes and filters for it. Since almost all mailing lists run on a handful of platforms (Yahoo Groups, Google Groups, Mailman, and maybe one or two others), it should be possible to create special actions for quitting a list, etc, so that newbies who subscribe to a list they then decide to leave don’t post annoyed and annoying messages to the list asking “how do I leave this list?” (actually, this suggests a whole xmlrpc mechanism for managing lists, but that’s a topic for another day).

Ad-hoc mailing lists: this could be dangerous in the wrong hands, but sometimes it is useful to have a mailing list for a short period of time and a small number of people. With the right rules and actions, a mail client could emulate a mailing list well enough. There should be a quick way to set this up.

Alternate views: It could be useful (or at least interesting) to be able to view my mail database in calendrical form. Or by person. It would be interesting, for example, to see a histogram of all the mail exchanged between me and Gwen over time.

The Sidepad

I’ve been musing a bit lately about the problem of having too much information on our computer screens to deal with. I’ve also been thinking about the problems involved in using a computer as the hub of an entertainment center. What follows is a concept that might be able to address both problems, as well as a few others.

This is a gadget I call the “sidepad.” It has a few modes of operation.

1. Docked mode

In this mode, the sidepad is physically connected (via a docking station) to the host computer, and acts as a specialized secondary display.

I’ve written before that I like the idea of roping off a section of my display for to use as for status-monitoring displays and the like, or better yet, a separate display entirely. There wouldn’t be enough of this ancillary stuff to fill a normal display (even a small one), but a custom display such as I am proposing would be perfect.

Shown here is a very rough mockup of a 20“ iMac with an ancillary display showing how the two would relate.

Image showing iMac with sidepad

Here is a detail of just the sidepad in docked mode

Detailed view of sidepad in docked mode

In this, the ancillary display shows the dock, application palettes, and ”dashboard“-style information, though in a much simpler and more disciplined format than Apple’s Dashboard. For lack of a better name, I’ll tentatively call this part of the display the ”dashpad“. Rather than having each widget being free-floating and self-contained, each dashpad widget fits into a ”slot“ and has no chrome (though actual widgets in this case could be somewhat dressier than I am showing them here). I have left the application palettes alone, although I envision a standard visual format for them, along with a special API to take advantage of the ancillary display.

How would something like this work technically? At the physical level, I imagine a dock that would connect to the host via Firewire. Although it would act in some respects as a second display, it would probably need to be treated more as a peripheral; it would have its own processor, which would need to collaborate with the host to fake acting like a second display in some respects.

At the software level, the OS would need a new API that let applications relegate palette display to the sidepad when present, along with support in the OS for the look and actions of those palettes. Likewise display of the dashpad.

2. Detached mode

In this mode, the sidepad is undocked from the host computer, but within wifi range, and acts as a remote terminal for that computer, as well as the command center for home entertainment.

We’re at a point where having a remote display for one’s home computer can be incredibly handy. Such as:

  • You see something while watching TV and want to check some background info on the web (IMDB entry on an actor, product website for something you see advertised).
  • You are piping music from your computer to your stereo. You want to be able to see track info, and to have more control over playback than next/previous track buttons on a normal remote offer.

Obviously these tasks can be accomplished with another computer networked into your primary computer, but this can require a fair amount of setup, and the expense and maintenance of an another computer. Apple likes to talk about its computers being ”digital hubs,“ and I love the idea, but I need to be able to use it out at the ends of the spokes.

Shown here is the sidepad removed from the dock. It would communicate with the host over wifi (probably setting up a VPN). Assuming the mac was also hooked up to, say, a TV and stereo, the sidepad would work as a remote control in this mode, directing media signals to the appropriate outputs.

sidepad in detached mode

In this mode, the screen would show something completely different. A fixed source browser would appear on the top-left, with tabs for one’s computer, the Internet (which would show a browser in the remainder of the screen), music, movies, photos (which would hook into the appropriate sources on the host’s hard drive, and display suitable browsers), and an organizer (contacts and calendar that would sync with the appropriate iApps).

3. Outbound mode

In this mode, the sidepad is operating independently of the host computer, functioning as an Internet terminal, media player, and PDA.

A lot of people who mostly need a desktop computer could also use something lightweight for e-mail, web surfing, and entertainment when they are away from home. The proportions of the display are not an accident: it has a 16×10 aspect ratio, for widescreen video. A laptop (especially a used one) is not an unreasonable solution, but may be overkill, and requires more work (and if Apple has its way, a .Mac subscription) to keep in sync with one’s desktop. Low-powered, small, and lightweight web-surfing tablets such as the Nokia 770 and Pepperpad already exist, but these are not really designed to sync with larger computers, much less provide either of the other modes I’ve discussed.

In order to fulfill its other functions, the sidepad would need a powerful enough processor to act as a PDA, with utility applications like a word processor, spreadsheet, and e-book reader. So it would be a no-brainer to include these functions in this mode.

One aspect of this mode that is open to criticism is the fact that it would require a fair amount of storage to be useful, increasing its price and putting it dangerously close to iPod territory. This could be handled by making storage optional, by using a memory-card slot, or by actually designing in an iPod dock.

The display in this mode would be very similar to that in Detached mode. The functionality would be different, though. The ”my computer“ tab might be disabled if a VPN at a decent speed cannot be established. The media tabs would reveal locally stored content, not content on the host computer.

Objections

What are the odds of something like this being built? Slim. There are a lot of problems with this idea:

  • Price: it might wind up being expensive enough that most people would reasonably ask ”why not just get a laptop?“
  • Size: For one thing, the size is not one we’ve seen before in a portable product—bigger than a PDA, PMP, or portable game console, but smaller than a laptop. The fact that nobody’s selling a device this size (measuring roughly 12” x 6“, the size of a license plate in North America) may be because nobody would buy it. For another thing, in order to feel well-connected to the host machine in docked mode might require different models for different screen sizes.
  • Marketing: With several different modes, none of which are ones that most consumers will instantly grok, this would be a challenge to sell effectively.

Still, I’d buy one.

Liner notes

Moving can be an occasion for reconsidering how you live your life. One aspect that Gwen and I are confronting is how we listen to music.

I’ve got all my CDs ripped to digital files, and since I spend most of the day working at (or, well, sitting at) my computer, listening to my music through iTunes is the most obvious option. I’ve been pushing for having a gadget to relay music off my hard drive to the stereo in the living room, something like the Airport Express or Slimp3 player.

Not Gwen. She doesn’t dislike iTunes, but she’s visual. She wants to browse through the covers of her music to make a selection, rather than scroll through a list of artists or the like. But she and I both feel that it would be nice to put away all of our CDs. So what to do?

The MP3 and AAC file formats allow you to include cover art as metadata right in the file. iTunes can display this art while it the track is playing. And there exist a number of applications for the Mac that will display the art when iTunes is hidden, and even help look for it on the Internet–Clutter, which I could never bond with, Sofa, which is an intriguing app now caught in limbo by its author’s death, and Synergy, which I’ve been happily using for some time. But these don’t help you browse your collection by cover—they just show you the cover once you’ve selected something.

One of the big problems with cover browsing is that you need to have the cover art. As I said, there are some programs that can help (by mining Google Images or Amazon), but often enough, they can’t find anything, or they find the wrong thing, or they find the right thing, but only a thumbnail image. And there’s some stuff for which there simply is no cover art (remixes, bootlegs, etc). I’ve been rather laboriously going through my collection and manually searching the usual sources to dig up good-quality images to make cover browsing possible. I reckon once I’m done, I’ll still be left with 2% to 5% of my collection sans art, and for that stuff, I’ll have to improvise.

I recently learned about Cover Buddy, which gives you a slide-sorter view of your cover art. It’s got some nice features, and it’s reasonably priced. But I’m really excited about my latest discovery, CoverFlow. When I read the description of this, I was doubtful of its utility, but having played with it, I’m hooked. It’s still very beta and rather primitive, but also very impressive. You really need a scrolling mouse to make the most of it.

I showed it to Gwen, and she was impressed as well. I think we’ve solved our music-browsing dilemma. Now we just need a Mac that can run CoverFlow in the living room…

Greetings from mission control

I had a full-time Internet connection in 1997. The first thing I did once I got that working was to set my mail client to check my e-mail on a regular schedule instead of manually.

The second thing I did was turn off the alert that told me I had new mail. Of course I had new mail. I always have new mail.

Using a computer to tell you things you need to know, and how it tells you, have interested me for a long time. These topics are addressed in the article from the Sunday NY Times Magazine, Meet the Life Hackers, This has been so widely discussed in blogs that I probably read the whole article via scattered excerpts before reading the article start to finish. And we continued discussing it at the small but stimulating blogger meetup last night.

Quite some time ago, I had an e-mail conversation with Brent Simmons regarding the dock icon used for his excellent NetNewsWire. The dock icon shows a total count of unread articles as a badge, much as Apple’s Mail program does. This is fine, although I always feel a little guilty because my unread count is typically over 1000 (maybe I need to prune my subscription list a bit). We discussed ways to get more fine-grained information into that icon; I suggested using a compass-rose icon where each point of the compass would represent a specific feed or group of feeds, and its fill level and color saturation could be used to indicate unread count and recency.

In the Times article, a couple of sections caught my eye as being somewhat similar in spirit

Czerwinski proposed a third way: a visual graphic, like a pentagram whose sides changed color based on the type of problem at hand, a solution different enough from the screens of text to break through the clutter.

Another experiment created a tiny round window that floats on one side of the screen; moving dots represent information you need to monitor, like the size of your in-box or an approaching meeting. It looks precisely like the radar screen in a military cockpit.

In retrospect, I’m not sure if a multicolored compass rose is really all that important for keeping track of how far behind I am on my newsfeeds. But I do think that something along those lines could be useful in a more general way.

I’ve been experimenting with different ways of using my computer to tell me things lately. One widely-touted aspect of the latest version of OS X is Dashboard. Dashboard is almost right, but exactly wrong. Dashboard allows you to show widgets–tiny one-trick programs. These widgets generally break down into two categories: either they passively show you some piece of information (such as the weather or traffic conditions), or they actively let you manipulate information (such as a calculator or del.icio.us posting tool). The problem with Dashboard is that it is modal: either you’re viewing Dashboard, or you’re viewing the rest of your system. For “active” widgets, that’s not so bad. But for passive widgets, it’s dead wrong. I want to see my to-do list all the time. If I have to remember to take action just to look at my to-do list, I’m less likely to look at it.

Although Apple doesn’t make it easy, I decided to disable Dashboard almost immediately. Casting about for something that would remind me “hey, mom’s birthday is tomorrow” in a way I could not overlook, I revisited Konfabulator, a program that does almost exactly the same thing as Dashboard (about which I’ve written before), but whose widgets actually live on the desktop. I had tried Konfabulator a long time ago and wrote it off as a resource hog. Between my newer computer and perhaps better coding in Konfabulator, it seems to work with my system much better. I’m using it right now to show my calendar events and to-do list, and the weather, and that’s it. It’s not absolutely perfect for my needs, but it’s pretty good. I’ve also been intrigued by Stattoo — I like the fact that it has a more disciplined appearance on-screen, but find some of the modules to display too little information to be really useful–it omits a lot of extras that seem obvious and desirable; it is also severely limited by the fact that it apparently has no plug-in architecture. A slightly more fleshed-out version would be ideal–even though Konfabulator is free, I’d pay money for a sort of “Stattoo 2.”

Another feedback mechanism on the Mac, and one that is becoming widely supported and well fleshed-out is Growl. Growl was an outgrowth of the excellent Adium chat client, and can be used to show ephemeral blobs with the text of incoming instant messages–very handy. But it also gives me numerous other status updates–how long my cellphone calls last, when a blog entry has been successfully posted, etc. I frequently get e-mail from clients overnight, and want to know right away whether there’s anything I need to look at, so I’ve scripted Growl to show a little notification blob for client e-mails that persists until I make it go away. In theory I could use Growl to show upcoming events, although to-do list items might be trickier. I use sound as a mail notifier as well, with special chimes for mail matching certain criteria–I even have Mail speak the name of the sender when I receive mail from a friend.

In fact, Growl probably isn’t exactly the right tool for the job of showing ambient, persistent information–it’s more intrusive, its blobs of text float over everything else. Ambient, persistent information should probably sit under everything else–a murmur, not a growl.

Ideally, I’d probably corral all these visual notifications and status monitors into a separate display, or have a region of my main display roped off for just that purpose. Right now, that’s not feasible. I know that Microsoft’s Longhorn is going to have special support for subsidiary displays, although I suspect those won’t be exactly what I have in mind either. It’s obvious that my current setup, although it’s pretty good at presenting information in a way that’s ambient, unobtrusive, and pretty well customized to my needs, is still undisciplined (I haven’t mentioned all the various forms of notifications I get). The available tools generally seem to be moving in the right direction, though.

pictures

iPhoto is bundled with every new Mac, but I never really bonded with it. The way it maintains photos is grossly inefficient, and it doesn’t deal as gracefully with batch processes or metadata as I’d like. I always used Graphic Converter for that stuff, but I have to admit that it isn’t great for just organizing photos.

From time to time, I’d read that people using the current version of iPhoto found it much improved–indispensable, even. And with a 250-gig hard drive, I could tolerate some inefficiency. So I decided to give it a shot. Thanks to the Keyword assistant and Flickr export plugins, I can use iPhoto with a tolerably efficient workflow. I’ve managed to import, tag, organize, and upload a lot of old photos to my flickr account–check ’em out. More to come.

March of Progress

I recently got a new 20“ iMac G5. It’s very nice. I had been plugging along with my old Sawtooth since 2000, and felt I was past due for an upgrade.

While it is great having a faster machine, I’m more impressed by the industrial design of this thing. It’s like an abstraction of a computer, with the messy parts that make it work almost completely invisible (the outsized bezel and optical-disc slot are the only clues that there’s more here than a screen). When I show it to people who haven’t seen one before and point out ”that’s all there is“, they are dumbstruck. But pop the back off and the parts are laid out before you as if at a buffet table.

One grave annoyance with the new machine–the updated operating system, more likely–was printing. My old printer, which I’d had since 1995, had always been somewhat fussy, but now there were some documents that I simply could not print, even after trying many workarounds. I came very close to reenacting a scene from Office Space with it.

So after doing a little research (and getting a job I couldn’t print) I drove up to Fry’s yesterday and replaced it with an HP 1320. Now I can print. With my old printer, it was a bad sign when it started ejecting pages quickly–that meant that it was spewing postscript gibberish. The new one prints just as fast, but it is actually printing what I want it to print.

It’s also interesting to look at how the industrial design of printers has changed.

The Lexmark was a real workhorse. It weighed a ton. The whole top flipped up like the hood of a car, with a complex hinge and spring mechanism. The left side swung open to reveal the logic board. In short, it was designed for serviceability. It had a LCD screen with some buttons that allowed the user to control many of its output options (redundant, considering this can be done through the computer).

Since then, the big change in the exciting world of printers has probably been with inkjets, which have gotten very good, and are cheap enough to hand out as party favors. This has no doubt forced the laser-printer segment of the market to compete harder on price, and it shows in my new printer, which is much lighter. No LCD screen, almost no buttons, no easy access for service. It’s also much smaller and sleeker, and somehow manages to fit in a duplexer. And, of course, cost about a quarter what the old one did.

Macintel

I caught up with the big news a day after everyone else, since I was travelling. When I read it, my jaw sagged open, and I checked the date more than once, on the off chance that it was April 1.

I have mixed feelings about the move. The PowerPC architecture is, IMO, more elegant than the x86 architecture. And I believe that have more than one platform in circulation is good for the industry as a whole. But. There are a couple of big “buts”: Although PPC may be more elegant than x86, Intel seems to be better at actually making their chips run fast. Real-world performance beats out theoretical elegance 10 times out of 10. Also, MotorolaFreescale and IBM both seem to have bigger fish to fry than catering to Apple’s needs. Freescale obviously has had problems pushing the speed limit with their chips. IBM has done better, but apparently would rather make chips for video games than desktops.

Many people have wondered why–if Apple is switching to x86–they aren’t going with AMD. My own take on this is that Intel execs would rape their own mothers if doing so would take market share away from AMD. I would not be surprised if Intel is practically paying Apple to take its chips rather than have Apple turn to AMD. Supply lines, roadmaps, etc, all seem secondary to this.

I also wonder if Apple is going to use Itaniums (Itania?), and give Intel a way to get rid of some of them–they may be technically great, but have sold poorly because they aren’t x86-based. Since Apple is switching to a new platform, there’s no added penalty in switching to Itaniums (other than optimizing another compiler). Then again, Apple has hinted that people will be able to run Windows on their Macintels, which would mean that Itanium isn’t in the picture.

Technological slumming

Everyone knows that Lego-based movies are a medium for low-budget cinematic self-expression, covering every genre from politics to gay porn (of course, these days, the two aren’t that different). One particularly popular genre is Star Wars fanfilms.

And while there is certainly a big overlap between Star Wars fans and videogame players, and there have been many successful Star Wars-themed games to date, one thing that action games are definitely not known for is their humble production values. So what are we to make of Lego Star Wars, The Video Game? Here’s a game from a major developer that takes all that texture-mapping inverse-kinematic razzmatazz and puts it to work rendering…low-budget lego animation.

Multiple iTunes libraries, one music folder

What follows is a solution to a problem that has annoyed a lot of people for some time now.

Suppose you are in a household with two Macs. Each person has a copy of iTunes installed. They both want access to the same music directory, but they both want it to be part of their own library.

iTunes already makes it easy to share your music over a LAN, which is nice up to a point, but doesn’t give you much flexibility: you can’t assign star ratings to someone else’s music, make playlists, or load up an iPod with it. What you really want is for all that music to be yours (and all your music to be similarly available to your cohabitant).

Here’s the recipe. I’ll assume you have a LAN set up already.

  1. On each computer, go into System Preferences : Sharing : Services and enable “Remote Apple Events”
  2. Designate one computer as the “music host”; the other will be the “music client.”
  3. On the client, connect to the host, and mount the hard drive on the host that contains the iTunes music folder. Go into iTunes Preferences : Advanced on the client and set it to use the same folder as the iTunes music folder as the host (the one on the host’s computer)
  4. In the interest of good file management, you probably want to go into iTunes Preferences : Advanced on the host and enable “Keep iTunes Music folder organized” and “Copy files to iTunes Music folder when adding to library”. However, on the client machine, I think you will need to disable these (otherwise multiple computers will contend over where and how the files should be organized). If the client already has music files stored locally, relocate those files to the host and remove them from the client. Add those tracks to the library of the host computer manually.
  5. Find and remove the files “iTunes Music Library” and “iTunes Music Library.xml” (or create an archive of them) from the folder ~/Music/iTunes on the client machine. Manually add all the tracks on the host machine to the client’s copy of iTunes by dragging the into the iTunes window. For very large collections, you should probably do this in chunks (iTunes seems to get confused otherwise). I added all the artists starting with A at once, then B, etc. Took a while, but it worked.
  6. Now both users have access to the same music directory, can make their own playlists, set their own ratings, load up their own iPod, etc. The problem is that the situation is static–if anyone adds a new track, things get out of sync, and only that user will have access to that track (without additional futzing).
  7. That is where the following mystical-magical script comes in. This was pretty much written by “deeg” (with some nudging from me) in the Applescript for iTunes forum at iPod Lounge.
    (*=== Properties and Globals===*)
    property theDateofLastSync : "" -- date of last sync
    property theOtherMachine : "" -- ip address of other machine
    
    (*=== Main Run ===*)
    
    if theDateofLastSync is "" then set theDateofLastSync to ((current date) - 1 * days) -- force date of last sync to sometime ago for first run
    if theOtherMachine is "" then
     display dialog "Please enter address of other Mac" default answer "eppc://"
     set theOtherMachine to text returned of the result
    end if
    
    -- chat with other machine
    set GotsomeTracks to true
    try
     with timeout of 30000 seconds
      tell application "itunes" of machine theOtherMachine
       using terms from application "iTunes"
        activate
        set theListofTracks to location of file tracks of library playlist 1 where date added > theDateofLastSync
       end using terms from
      end tell
     end timeout
    on error
     set GotsomeTracks to false
    end try
    
    -- back to this Machine
    set SyncedOK to false
    if GotsomeTracks then
     set SyncedOK to true
     try
      tell application "iTunes"
       if (count of items of theListofTracks) is greater than 0 then
        repeat with alocation in theListofTracks
         add alocation to library playlist 1
        end repeat
       end if
      end tell
     on error
      set SyncedOK to false
     end try
    end if
    
    -- save sync date if all ok
    
    if SyncedOK then set theDateofLastSync to current date
    
  8. Copy this script and save it as “sync libraries” to the directory ~/Library/iTunes/Scripts (if you don’t already have a Scripts folder there, create it). Relaunch iTunes and it will be available under the Scripts menu. You can now run this script manually on each computer to update its library against the host. Better yet, use a timed macro (or cron job, which you can set up easily with cronnix) to launch the script in the wee hours. This assumes that each computer will be turned on when the script executes.

Additional notes:

  • Assuming that different computers will have different user accounts, you will need to specify the other user’s username and password in the “please enter the address” dialog that appears when first running the script. The URL format looks like this: eppc://username:password@machinename.local I’m not sure how to deal with spaces in the computer name (perhaps a backslash \ before the space–my machines all have one-word names; you can change the computer’s name in System Preferences : Sharing).
  • Likewise, it should be possible to sync libraries between two user accounts on a single machine using the above format. This probably requires that both users are always logged in (using Fast User Switching).
  • This script only works for one host and one client. It should be possible to modify it to deal with multiple clients. I will leave that as an exercise for the reader.

Update With recent versions of iTunes, this is all redundant. Although it’s not entirely automated, there is a much simpler way to deal with this problem.

As above, treat one Mac as the host and one as the client. On the client, go into Preferences:Advanced and make sure that “Keep iTunes music folder organized” and “Copy files to iTunes music folder when adding to library” are both unchecked. This is important.

Make sure the host’s disk is mounted on the client mac. Again, in iTunes, select the menu item “File:Add to Library…” and select the music folder on the host disk. This will scan the entire directory and add all the files to the client’s iTunes database. The client’s database will need to be updated whenever new files are added on the host (new files should only be added on the host); to do this, just repeat this process. It takes a few minutes.

« Older posts Newer posts »

© 2020 Adam Rice

Theme by Anders NorenUp ↑