Top
Search
Thursday
Jun142012

Use two Dropbox accounts on one computer

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—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:

Different Dropbox icons
Different Dropbox 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.  ↩

PrintView Printer Friendly Version

EmailEmail Article to Friend

References (1)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    As Dropbox develops and expands, decisions they have made early on are tying them, and their users, in knots. The biggest problem they have is that they keep shifting their mental models of how their service works and it has broken Dropbox and exposed many Dropbox Teams users to real privacy ...

Reader Comments (33)

Great tip and very clear instructions. Thanks! One minor note: when saving the Automator script, be sure to save is as an Application, not as a Workflow, so that the script runs independently and does not simply re-launch Automator. Again, great tip!

June 25, 2012 | Unregistered CommenterBrian

A huge! help. It absolutely worked. Genius!

July 12, 2012 | Unregistered CommenterBeatrice

Take care, the code for the Automator action is getting cut off in the text above - be sure to use what you see in the image of the shell script action.

Just tried this on Mountain Lion.. worked great. Thanks!

August 11, 2012 | Unregistered CommenterCurt

@Brian - thanks for the tip; I'll update the post to clarify this point.

@Curt - appreciate the feedback about this working on Mountain Lion. Haven't upgraded yet myself (waiting for app compatibility), so nice to hear from another source.

I'll look into making the code block work better.

August 25, 2012 | Registered CommenterDaniel Mann

Works great...what a shame Dropbox doesn't natively support multiple accounts. I suppose that's a reasonable way to prevent people from getting a ton of free accounts. However, it ignore the obvious legitimate reasons for having multiple accounts.

One note, on 10.6.8 the client creates a "Dropbox" folder inside my "Dropbox-work" folder. The client doesn't like it when the "Dropbox" folder is renamed, and I can't get it to use the "Dropbox-work" folder without automatically creating the subfolder.

So, when to add the 2nd account to the Finder sidebar, I end up with two "Dropbox folders" unless...I guess I could go through the extra click of opening the sub folder ...duh.

Any thoughts or clarifications?

Also, the code snippet for Automater pasted just fine, it just doesn't display correctly.

August 26, 2012 | Unregistered CommenterDavid

Hi! Great post.

This worked for me with my second (and third!) dropbox folder for a long time. But suddenly, the automator script stopped running UNLESS I open automator and then open the application from inside automator. In other words, if I just click on the application from where I saved or or when start up tries to open it, they don't run.

Any thoughts on how I can get this to start running automatically again??

September 7, 2012 | Unregistered Commentersma

Thank you so much !

September 9, 2012 | Unregistered CommenterPomette

Out of curiosity--is there anything that would impede using this for Evernote, for example (like to let me access my Evernote on my wife's computer, where she also has Evernote)?

I ran a Shell Script for the following...

bash
HOME=$HOME/Evernote-wife /Applications/Evernote.app/Contents/MacOS/Evernote &


...but it only seemed to open Evernote, not load a new 2nd instance.

Thoughts?

September 12, 2012 | Unregistered CommenterKK

Thank you for this insightful post. Very good description of how to set everything up, and works perfectly.
I only had problems getting the Automator to run. The code you propose worked fine when launching it out of Automator, but not when running the code out of a saved automator app. I therefore re-wrote it for applescript, which works just fine. Maybe you want to share the code in your tutorial:

Simply create a new applescript with the following line, save it as an "Application" and put it into the startup item as described in your article:
---
do shell script "HOME=$HOME/Personal_Dropbox_PERSONALIZE_THIS /Applications/Dropbox.app/Contents/MacOS/Dropbox > /dev/null 2>&1 &"
---

September 12, 2012 | Unregistered CommenterBenjamin

Does anyone know how to do this on a PC?

September 19, 2012 | Unregistered CommenterNot-So-Tech-Savvy

Thank you very much! I am not a tech savvy person but this was easy and solved the headache of trying to juggle personal files with work files.

October 3, 2012 | Unregistered CommenterJulijana

THANK YOU so very much for this! I've spent the better part of 2 days trying to figure out how I could simultaneously run my work and personal dropbox accounts on the same computer. This was so very clear and easy to do. Thanks again for taking the time to share this great information.

October 8, 2012 | Unregistered CommenterValena

Hi, thanks, great tip! Once you have the two accounts on your iMac, how can you view both accounts from an Ipad? I use my iMac to work from home but use my iPad to go to meetings and sometimes need to use personal files and sometimes work-related files. I have Dropbox App installed in my iPad 3 but I cannot log off from my original (personal) account. Any ideas? Thanks!

October 13, 2012 | Unregistered CommenterAndrea

Hi Daniel
I have one problem: some how, when clicking "Run" in the Automator, NO Dropbox wizard appears, I do get positive "Workflow completed", but nothing else; I have followed all your small instructions' details.
What do you think might be the problem?
many thanks

October 15, 2012 | Unregistered CommenterEli

Thanks for this great info. Enabled me to get two accounts happening.

I have the same comment as David (Aug 26, 2012). I am on Mountain Lion 10.8.2, and Dropbox created the second "Dropbox" folder inside the $Home/Dropbox-personal folder. That's okay, I can live with that. But it would be nice to be able to change the name of one of the "Dropbox" folders in the favorites bar in Finder.

Did you find a way around that, or do you also have two "Dropbox" folders in Finder Favorites?

Regards,

Jonathan

October 28, 2012 | Unregistered CommenterJonathan

Great. Thanks. This is something I've wanted to do for ages and it seems to be working really well. Icing on the cake would be the capacity to have a second (app) personal-dropbox icon on my ipad. Is this asking too much!?

October 30, 2012 | Unregistered CommenterAlex

Hey David, 2 months later isn't very timely, but I've just set up a similar system and am bothered by this fact too. You can hide the second Dropbox folder (the one inside your Dropbox-work folder) with a command like:

cp $Home/Dropbox-work/Dropbox $Home/Dropbox-work/.Dropbox

and then symlink everything in Dropbox-work to the hidden secondary Dropbox folder, so Dropbox-work plays the role of Dropbox #2 with one extra layer of symbolic links patching the two folders together in the background. This may pose a problem under circumstances I have not yet foreseen, but for purposes of drag-and-drop file management it should achieve what your after without the annoying second click-through.

Now if we could just find a way to automate Dropbox.app's sign-in and linking process, perhaps just launching a single, generic window to input email + password + computer name, then we'd have it all. I've already written a set of commands to generate a second Dropbox directory as described above and swap in sets of folder and toolbar icons of my own design for distinguishing the two instances.

Automating the login process would allow us to include the commands to set the preferences (black menu bar icon, no camera uploads), hide the official second Dropbox folder, then symlink its contents to and from the 'Dropbox' folder you created with any name and icon of your choosing. I think that would really make a perfect one-click solution. I've coded this into a nice .app package with the icons auto-applied from its /Resources folder, just need to script through the setup process and it would be awesome. I've been calling my creation 'DupeBox'.

I'm sitting down right now to embed the existing commands in a 'for n+1' loop, adding an ascending numerical suffix to the created Dropbox folder, so that every time you click my DupeBox.app it launches another instance and another and another. I've already been able to do it by brute force, so now it's just a matter of parameterizing the appended value, so it creates Dropbox2, Dropbox3, Dropbox4, etc. I only have 1 account + 1 shared, so it's really just for fun to see tiny boxes go all the way across the menu bar.

If you have any thoughts on automating the setup screens I'd love to hear them.

November 1, 2012 | Unregistered CommenterRyan

@David - on my Mac, I simply added the Dropbox-personal folder to the sidebar, rather than the Dropbox folder inside it. Yes, it does take an extra click to get to the contents, but hey, this is a hack, right? That works well enough for now.

@sma - that is something I haven't seen happen. You could try removing and re-adding the login items, or re-creating the Automator application, to see if that helps. If you figure it out, please post back to help others who might encounter this issue. Thanks.

@KK - I'm not a big Evernote user, usually preferring a collection of plain text notes. That said, you might want to look at using shared notes in Evernote as a possible alternative approach. Here's an Evernote blog post from September about their sharing feature.

@Benjamin - thanks for suggesting an alternative. So long as the original method works for most people, I'll leave the article as-is to reduce confusion - but your comment may help someone who runs into the same issue.

@Not-So-Tech-Savvy - there used to be a tool called Dropboxen that would let you do this on Windows. It seems a bit outdated now, but that page now has a few other references that might prove useful. Let me know if any work for you.

@Julijana, @Valena - thanks for the feedback! I'm always happy to hear that something I posted helped someone.

@Andrea - so far as I know, there is not any way to configure two Dropbox accounts on your iPad. You can unlink the current account in Settings in the Dropbox app, then log in to the other to link it, but normally I would not recommend doing that, as unlinking your Dropbox account on the iPad (or iPhone/iPod Touch) could effect other applications that use Dropbox for syncing. (Just my guess, but it seems likely.)

Another approach might be to share a folder between your Dropbox accounts, and store files that you might need on the iPad or other device linked to your personal account in that folder. That way those files would be accessible on any device or computer linked to either Dropbox account.

@Eli - you might try running the command in a Terminal window. If you have a typo or syntax error, running this from Terminal instead of Automator might help you resolve the issue. When you have a working command, copy it back into Automator and continue following the guide.

@Jonathan - on my Mac, I simply added the Dropbox-personal folder to Finder Favorites. I do have to open the Dropbox folder inside Dropbox-personal after clicking the favorite, but that does eliminate the confusion.

@Alex - see my response to Andrea. Using a shared folder for specific files is the best option I know of at this time.

@Ryan - you are ambitious! I love the initiative, and if you take this concept all the way to a release version, I'd love to review it here. Keep me posted.

--

General update: I'm still working on improving the code blocks in the tutorial. Looks like I might be able to do something with content blocks in Squarespace 6. Once their issues from Hurricane Sandy are resolved, I'll work with their support team to complete my site migration to the new platform version. (It seems to have gotten stuck partway... I probably should not have tried a migration right in the middle of the storm!) Meanwhile, people do seem to find their way through, so that's reassuring.

Hope that helps, everyone! Thanks for stopping by, and for your comments. Glad to see this tutorial is getting so much traffic.

-Daniel

November 2, 2012 | Registered CommenterDaniel Mann

Works on mountain lion. Now I have both my personal dropbox and work dropbox working in harmony. THANKS!!!!!

November 4, 2012 | Unregistered CommenterVdubz

Thanks for this, a huge lifesaver for accessing my 3 Dropbox accounts with ease (personal, work, and resources). I am having an issue on my MacBook Pro (13" classic mid-2012 running 10.8.2) with the saved Automator applications added to startup items: they don't load at startup. If I double-click the Automator application file, it loads without issue. Any ideas why this wouldn't be working at startup? This is a minor issue as I don't restart terribly often, but it would be nice not to have to manually instantiate these.

November 4, 2012 | Unregistered CommenterWaylon
Comments for this entry have been disabled. Additional comments may not be added to this entry at this time.
« Mac Power Users Show 100 (live) | Main | Moving to Squarespace »