Ubuntu One on a Headless Server

Per Liedman provides valuable instructions on how to use Ubuntu One (a 'Dropbox' style file sharing app for Ubuntu, created by Canonical) on a headless Ubuntu server. That is, you have no graphical interface, only the command line. Below are my notes of how I set it up, following Per's instructions with a few minor extra details regarding finding the token/secret and using u1sync. On the headless server install u1sync, which is in the ubuntuone-client-tools package. My server is Ubuntu 10.04 LTS.
sgordon@lemon:~$ sudo apt-get install ubuntuone-client-tools
This installed a number of other packages (about 128MB) which I think are needed by the GUI but not the command line client. Not sure of a way to get only the command line client u1sync without these extra packages. Now on a desktop PC with Ubuntu One already in use find the authentication token. My desktop is running Ubuntu 11.04. In the application "Passwords and Encryption Keys" in the "Passwords" tab expand "Passwords: login" to show a list of stored passwords. At least one should be "Ubuntu One". Double-click on it and then select and show the password. There is a long string like:
consumer_secret=aaaaa&token=bbbbb&consumer_key=ccccc&name=ddddd&token_secret=eeeee
where "aaaaa", "bbbbb" are long random-looking strings. You want the value for token and token_secret, that is, bbbbb and eeeee Now back on the server run u1sync to initialise your Ubuntu One directory. In the commands below, when I write bbbbb and eeeee, substitute the values found above.
sgordon@lemon:~$ u1sync --init --oauth=bbbbb:eeeee /home/sgordon/Ubuntu\ One

Initializing directory...

Writing mirror metadata...

Done.
Now that the directory is initialised, to sync the files in it just run the u1sync command without the init option (below I've removed a lot of the output - it basically shows the list of files that are being synced):
sgordon@lemon:~$ u1sync  --oauth=bbbbb:eeeee /home/sgordon/Ubuntu\ One


Merging trees...
346.... DIR  /  sha1:3b6...
  957... FILE file1.tgz  sha1:16...
  ...

Syncing content...
▼   file1.tgz
...

Updating mirror metadata...

Done.
Now your directory on the server should contain the files that where in the "Ubuntu One" directory on your desktop. You can put the above u1sync in a script or cron job to regularly synchronise your files.