Install Dropbox
# mkdir -p /tmp/dropbox
# cd /tmp/dropbox
# curl -OL http://dl.getdropbox.com/u/6995/dbmakefakelib.py
# curl -OL http://dl.dropbox.com/u/637552/Dropbox/dbreadconfig.py
# curl -L -o dropbox.tar.gz http://www.dropbox.com/download?plat=lnx.x86_64
Use plat=lnx.x86 if you want the 32-bit client. This creates a temporary directory for our Dropbox install files, and downloads two necessary python scripts: dbmakefakelib.py which creates fake stub copies of GUI libraries so the dropboxd daemon starts, and dbreadconfig.py which displays dropbox configuration information.
Decide which user will be running the Dropbox client; this could be a dedicated user or it could be a regular user. You can also have more than one Dropbox instance running on the system, so you may opt to set it up for multiple users (although each user can only run one Dropbox instance). For this example, we will have created a special user “dropbox” which will run this Dropbox client.
# su - dropbox
$ cd ~/
$ tar xvzf /tmp/dropbox/dropbox.tar.gz
$ cd .dropbox-dist
$ python /tmp/dropbox/dbmakefakelib.py
dropboxd ran for 15 seconds without quitting - success?
The dbmakefakelib.py script requires gcc, so you must have gcc installed on the system. This creates fake stub copies of the GUI libraries so that dropboxd will start. At the end, you can see that it launched dropboxd; press [CTRL]C to exit the script. dropboxd should still be running in the background:
$ ps ax | grep dropboxd
24001 pts/0 S 0:00 sh -c { /home/dropbox/.dropbox-dist/dropboxd; } 2>&1
Now that dropbox is running, we need to link it to an existing account:
$ cd ~/
$ python /tmp/dropbox/dbreadconfig.py
host_id = 0bd9c5a15458fbc31f85e892faa7dac4
schema_version = 6
Grab the host_id from above. Login to the Dropbox web interface, and once you have logged in, manually visit this URL:
https://www.dropbox.com/cli_link?host_id=[HOST_ID]
Replace [HOST_ID] with the host_id that dbreadconfig.py outputs. When you have done that, the Dropbox site will tell you that you have successfully linked a new computer. Go to your Account settings and then My Computers and you will see the new computer listed.
If you have not killed the dropboxd process that dbmakefakelib.py started, you will find that it is already downloading the files from the Dropbox to ~/Dropbox/ in the background.
To start the dropboxd daemon in the background at boot, you can add the following to your /etc/rc.d/rc.local init script:
daemon --user dropbox /bin/sh -c "/home/dropbox/.dropbox-dist/dropboxd&"
This will start dropboxd in the background with the privileges of the user for which it is installed (in this case, the user is “dropbox”). If you want to do a system-wide initscript, visit the Dropbox wiki where there are some examples you can use, including initscripts for Fedora/Red Hat and for Debian/Ubuntu. It also has examples for how to set up Dropbox running under DJB’s daemontools.
**Hint to make sure that all the folders are not synced . use a different dropbox account for the linuxbox and share olny the specific scripts folder with it