Ubuntu – How to configure Ubuntu one on a server


I wish to setup Ubuntu One on my 11.10 server but seems to be running into an error every time I attempt to run commands from http://manpages.ubuntu.com/manpages/lucid/man1/u1sdtool.1.html

For example when I try to run u1sdtool --start I am met with the following error:

dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

I have just installed Ubuntu One and have made no changes to it thus far.

Best Answer

Ubuntu One requires X and a dbus session. You can make it work headless following these instructions: https://wiki.ubuntu.com/UbuntuOne/Headless

Running Ubuntu One in Headless Mode

  1. Install ubuntuone-client package:

    sudo apt-get install ubuntuone-client 
  2. Setup the user directories:

    mkdir -p ~/.config/ubuntuone ~/bin 

    If you did not have a ~/bin when you logged in, your path doesn't include it, to rectify run (or simply log out and in again and ubuntu will set it up for you):

    export PATH=$HOME/bin:$PATH 
  3. Obtain OAuth key for your account:

    cd /tmp
    wget http://people.canonical.com/~roman.yepishev/us/ubuntuone-sso-login.py
    python ubuntuone-sso-login.py
    Ubuntu SSO Login: **your Ubuntu SSO Login**
    Password: **your Ubuntu SSO Password**
  4. Copy the line starting with oauth= to ~/.config/ubuntuone/syncdaemon.conf as oauth parameter under main section (this is ini-style file):


    (you might just as well remove the first two fields in the oauth-string, ie oath=aaa:bbb:ccc:ddd => oath=ccc:ddd )

  5. Download the u1sdtool wrapper which will start dbus when needed. By default Ubuntu adds ~/bin/ to your path, so when you run u1sdtool, you will be running the wrapper.

    wget http://people.canonical.com/~roman.yepishev/us/u1sdtool-wrapper -O ~/bin/u1sdtool
    chmod +x ~/bin/u1sdtool 
  6. Start Ubuntu One, check Ubuntu One status and connect (starting from Oneiric Ubuntu One is connecting automatically when started):

    u1sdtool --start
    u1sdtool --status
    State: READY
      connection: Not User With Network
      description: ready to connect
      is_connected: False
      is_error: False
      is_online: False
      queues: IDLE
    u1sdtool --connect 

    If you are greeted with a with the display manager error, try prepending u1sdtool with ~/bin/ since the most probable cause are the aforementioned issue with your PATH.

  7. Look at the string followed by "connection". If it says "Not User" your credentials haven't been processed, stop and start the syncdaemon:

    u1sdtool --quit
    u1sdtool --start

    and try again.

    If it says "No network", it claims you're not connected to the internet, and I had to fix this by installing nmcli (sudo apt-get install network-manager --no-install-recommends) and fiddle with nmcli. You might need to install consolekit, too.

  8. Start adding files to ~/Ubuntu One directory and u1sdtool to add UDF, publish the files etc.

Related Question