jonEbird

May 28, 2011

Custom Dropbox Directory

Filed under: blogging,linux,usability — jonEbird @ 10:38 am

Ever since I rebuilt my laptop I’ve keep a file called “rebuild.txt” where I detail every little customization I’ve done. The requirement is that everything that I do has to be completely command line oriented where a block copy-and-paste would redo the same customization. So far I have things documented like setting up my local email routing, autologin to the laptop, additional RPMs w/ extra repositories, iptables rules, GTK configs, etc. The latest customization I’ve performed is when I finally decided to setup Dropbox.

I like Dropbox for it’s simplicity and the fact it integrates well with Linux. My only problem was that the directory I really wanted to have synchronized was my ~/projects/ directory. I actually didn’t do any google searches on how to change it before diving into figuring it out. I figured Dropbox would create a dot-file directory to stuff configuration and found that at ~/.dropbox/ and after that it didn’t take too much work to reverse engineer the setup.

So, here is my addition to my “rebuild.txt” file for how I would redo my Dropbox setup:
(Note: I’m running Fedora 13 but that fact really only applies to how I was installing Dropbox)


cat <<\EOF | sudo tee /etc/yum.repos.d/dropbox.repo
[Dropbox]
name=Dropbox Repository
baseurl=http://linux.dropbox.com/fedora/$releasever/
gpgkey=http://linux.dropbox.com/fedora/rpm-public-key.asc
EOF

# Now install
sudo yum -y install nautilus-dropbox
# After installing, I did launch dropbox and setup an account.

# Stop dropbox
pkill dropbox

# Modify the default location?
cp -p ~/.dropbox/config.db{,.orig}
echo "update config set value = '/home/jon/projects' where key = 'dropbox_path';" |\
sqlite3 ~/.dropbox/config.db
rsync -av ~/Dropbox/ ~/projects/

# now start dropbox again
~/.dropbox-dist/dropboxd

After setting it up, I finally realized I could have google'd this and I did for curiosity sake. A common technique I saw was around using symlinks, but I found it fun to reverse engineer their configuration and was pleasantly amused that they didn't try to obfuscate the config. At this point I should probably stop poking around because I can see that the client is written in Python and I'm now finding other interesting things about the client.

Viewing 3 Comments

 
close Reblog this comment
blog comments powered by Disqus