On Boxing Day 2012, over 18,000 unique visitors came here from features on Hacker News and Lifehacker. That was a month's traffic in one day, which has not yet been matched.

I'd like to change that. It's not the popularity or the pageviews I'm after; it's the opportunity to help people with something they want to achieve.

Traffic to one particular post about Dropbox has remained strong, and I get orders of magnitude more views and feedback from that article than the rest of the site combined. In truth, the site as a whole has languished.

Going forward, I will focus on producing instructive, useful articles that help the reader solve a problem or learn something new. Solutions that have helped me, my customers, and friends will be offered to hopefully help others with similar needs.

Other topics may still show up here, but starting today, the focus is on technology solutions to everyday problems. Proceeding with full commitment, I have removed all other types of posts previously published here.

Posted
AuthorDaniel Mann

Like many people, I have both a business and a personal Dropbox account[1]. Sometimes I need files from the business account while on a computer where my personal Dropbox is installed.

The obvious solution is to run two instances of Dropbox at the same time, using two different accounts simultaneously on one computer. The obvious problem is that Dropbox does not support multiple accounts.

Dropbox second instance not supported
Dropbox second instance not supported

Since I might need to respond to a client emergency at any time, it really pays to keep some key business files on all my computers. Sure, I could share folders between accounts, but my personal account is just a free 2GB account; it doesn’t have space for the set of files I need to keep handy.

I could also choose to run multiple user profiles, using a different Dropbox account with each, but that’s a pain since I would have to switch profiles all the time and double-configure some of my common apps. If I use the Dropbox website, I then have to re-upload the files manually.

All things considered, I really do need a way to run two instances of Dropbox with different accounts on one computer at the same time. So, I found a way.

Dropbox second (personal) instance synced
Dropbox second (personal) instance synced

The key to this method came from an article on the Dropbox Wiki, which gives a pretty granular breakdown of the process. My method, implemented on a Mac[2] (see footnote for Linux and Windows), is essentially[3] a subset of that process.

Prerequisites

To follow this method you’ll need a Mac (I’m running Lion as of this writing) with Dropbox installed and set up for your first account. My first account is my business account.

Now decide where you want to actually store the folder for your additional Dropbox account. My first Dropbox folder lives in the default location in my user folder. For the additional account, I created a new folder right next to the existing one, and named it Dropbox-personal.

You’ll also need to create an Automator application and add a login item for your account. Don’t worry!—all of this is straightforward and relatively simple.

Create a custom Dropbox app with Automator

We’re going to use Automator to create a custom application for the additional Dropbox instance. This custom application can then be launched on demand, or automatically at startup.

Here’s a screenshot to show you how the application’s Run Shell Script action looks in Automator:

Automator application screenshot

Automator application screenshot

Note that the commands you enter in the Shell Script action can also be run in a Terminal session for testing or troubleshooting. Most people won’t need to do this. Also, you do need that & (ampersand) character at the end of the line—don’t leave it off!

Should you wish to name the folder that will hold your new Dropbox folder differently, just replace “Dropbox-personal” with the name of your folder.

bash
HOME=$HOME/Dropbox-personal /Applications/Dropbox.app/Contents/MacOS/Dropbox &

To create your custom application, follow these steps:

  • Launch Automator and create a new document using the Application template
  • Add a Run Shell Script action:
    • open Library > Utilities
    • drag the Run Shell Script action to your workflow space on the right
    • remove any default text (e.g. cat) from the script window
    • Paste in the following code (change the folder “Dropbox-personal” if desired):

    bash HOME=$HOME/Dropbox-personal /Applications/Dropbox.app/Contents/MacOS/Dropbox &

    • Test from Automator by pressing the Run button at the top right
    • this should launch the setup wizard for Dropbox; go through the wizard, entering credentials for your additional account
    • once you are satisfied that everything is working, quit Dropbox (click the menu bar icon and select Quit Dropbox)
    • Save your custom application so that it can be run independently
      • in Automator, select File > Save
      • name and save somewhere that makes sense to you

    My suggestion is to save your application in the folder where you created the additional Dropbox instance. This should match the value of $HOME from the bash script (e.g. Dropbox-personal in your user folder). Saving your custom app here keeps all the files for this Dropbox instance together.

    You can now quit Automator.

    Once you have saved your custom Dropbox application, test it by double-clicking the application file in Finder from the folder where you saved it. This should launch your new Dropbox instance again. This time you can leave it running—we’re done with all that restarting.

    Automation: launch at login

    If you want your custom Dropbox app to launch at login, there’s just one more step you need to take: add the custom app you created to the login items for your user account.

    This is easy! Follow these steps:

    • Open System Preferences > Accounts
    • With your account selected on the left, select Login Items on the right
    • Click the plus button below the list of login items to add a new item
    • Browse to the folder where you saved your custom app, click to select it, then click Add

    That’s it! Your custom app will now appear in your list of login items, and will launch automatically when you log in to your computer. Here’s a screenshot showing you how this should look.

    Launch at login
    Launch at login

    Since Dropbox does not open an application GUI, there is no need to check the “Hide” option for your new login item.

    Differentiate

    Now that you have two Dropbox instances running on your computer, you also have two Dropbox icons in your menu bar. With default settings, it can be hard to tell them apart.

    Not to worry—Dropbox offers the option to use a black and white icon. This setting is effective per instance, so all you need to do is decide which instance should have a different icon and change the setting. You can find the option under Preferences > General.

    Use black and white icons for one account
    Use black and white icons for one account

    Dropbox Preferences are accessed from the menu under the Dropbox menu bar icon. Check Use black and white menu bar icons.

    Now that one of your Dropbox icons is black and white, it should be easy to tell them apart on the menu bar:

    Menu bar icons

    Menu bar icons

    Happy Dropboxing!

    [UPDATE 2012.06.14] This article was previously posted on my company website. While updating the instructions and images today, I decided to move the content here.

    Note that I have personally tested this method on Mac OS X 10.6 Snow Leopard and 10.7 Lion. Both worked for me with no trouble. Therefore, I have little experience troubleshooting this setup - in my experience, if you follow the directions, it just works.

    [UPDATE 2012.12.26] Tested on Mountain Lion, both new install and upgrade. Some people have trouble with the second instance not running automatically after upgrading to Mountain Lion; see my comment from Dec 26, 2012 for the simple steps that worked for me.

    1. If memory serves, this idea came to me from David Sparks via the excellent Mac Power Users podcast with Katie Floyd. David talked about using two accounts so that he could share relevant files between his PC at work and his Mac at home without exposing everything in his personal Dropbox account. Even with the available selective sync feature in Dropbox, using a separate account still feels more secure.  ↩
    2. Note that my primary platform is Mac OS X. If you’re running Linux check the above-referenced article for differences. Windows users might want to try the Dropboxen Dropbox addon (which I have not tried myself).  ↩
    3. One seemingly minor change from the instructions on the Dropbox Wiki gave me a tremendous usability improvement. The instructions on the wiki suggest using $HOME/.dropbox-alt as the home path when setting up the additional instance. By default, Finder does not display files or folders that start with a period, which means .dropbox-alt is not a visible folder. By using $HOME/Dropbox-personal instead, you can see and browse the additional Dropbox folder, and even add the Dropbox-personal folder to your Finder sidebar.  ↩
    Posted
    AuthorDaniel Mann
    44 CommentsPost a comment