UbuntuOne from command line u1sdtool

Recently I inherited laptop and most of the things I do I do on this laptop. I have a desktop PC that is much more powerful and most of the applications I run on this desktop machine e.g. GIMP, VirtualBox and VMs and more. I do connect to my desktop Ubuntu machine from my laptop (ssh), and run remote applications on my laptop (X11 forwarding). Everything works quite nice. But... I have had some issues to synchronise files (enabled for UbuntuOne synchronisation within ~/home/<user>) from my desktop to UbuntuOne cloud. It works fine when I log in to desktop but not when I do ssh to it. For example I do ssh to my Ubuntu desktop, edit some file (vim test.txt) that is in the folder that is synchronising to UbuntuOne cloud, save changes and ... nothing - new version is not pushed into UbuntuOne server automatically. It is annoying and I could stand it - there are ways to overcome this issue e.g. login into desktop machine but I knew that there is some problem that needs to be tracked and corrected.

After a few hours of searching and trying I found the answer (almost).

Please notice that I have had UbuntuOne desktop application installed, and configured already - as I have been running Gnome windows manager when I used desktop machine everyday (I access it from my laptop mostly- just to remaind you). If you do not know there is a command line tool called u1dstoolthat - "command line utility for controlling ubuntuone-syncdaemon". And to mamnage UbuntuOne we make use of it.

There are steps I had to do in order to enable synchronisation of files with UbuntuOne account:

  1. Check if the ubuntuone-syncdaemon is running: ps aux | grep ubuntuone-syncdaemon | grep -v "color"
    if it is running you should see one line as an output otherwise deamon is not running (to start deamon try u1sdtool --start).
  2. Check status of ubuntuonce-syncdaemon by typing: u1sdtool --status
    what you should see, idealy, among the lines is this line: "connection: With User With Network" - when you see this everything should work just fine. In my case initial output of previous command was: "Without User Not Network" what means that authentication failed and there is not Internet connection. To fix "Without User" problem I made file in ~/.config/ubuntuone/syncdaemon.conf as it is described in this forum - look for Obtain OAuth key for your account. To fix problem with network Internet connection I had to make managed network interface by editing the /etc/NetworkManager/NetworkManager.conf and adding/amending line managed=false to managed=true and restart service: sudo service network-manager restart

At this point I had my ubuntuone-syncdaemon working just fine, I am able to edit files and they are pushed into UbuntuOne server (to see if there are any file awaiting synchronisation run: u1sdtool --waiting or u1sdtool --current-transfers).

What I noticed unfortunatelly is that once I log off and ssh to my desktop again UbuntuOne synchronisation won't work. Typing u1sdtool --status shows that: connection With User Not Network - to fix this I have to manually run sudo service network-manager restart. Not sure if and how to fix this problem but for the time being I have to live with what I have managed to set up.

One more thing: u1sdtool to run needs window manager therefore I need to always ssh with -X option.

There are resources that I found useful when troubleshooting issue with ubuntuone-syncdeamon in command mode:

  1. http://askubuntu.com/questions/95591/how-do-i-configure-ubuntu-one-on-a-...
  2. https://wiki.ubuntu.com/RomanYepishev/UbuntuOne/ClientControl
  3. http://www.christophermanning.org/writing/force-ubuntu-one-to-rescan-and...
  4. https://wiki.debian.org/NetworkManager#Enabling_Interface_Management

I am planned to write something similar about Dropbox (so far still on my to-do-list) and for time being I found these links with good information:

  1. How to access Dropbox from the command line in Linux

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.