Linux

Use DropBox to seamlessly sync files

Vincent Danen introduces open source DropBox, a file synchronization service that works for Linux, Mac OS X, and Windows clients. DropBox can be used to share documents, configuration files, photos, music, or anything else you want between systems linked to your account.

DropBox is a new synchronization service that works seamlessly between Linux, Windows, and Mac OS X clients. With it, you have a specific directory that is synchronized between various systems linked to your account. By dragging a file into this special DropBox directory, it will be automatically pushed to every other system's DropBox; remove a file and it will be removed from every system. This can be used to share documents, configuration files, photos, music, or anything else you want. Beyond synchronizing files between linked systems, you can also access files via the DropBox Web site.

For the Mac and Windows, installation is extremely straightforward. Download and install the client software, set up an account, and begin dragging files in your DropBox. For Linux, there are a few more steps, particularly if you are using an unsupported distribution. The DropBox Web site provides binary packages for Fedora Core 9 and Ubuntu 7.10 and 8.04. It also provides the source tarball.

If you have a relatively recent RPM-based distribution, installing the FC9 rpms may work. On Mandriva Linux 2009, installing the FC9 rpms was very easy, with the exception of one macro that wasn't expanded, which caused a dependency issue. (The dependency is "libgnome >= %{gnome_version}", which does not "expand" on Mandriva Linux 2009.) DropBox requires GLib 2.14 or higher, so it will work with any recent GNOME release. Since Mandriva Linux 2009 comes with GNOME 2.24, it is possible to use the binary RPM from FC9, with a little force:

# rpm -ivh nautilus-dropbox-0.4.1-1.fc9.x86_64.rpm
warning: nautilus-dropbox-0.4.1-1.fc9.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 3565780e
error: Failed dependencies:
       libgnome >= %{gnome_version} is needed by nautilus-dropbox-0.4.1-1.fc9.x86_64
# rpm -ivh nautilus-dropbox-0.4.1-1.fc9.x86_64.rpm --nodeps
warning: nautilus-dropbox-0.4.1-1.fc9.x86_64.rpm: Header V4 DSA signature: NOKEY, key ID 3565780e
Preparing...                ########################################### [100%]
   1:nautilus-dropbox       ########################################### [100%]

Make sure you try the install first without the --nodeps option to ensure all of the other dependencies are met. Yes, this is reminiscent of "dependency hell", but it does work quite well and means you don't have to build it from source and install a number of development packages just to compile it.

Once it is installed, be it via the binary packages or compiled from source, Nautilus needs to be restarted. This can be accomplished by executing:

$ killall nautilus

Once Nautilus restarts, the plugin that is the open source component of DropBox will start and ask whether your are new to DropBox (in which case you get to sign up), or an existing DropBox user (in which case you have to provide your authentication credentials). Regardless, it will download the closed-source component, then install it and begin to synchronize your DropBox folder.

The Nautilus component is what shows the various badges indicating file and directory status, in the Nautilus file manager. A blue synchronization symbol will appear when DropBox is synching files, a green check mark symbol will appear when files are synchronized.

Currently, the Nautilus client is the only frontend for DropBox on Linux, but provided Nautilus has launched, the dropboxd daemon will be started. From that point, you can use the command-line or any other file management tool to manage files, albeit without having the status badges you would have in Nautilus.

DropBox is a great way to keep files synchronized between systems. It is a paid service if you need more storage space, but you can store 2GB of data for free.

Get the PDF version of this tip here.

Delivered each Tuesday, TechRepublic's free Linux and Open Source newsletter provides tips, articles, and other resources to help you hone your Linux skills. Automatically sign up today!

About

Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.

9 comments
john
john

Dropbox is not open source at all. There is a very thin open source GUI that is open source, but when you install it, it goes ahead and downloads 37 MB of binary files. These binary files include their main closed-source daemon, ~/..dropbox-dist/dropboxd, as well as lots of shared object binaries from *mostly* liberally-licensed open source projects. The DropBox people have no intention of making that code open source, and their communications protocol is also closed. FWIW, there are some concerns that the binary closed-source code is breaking various open source licenses, due for example to their inclusion of rsync and readline binaries in their binary package.

kav1213
kav1213

nice explanation...now how does one install drop box? what it does OK. How to do it ...nada!! I dont understand your line of thinking...Rich

Photogenic Memory
Photogenic Memory

For some reason I have no luck setting up Samba on my centOS box? No amount of file tweaking or analyzing with testparm will not help. Anyways, I know there's other methods of file sharing like scp and ftp but perhaps this program will make things a whole lot easier like it's name states.

bblackmoor
bblackmoor

I have been trying to find a way to keep files on an Android based device synced with files on one or more Windows desktops. Does anyone know if this will do the trick?

pkvelins
pkvelins

How is this better than Novell's iFolder? It's free and gives you full control. You don't have to go through someone's syncing server and pay subscription for it. I disregard businesses that depend on people's lack of information. There is a number of crosspatform, free file-sync solutions out there including DirSync Pro, Unison, JFileSync, and many others.

bob
bob

I've been using DropBox since it was a beta for Windows only. I now use it on Linux (Ubuntu) as well. I love it. If you are worried about security, encrypt your files before you put them in the dropbox.

d50041
d50041

Much easier to use Synctoy from Microsoft between two Windows machines, or a computer and a server. Free download and very easy to setup, advantage to laptops which travel. Also use DFS to have files available over multiple locations, pre-load on each server, MAC clients can access also

bblackmoor
bblackmoor

If what you say is true, that is a serious concern. Why on earth would anyone use so much of other people's open source code and then turn around and restrict their own code? People baffle me.

Aakash Shah
Aakash Shah

Offline Files would also be a good in a Windows only environment where a laptop would always have the primary computer's files available to it, and automatically sync when it reconnects.

Editor's Picks