Multi-User Lightroom

My wife and I take a lot of photos and we’ve been searching for a system where we could combine and manage our various pictures. I had been using Adobe Lightroom to manage my photos and she had been using Apple’s Aperture. We wanted one system where we could access, catalog, manage, develop and print our photos. We decided to standardize on Lightroom, but Lightroom is currently single-user only. We needed to be able to access our Lightroom catalog from multiple computers and Lightroom’s SQLite-based database is not designed for that. So after some research, I put together the following system. It allows us to use one Lightroom catalog on multiple computers. The caveat is that only one of us can be running Lightroom at a time. Other than that, it solves our problem.

WARNING: This is a hack. While it works for us, I do not guarantee that this will not trash your Lightroom catalog. Make backups and proceed carefully.

SECOND WARNING: These directions and the script are not polished. This post assumes some technical savvy.

There are a couple parts to my solution. It requires a network share on a NAS and it requires a service like Dropbox, that syncs a set of files across multiple computers. Some NAS devices come with software that provides Dropbox-like functionality. The NAS I have, a Synology DS412+, has software, called CloudStation, which provides this functionality. Also, we’re a Apple Mac-based household. This solution should work for Windows as well, but you will have to customize the shell script.

In short, we store our photos on the NAS and we store the Lightroom catalog on the Dropbox folder. We invoke Lightroom using a shell script that ensures that only one person can run Lightroom at a time. The reason we put the Lightroom catalog in a Dropbox folder is for speed; the catalog and previews are stored locally.

Many people already store their photos on a NAS. If you are not currently doing so, there are several tutorials to help you migrate your photos, such as this one.

To begin, make sure you’re not running Lightroom. Locate the Lightroom catalog, which is usually stored in your Pictures folder. You’re looking for the ‘Lightroom 5 Catalog.lrcat’ and ‘Lightroom 5 Catalog Previews.lrdata’  files. Copy these to a folder in your Dropbox, and then rename the old ones so that Lightroom doesn’t try to use them in the future. When you next launch Lightroom, it will ask you for the catalog file; point it to the one in your Dropbox folder.

The ‘Lightroom 5 Catalog Previews.lrdata’ file is a cache of previews of your photos. It can be large, but can be regenerated at any time. I choose to not have Dropbox/CloudStation sync that across the various computers, and let each computer generate it when Lightroom is run. Dropbox and CloudStation both have selective sync functions that allow you to exclude files/folders from syncing; that’s how I do that.

Now you should have a normally working Lightroom installation, with your photos on the network share on the NAS and your catalog in the Dropbox folder. The last bit of the solution is to only run Lightroom through the use of the following shell script, which I’ll explain.

#!/bin/sh

USER="INSERTUSERNAMEHERE"
PASSWORD="INSERTPASSWORDHERE"
NAS="INSERTNASIPADDRESSHERE"
MOUNTDIR="/Volumes/home"

TIMEFILE="/Volumes/home/Lightroom/lightroom.lasttime"
LOCKDIR="/Volumes/home/Lightroom/lightroom.lockdir"

if [ ! -d "${MOUNTDIR}" ]; then
 mkdir "${MOUNTDIR}"
 mount_afp afp://${USER}:${PASSWORD}@${NAS}/home ${MOUNTDIR}
fi

# Want to delay at least N seconds since last instance was closed to
# allow for CloudStation propagation
if [ -f "${TIMEFILE}" ]; then

if test `find "${TIMEFILE}" -atime +15s`; then
 echo "ok"
 else
 osascript -e 'tell app "System Events" to display alert "Need to sleep, Lightroom will start momentarily"'
 sleep 15
 fi

fi
if mkdir "${LOCKDIR}"; then

echo "Locking succeeded" >&2
 open -W /Applications/Adobe\ Photoshop\ Lightroom\ 5.app
 touch "${TIMEFILE}"
 rmdir "${LOCKDIR}"

else

osascript -e 'tell app "System Events" to display alert "Someone else is currently using Lightroom"'
 echo "Lock failed - exit" >&2
 exit 1

fi

What the shell script does is as follows:

  1. It makes sure the network share containing the photos is mounted.
  2. On the network share, it looks for a time file that was created by a previous instance of running the shell script, and indicates the last time the script (and Lightroom) were run.
  3. If the file exists, it checks the time and makes sure it’s been at least 15 seconds since the last run. This is to allow Dropbox time to synchronize the catalog from any other computer. The 15 seconds is a guess on my part; you may want to make it longer.
  4. Once it’s been at least 15 seconds, the script attempts to create a lock directory on the network share. This only succeeds if the lock directory doesn’t already exist. If it exists, the script assumes that someone else is running Lightroom and displays an error message.
  5. One the lock directory is created, it launches Lightroom and then waits for Lightroom to close.
  6. Once Lightroom closes, it removes the lock directory and updates/creates the time file.

Things you have to customize in the script:

  • The USER, PASSWORD and NAS variables lines 3,4,5
  • The script assumes your network share is mounted at /Volumes/home and that there is a Lightroom directory there. This does not have to be where your photos are stored.

To run the script, I used Platypus to create a Mac application out of the shell script. I placed the resulting app, which I call ‘RunLightroom’, on the network share, and then on each computer I dragged that to the Dock, to make it easy to run.

Hopefully this helps someone else out. Family photo sharing/management is a huge opportunity that Adobe should probably own (for better or worse). This post only addresses part of the problem; another issue is access to your photos on all your devices. Synology has a solution for that and I’m working on integrating that with Lightroom. I’ll put up another post when/if I have that figured out.

Please let me know if you have suggestions for improving this post; this is just a first draft and these instructions are admittedly pretty rough.

Advertisements

Apple Quirks

Yesterday, I bought a MacBook Air. It’s an amazing little machine. I went for the model with the hard drive, not the SSD. With that purchase, my conversion from a combination Windows/Linux environment to an Apple-only environment is complete. Over the past year, I have bought 3 Macs (Pro, iMac and Air), 4 Apple TVs, 2 Airport Extremes and 1 iPhone, and have been almost completely satisfied with everything I’ve bought from Apple. (Yes, I actually liked the first version of Apple TV, and now with Take 2, it’s even better.) For the most part, things just work, and I really appreciate Apples focus on design. In general, their products just work better than the competition’s.
So, it really stands out to me when something doesn’t work as well as it does in the Windows world. There are three things about OS X that bug me in this way. The first is the menu bar, which is the widget that has the ‘File’, ‘Edit’, ‘Help’ and other menu tabs in it. In OS X, the menu bar for each application always appears at the top of the monitor (if you have multiple monitors, it appears at the top of the main monitor). In Windows, however, the menu bar appears at the top of each application’s window. This is a much better solution, IMO. The menu bar is where you need it, at the window, where your mouse pointer, and attention, is. You never have to take your concentration off the window you’re working in, in order to access the menu. This is especially bad if you have more than one monitor and the menu bar is in a monitor you’re not working in.
The second thing is the behavior of the red, yellow and green window buttons. These, I think, are for closing, minimizing and maximizing a window. But they don’t always do that. Or at least the green button seems to act differently for different applications. Be consistent people!
Finally, and related, there’s the behavior of closing an application. In Windows, if you close the main window for an application by hitting the little X button on the window, it closes the window and quits the application. Simple. Expected. In OS X, if you hit the red button on the application window, the window disappears, but the application still runs. Why would I want that? If I’m closing the main window of an application, I want the application to end. Don’t leave applications running without a window. That doesn’t make sense to me.
So, there you have it. Am I wrong? Have I missed any? Tell me in the comments.

For When Your iPhone Doesn’t Sync With iPhoto Anymore

A really annoying bug with my iPhone is that oftentimes it won’t show up as a camera device when I dock it with my Mac Pro. This means that iPhoto cannot pull images off the iPhone. I’m not the only one who’s suffered from this bug, but I’m not sure how wide spread it is. For my own future reference, and to help others, here is a list of things I’ve done to fix this problem in the past:

  • Open iSync, click Preferences, then click Reset Sync History
  • Under the home directory, in Library/Preferences, delete the com.apple.iPhoto.plist and com.apple.ImageCaptureApp.plist files, if they exist
  • Using the Disk Utility, repair disk permissions (I don’t recall this directly ever solving my problem, but others have reported that it works for them)

Hopefully Apple will fix this soon.

Buh bye Treo, Hello iPhone

Like countless others today, I bought an Apple iPhone. It replaces my 2.5 year old Treo 650. Wow, what a difference. The keyboard is going to take some getting used to, but this is one heck of a phone. Web surfing is great on this device. Email is great, especially being able to view attachments. The iPod seems to work fine, with the exception that the DVDs I’ve ripped for my Apple TVs don’t play. I’ll have to look into that. The voicemail system is lightyears beyond any traditional cell phone voicemail system.
One confusing thing had to do with the activation. I am replacing my Treo, so I wasn’t able to select a particular voice plan. When I go to the AT&T web site to look up what plan I’m on, I now get an error. I’ll have to look into that.
Now, Apple needs to create an SDK and open up the phone to 3rd party developers. Web apps will only get you so far and don’t lend themselves to a seamless experience. But even without that, it’s a huge improvement over my old Treo.

Apple TV

I just bought my third Apple TV. This is the device that acts like a video iPod connected to your TV. While it has some
shortcomings, it’s already replaced my beloved Squeezebox for distributing music (and now video) throughout the house. Critics rightly point out that it’s missing some key features: no 5.1 Dolby Digital sound support in software, you can’t access the iTunes store directly from it and iTunes doesn’t sell high-def movies. Another criticism, that it has too small a hard drive, is, at least for me, a non-issue (see caveat later). My aTVs are set up to just stream from my main iTunes. My computer is on all the time, and this works great. It’s my guess that an upcoming software update will fix the surround
sound issue and add the ability to access the iTunes store. It’s also my guess that a criticism I have of iTunes in general, that it doesn’t allow renting of movies, will also be fixed soon.

I will be upgrading the hard drive on the aTV that I just ordered to a 160GB Seagate drive. This is because I plan on placing this aTV in my place in Tahoe, and will be setting it up to sync from my main iTunes, instead of stream, like the others. The reason I need to configure this aTV to sync is that my home DSL line does not have enough upload bandwidth to support streaming over the Internet. I’ll also need to configure a VPN so that this aTV thinks it’s on my local home network, because iTunes doesn’t permit sync’ing over the Internet. The result of all this work will be that I’ll be able to access all my movies and music in Tahoe, without having to worry about keeping things in sync. It’ll just happen automagically.

With all the current shortcomings noted, this is the future. I can now easily watch any of my DVDs at any time on my TV. I can purchase movies and almost instantly start watching them. We are inching towards a future where all media is available all the time, and not just on computers.

Happiness is ….

getting an email saying that the Mac Pro I ordered on Wednesday has shipped. I should have it by Tuesday. Yes, I’m making the switch. My main desktop has been Linux for at least 10 years now, with a backup Windows machine for a few things. But I got tired of the bugginess of Fedora. And with the development of Parallels and other VM systems, it’s now possible for me to consolidate my two main desktop machines (I’ll still have one or two server boxes for development). I can’t wait.

Today’s Apple Announcements

Normally I don’t pay too much attention to Apple’s press events; I’ve never been a Mac user (there goes my geek cred). I do have an older 40gb iPod, however, and I’ve been thinking about getting a Nano. I’ve also been thinking about digital media. With that in mind, I paid attention to the announcements today. First things first, I’ve ordered an 8gb Nano. I’m not thrilled with the iPod-mini looks of the new Nano, but that wasn’t enough to deter me from ordering. I also upgraded my copy of iTunes to the new version. What was interesting to me is that Apple insists on an iTunes account if you want to take advantage of the new album art feature. This is very smart. It’s a good way for Apple to increase iTunes accounts, which benefits Apple in several ways.
I was also interested in the iTv announcement. I recently cancelled my Netflix account because I never watched the DVDs. A set of DVDs I had added to my queue months before would sit around for a couple of months until I felt guilty and returned them (causing another set to be delivered, which would then sit unwatched, etc). People want instant gratification, and that’s a problem with Netflix. If the iTv device works as promised, I’ll be one of the first in line to buy one. With one caveat; Apple needs a rental option. One other thought I had was that if and when iTv (or something like it) becomes popular, expect to see video podcasts to expand and become much more mainstream. And that could be very interesting.