How To Install Dropbox In An Entirely Text Based Linux Environment
You will need:
* At least version 2.4 of the C library
* wget
* gcc C compiler
* The C library development files
* Python 2.5
* a web browser
* dbmakefakelib.py
1. Use wget to download the Dropbox Linux client, using either the link to the latest stable version (32-bit or 64-bit), or go to the forums and find a link to the latest forums version.
This example was written using the the 32-bit build of the client below:
wget -O dropbox.tar.gz http://www.getdropbox.com/download?plat=lnx.x86
2. Use tar to extract the client. It will be placed in a hidden folder named .dropbox-dist/ (lame!):
tar xfzv dropbox.tar.gz && cd .dropbox-dist
3. Use wget to download the Python script needed to set this up.
wget http://dl.getdropbox.com/u/6995/dbmakefakelib.py
4. Edit the python script, you need to change the "killall dropboxd" to just "killall dropbox" (no d)
vi dbmakefakelib.py
5. Run the dbmakefakelib.py script - this creates fake stub copies of the GUI libraries so dropboxd will start.
python dbmakefakelib.py
6. Check to see if your pc got auto registered on https://www.getdropbox.com/events you should see
The computer yourpc.yourdomain.com was linked to your account
if you don't see that entry, then
copy and paste the url that looks like:
https://www.getdropbox.com/cli_link?host_id=###############################
into your webbrowser to associate this machine with your dropbox account
7. Create a folder ~/Dropbox for the Dropbox files.
mkdir ~/Dropbox
8. Create a /etc/rc.d/init.d/dropbox script by pasting the following (make sure to replace user1/user2 with your /home/user/)
# chkconfig: 345 85 15
# description: Startup script for dropbox daemon
#
# processname: dropboxd
# pidfile: /var/run/dropbox.pid
#
# Source function library.
. /etc/rc.d/init.d/functions
DROPBOX_USERS="user1 user2"
prog=dropboxd
lockfile=${LOCKFILE-/var/lock/subsys/dropbox}
RETVAL=0
start() {
echo -n $"Starting $prog"
for dbuser in $DROPBOX_USERS; do
daemon --user $dbuser /bin/sh -c "~$dbuser/.dropbox-dist/dropboxd&"
done
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch ${lockfile}
return $RETVAL
}
stop() {
echo -n $"Stopping $prog"
for dbuser in $DROPBOX_USERS; do
killproc ~$dbuser/.dropbox-dist/dropboxd
done
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $prog {start|stop|restart}"
RETVAL=3
esac
exit $RETVAL
9. Now add the symlinks to start it (rc3.d most likely):
chkconfig --add dropbox
or
cd /etc/rc.d/rc3.d/ && ln -s /etc/rc.d/init.d/dropbox
10. start it
chmod +x /etc/rc.d/init.d/dropbox && /etc/rc.d/init.d/dropbox start