tecosystems

Tricking Dropbox

Share via Twitter Share via Facebook Share via Linkedin Share via Reddit

dropbox

While I’m entirely sure that I’m not the first to have thought of this, I confess to being entirely unaware there was a mechanism for incorporating external assets into your primary Dropbox directory. Instead, I was operating under the assumption that Dropbox would only synchronize that directory and only that directory’s contents. If I wanted to pull in /home/sog/Music, then, I had two choices: a.) move it into the Dropbox folder, or b.) make Dropbox synchronize the parent directory – in this case, /home/sog.

If the latter were an option, frankly, I would be doing just that, because it would be nice to have my home directory mirrored on the other machines I use. But even at the premium, for pay level – which I have purchased – I’m only given 50 GBs to work with, which isn’t enough. So that option is out. And moving my music directory around would break my library, my eMusic download path, and a couple of other things: not unrecoverable, but inconvenient.

Instead, what I’d like to do is leave the Dropbox directory alone, but have it yank in a few select external folders to be synced. Which can be done, fortunately enough.

All you have to do (on Linux, anyway) is create a symlink from the Dropbox directory to the folder you want to incorporate. Here’s how you do that:

  1. cd /home/yourusername/Dropbox</code (or whatever path you've selected as your Dropbox root
  2. ln -s /home/yourusername/Music Music (where the first parameter is the external directory name you want to draw from, the second the name of the pointer in the Dropbox folder)

And voila, you're done. This creates a symlink in the Dropbox directory to the external folder, meaning that although the files have not moved, they virtually appear in the Dropbox directory, at which point the app will dutifully begin syncing them up to the cloud. Problem solved.

A few caveats.

  1. According to Corey, this only works if you symlink out from the Dropbox directory; it won't function if you symlink into it.
  2. Be careful what you're synchronizing; the risk of collisions, for example, is significant if you're Dropboxing Tomboy notes on two machines (as I am), as Sandy points out. Speaking of, Cimi has a different approach for Dropboxing Tomboy specifically, which is worth reading.

Otherwise, enjoy: I hope this helps.

12 comments

  1. Are you using a theme on Ubuntu there or is that just a lot of self tweaking to get the black working right?

  2. Also keep an eye out for the “recent changes” spam if you’re actively editing (and constantly saving) a file in a synced directory. It’s more of an annoyance then a real problem.

  3. Mike: That looks like the Dust theme.

  4. @James: excellent guess. that’s exactly what that is. the odds of something i tweaked looking like that are near zero 😉

  5. Symlinks on Linux/Unix/Solaris/BSD/etc. are wonderful things for many reasons, this being just one of them, and a key reason I dislike Windows. How for example is one supposed to easily have Java applications pointing to a JRE directory and have them not break when you install a new version that has a different directory name? On *nix, just have a symlink /usr/java to wherever it is an voila you’ve isolated the apps from the physical directory location.

  6. Wonderful tip. I’ll try to employ it on my OS X machine as soon as I get home today. I wish I were able to do the same on Windows, but as in most areas, Windows just plainly sucks too much to give this kind of functionality. Being able to synchronize work documents from my Windows box would be neat, but alas we’re not close enough to a solution to even be thinking about a cigar. Windows blows!

  7. […] aliased folder however, were not. A few repeat & fails later a bit more searching brought me to this post that stated that this only works if you symlink out from the Dropbox […]

  8. Just wondering.. To pull off this trick on Windows, maybe you could use NTFS reparse points to pull in other folders (google “sysinternals junction”). I can’t try it as I’ve rather dumbly left my Dropbox on a FAT32 partition 🙁

  9. FYI: Windows also supports linking but they tend to call it a junction.
    And I can definitely recommend you the following application, which makes it really easy to create all kinds of links on a windows pc (junctions, hard links, …):

    http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html

  10. […] to be run FROM your DropBox directory, so be sure to cd /home/yourusername/Dropbox first!. Check this great article for more from a Linux HOWTO […]

  11. […] either drop them into your Dropbox folder, or create symlinks out to them from there. Here’s how to do that. Items that I back up – using the term loosely, as there’s no versioning, etc […]

Leave a Reply

Your email address will not be published. Required fields are marked *