Ubuntu phone background file/directory remote sync

Hi everybody,

I like to show you how to setup your Ubuntu phone for background file/directory synchronisation.

  1. Setup passwordless ssh on phone
  2. Check synchronisation phone<->machines
  3. Setup TouchRules Ubuntu phone app (start sync@Wifi connect)

And go…

SSH

Seen on http://www.liberiangeek.net/2014/08/enable-password-less-ssh-logon-ubuntu-servers/

Open terminal app or adb shell from

Type in:

  • ssh-keygen -t rsa
  • ssh-copy-id -i <user_remote_server>@<ip_address_remote_server>

CHECK

Command in terminal app or adb shell (don’t forget space between both paths)

  • rsync -av -e ssh <user_remote_server>@<ip_address_remote_server>:<path_remote_server> <path_phone>

Now check. Remote directory and phone directory must containing files with same content.

TOUCHRULES

https://uappexplorer.com/app/com.ubuntu.developer.psasse.touchrules

Now setup rule. E.g.: sync files whenever phone is connected to WLAN named MyWifi.

  • create rule
  • create condition
    • choose base “wlan”
    • choose relation “connected”
    • type in name of wlan/ssid, to which phone needs to be connected
    • choose action “command”
    • type into textfield the following
      • rsync -av -e ssh <user_remote_server>@<ip_address_remote_server>:<path_remote_server> <path_phone>
  • execute script to create upstart configurations
    • sh /home/phablet/.local/share/com.ubuntu.developer.psasse.touchrules/install_touchrules.sh

Rebooting of the phone is not necessary.

This is great, everything is possible, this is my reason to go for Ubuntu! Check it out and let me know!

Advertisements