I'm trying to sync a folder in my host OSX to a VM running Ubuntu. (laravel/homestead). This is the command I run on my host:
$ unison ssh://[email protected]//home/vagrant/www ~/unison/www -repeat watch
which produces the following output
Contacting server...
Connected [...]
Looking for changes
Waiting for changes from server
Fatal error: Server: Unexpected response 'Usage: unison-fsmonitor [options] root [path] [path]...' from the filesystem watcher (expected VERSION)
On my localhost:
$ unison -version
unison version 2.48.3
$ unison-fsmonitor
VERSION 1
On my VM:
$ unison -version
unison version 2.48.3
$ unison-fsmonitor
Usage: unison-fsmonitor [options] root [path] [path]...
This program monitors file system changes on all given (relative to root) paths
and dumps paths (relative to root) files to a file. When launched, this file is
recreated. While running new events are added. This can be read by UNISON
to trigger a sync on these files. If root is a valid unison profile, we attempt
to read all the settings from there.
For my localhost, I installed unison via homebrew, and downloaded the unox.py file from github and installed it to /usr/local/bin/unison-fsmonitor.
For my VM, I used ppa:eugenesan/ppa for unison, and downloaded the source for version 2.48.3 from the unison website to get a copy of fsmonitor.py, which I placed under /usr/bin/unison-fsmonitor.
Unison without -repeat watch works without issues.
I get the same output if I try to run the same command (reversing the ssh) form inside the VM. I've read that the unison-fsmonitor should comply with the protocol described in /src/fswatch.ml and this doesn't seem to be the case for the default fsmonitor.py script. Am I missing something? Is there another script that should be used for the unison-fsmonitor executable instead?