Introduction

This page describes how AlexisHuxley installed and configured DropBox for command line use on Debian/lenny. It is based on instructions at http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall but includes a couple of fixes.

Procedure

  1. If you do not already have a Dropbox account then visit http://www.dropbox.com and create an account for yourself, but do not download any software; this procedure will take care of that.

  2. Visit http://www.dropbox.com, go to "Account" and "My Computers" and make sure to delete any references to the computer on which you're about to install Dropbox.

  3. Start a new terminal session; all commands below are to be run in that terminal.
  4. Download, install and start dropbox by running:

    wget -O dropbox.tar.gz "http://www.dropbox.com/download/?plat=lnx.x86"
    tar xzCf ~ dropbox.tar.gz           
    unset DISPLAY                  #  needed to prevent setup GUI starting 
    ~/.dropbox-dist/dropboxd & 
    dropboxd will display a message instructing you to link the computer to a dropbox account by visiting a URL.
  5. Visit the URL; in the terminal, dropboxd should display a message indicating that the computer has been successfully linked to a dropbox account. At this point ~/Dropbox will be created and Dropbox will start syncing whatever is in your Dropbox folder on the Dropbox servers, which, if your account is new will be 'Public', 'Photos' and 'Getting Started.pdf'.
  6. Use 'top' to determine when the dropbox process is no longer consuming CPU, indicating that the sync has finished.

  7. Download, install and start the dropbox CLI by running:

    wget -O dropbox.py "http://www.dropbox.com/download?dl=packages/dropbox.py"
    cat dropbox.py > dropbox
    chmod 755 dropbox 
  8. If you wish to archive the downloads (dropbox.tar.gz and dropbox.py) or move the executable script (dropbox) to a more suitable location (e.g. ~/bin), then do so now.
  9. If you wish to change the name of the Dropbox directory, then do not use the dropboxdir.py script which is available at http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall because:

    1. the value of db_path is wrong; symptoms of this include the error message:

      Traceback (most recent call last):
        File "/home/alexis/bin/fettuce/dropboxdir", line 27, in <module>
          cursor.execute("select value from config where key='dropbox_path'")
      sqlite3.OperationalError: no such table: config 
    2. even if db_path is corrected, it still cannot read or write the configuration database correctly; symtoms of this include the following:

      $ dropboxdir 
      current dropbox path: &{��{��
      $ 

    Instead, just use the command-line sqlite3, as in this example:

    dropbox stop
    NEWDROPBOXDIR=$HOME/foo/bar       #  or whereever
    mv ~/Dropbox $NEWDROPBOXDIR
    echo "update config set value = '$NEWDROPBOXDIR' where key = 'dropbox_path';" | sqlite3 ~/.dropbox/config.db 
  10. To run dropbox, run:

    dropbox start 

See also

CategoryProcedure

UsingCommandLineDropbox (last edited 2011-01-04 19:04:43 by AlexisHuxley)