Difference between revisions of "Dropbox"

From ArchWiki
Jump to: navigation, search
(Installation from Yaourt)
m (Without Nautilus: fixed typo)
Line 56: Line 56:
   $ wget http://dl.getdropbox.com/u/6995/dbreadconfig.py
   $ wget http://dl.getdropbox.com/u/6995/dbreadconfig.py
Run the first script and check for the follwing output:
Run the first script and check for the following output:
   $ python dbmakefakelib.py
   $ python dbmakefakelib.py
   dropboxd ran for 15 seconds without quitting - success?
   dropboxd ran for 15 seconds without quitting - success?

Revision as of 23:20, 12 March 2010

Dropbox is a file sharing system that recently introduced a GNU/Linux client. Use it to transparently sync files across computers and architectures. Simply drop files into your "~/Dropbox" folder, and they will automatically sync to your centralized repository.

Installation Using an AUR Helper

The GNU/Linux Dropbox client is packaged both as a stand-alone binary and a Nautilus plugin. The package names in the AUR are either "dropbox" or "nautilus-dropbox".

  1. You can use an AUR helper to easily install Dropbox.
    • If you installed the stand-alone version ("dropbox"), you can now look for Dropbox in your application menu or run "dropboxd" from the command-line. The client icon will appear in the system tray.
    • If you installed the Nautilus plugin ("nautilus-dropbox"), restart Nautilus. You will see the Dropbox icon in your panel.
  2. Eventually a popup will ask you to login to your Dropbox account, or start a new one. Enter your credentials.
  3. After some time you will see a "Welcome to Dropbox" popup, which will give you the opportunity to view a short tour of Dropbox.
  4. Press the "Finish and go to My Dropbox".

To use it, simply drag and drop files into your "Dropbox" folder.

Installation from Source

If you prefer compiling from source, Dropbox's Nautilus plug-in compiles perfectly on Arch.

  1. Make sure you have or install nautilus, python, pygtk, glib2, docutils, pkg-config, and libnotify from pacman. These are necessary to compile Dropbox.
  2. Download the .tar.gz from Dropbox's website
  3. Navigate to where you downloaded the file.
  4. Extract the file
$ bunzip2 nautilus-dropbox-0.6.1.tar.bz2
$ tar xvf nautilus-dropbox-0.6.1.tar
  1. Navigate to the "nautilus-dropbox" directory
  2. Configure, and check the output for missing dependencies.
$ ./configure
  1. If the configure went well, make.
$ make
  1. Provided the compilation completed successfully, install Dropbox
$ sudo make install
  1. Now start the Dropbox, and tell it to install the proprietary daemon
$ /usr/bin/dropbox start -i
  1. It will download, unpack, and install the daemon, then launch the configuration wizard. Enter your details.

Dropbox should now be running, and syncing with the Dropbox servers. Now you can use dropbox just as if you automatically installed it using an AUR helper, but now with a smug feeling of contentment.

Without Nautilus

If you happen to not use the Gnome desktop environment, you may not want to use Nautilus. The following instructions are taken from the dropbox tips and tricks website and enable you to share your ~/Dropbox folder without bringing in those gnome dependencies.

First, download the Dropbox standalone client for 32bit or 64bit. Put it in your home directory.

Note: i've been having problems of late, downloading the experimental build from here solved it for me on two machine so far.

While in your home directory, extract the downloaded tarball.

 $ cd
 $ tar zxof dropbox*.tar.gz

Next, use wget to download a few scripts needed to get around those nautilus requirements:

 $ wget http://dl.getdropbox.com/u/6995/dbmakefakelib.py
 $ wget http://dl.getdropbox.com/u/6995/dbreadconfig.py

Run the first script and check for the following output:

 $ python dbmakefakelib.py
 dropboxd ran for 15 seconds without quitting - success?

Now run the second script to get some info required to register your client:

 $ python dbreadconfig.py
 host_id = 739bfe362f3bb3246da99dc8d20dbe2b
 last_revision = None
 schema_version = 6

The important line here is the host_id. Go to https://www.getdropbox.com/cli_link?host_id=HOSTID (replacing HOSTID with the string from above) and follow the steps to register your client.

There should now be three directories in your home directory called: ".dropbox-dist", ".dropbox", and "Dropbox". Create ~/Dropbox if it doesn't exist.

You can start the dropbox client with the following command:

 $ ~/.dropbox-dist/dropboxd &

Move files into "Dropbox" to sync them. ".dropbox" holds configuration databases and caches for Dropbox. Don't touch this.

At this point, you can continue using the dropbox daemon as is, placing the above command in some sort of startup script. If you would rather dropbox run as a daemon like sshd or vsftpd, simply do the following:

As root, copy this into a file called /etc/rc.d/dropboxd; replace all occurrences of USER, obviously.

 . /etc/rc.conf
 . /etc/rc.d/functions
 PID=`pidof -o %PPID /home/USER/.dropbox-dist/dropbox`
 case "$1" in
     stat_busy "Starting Dropbox Service"
     [ -z "$PID" ] && su -c "/home/USER/.dropbox-dist/dropboxd &" USER
     if [ $? -gt 0 ]; then
       add_daemon dropboxd
     stat_busy "Stopping Dropbox Service"
     [ ! -z "$PID" ] && kill $PID > /dev/null
     if [ $? -gt 0 ]; then
       rm_daemon dropboxd
     $0 stop
     sleep 3
     $0 start
     echo "usage: $0 {start|stop|restart}"
 exit 0

Make the file executable with

 sudo chmod +x /etc/rc.d/dropboxd

This allows you to start or stop dropboxd just like any other service. place it in the daemons array in rc.conf for it to start at boot.

 sudo /etc/rc.d/dropboxd start
 sudo /etc/rc.d/dropboxd stop
 sudo /etc/rc.d/dropboxd restart

And in rc.conf:

 DAEMONS=(syslog-ng network sensors hal @fcron @openntpd @alsa @dropboxd !icecast !mpd)

Without Nautilus (Another Way)

Another way to use Dropbox without Nautilus but with another file manager like Thunar is described below:

1. Download and install the dropbox package from the AUR.

   $ aurget dropbox

2. Create a fake Nautilus script that will launch Thunar:

   $ sudo touch /usr/bin/nautilus && sudo chmod +x /usr/bin/nautilus && sudo nano /usr/bin/nautilus

3. Insert this text into the file, then save and exit:

   exec thunar $@
   exit 0

4. Launch Dropbox

   $ dropboxd

5. Click on the dropbox tray icon to open your dropbox folder in Thunar.

Note: in this way there is no need to create a dropbox daemon in /etc/rc.d and to start it at boot via /etc/rc.conf or to make it start via your session manager: just leave the "Start dropbox on system startup" option flagged in the Preferences window.

Alternative to install: use the web interface

If all you need is basic access to the files in a dropbox, you can use the web interface at http://getdropbox.com to upload and download files to your dropbox. This can be a viable alternative to running a dropbox daemon and mirroring all the files on your own machine.

Securing your Dropbox

If you want to store sensitive data in your Dropbox, you should encrypt it before. Syncing to Dropbox is encrypted, but all files are (for the time being) stored on the server just as you put them in your Dropbox.

  • Dropbox works with Truecrypt, and after you initially uploaded the Truecrypt volume to Dropbox, performance is quite ok, because of Dropbox has a working binary diff.
  • Another possibility is to use EncFS, which has the advantage that all files are encrypted separately, i.e. you don't have to determine in advance the size of the content you want to encrypt and your encrypted directory grows and shrinks while you add/delete/modify files in it. You can also mount an encrypted volume at startup using the -S option of encfs to avoid having to input the passphrase, but note that your encrypted files are not secure from someone who has direct access to your computer.