Open Source

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.

Editor's Picks