Discussion:
[unison-users] linux -> macos sync
Martin Genet genet@crans.org [unison-users]
2018-03-09 09:50:04 UTC
Permalink
Dear all:

I installed unison on both a (KDE Neon) Linux desktop (2.48.3 from
debian repository) and a MacBookPro (2.48.15 from HomeBrew). I can sync
from mac (running unison a.tmp ssh://
 works just fine) but not from
linux: running unsion a.tmp ssh://
 returns

Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server

Any idea what might be going on? Thanks!

Martin
Stefan Moser stefan.moser@alumni.ethz.ch [unison-users]
2018-03-09 10:07:06 UTC
Permalink
Have you installed the binary version on the Mac? On the Mac, start Unison and choose "install command-line tool" from the "Unison"-Menu.

Stefan
Post by Martin Genet ***@crans.org [unison-users]
I installed unison on both a (KDE Neon) Linux desktop (2.48.3 from
debian repository) and a MacBookPro (2.48.15 from HomeBrew). I can sync
from mac (running unison a.tmp ssh://
 works just fine) but not from
linux: running unsion a.tmp ssh://
 returns
Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server
Any idea what might be going on? Thanks!
Martin
__
Stefan M. Moser <***@alumni.ethz.ch>
Senior Researcher & Lecturer, ETH Zurich
Adj. Professor, National Chiao Tung University
Mathematiklehrer, Kantonsschule Uster
Web: http://moser-isi.ethz.ch/
Benoît-Pierre DEMAINE benoit@demaine.info [unison-users]
2018-03-09 10:06:57 UTC
Permalink
Is unison installed on both machines, and in the $PATH defined in
/etc/login.defs ?
Post by Martin Genet ***@crans.org [unison-users]
I installed unison on both a (KDE Neon) Linux desktop (2.48.3 from
debian repository) and a MacBookPro (2.48.15 from HomeBrew). I can sync
from mac (running unison a.tmp ssh://
 works just fine) but not from
linux: running unsion a.tmp ssh://
 returns
Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server
Any idea what might be going on? Thanks!
Martin
--
Post by Martin Genet ***@crans.org [unison-users]
o_/ DEMAINE Benoît-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would'nt have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)
worley@alum.mit.edu [unison-users]
2018-03-10 12:50:52 UTC
Permalink
Post by Martin Genet ***@crans.org [unison-users]
Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server
Linux ssh's in to the Mac. But on the Mac, the PATH of the process
doesn't contain unison.

It is fairly common that when you ssh into a machine "as user X", the
new process that is set up doesn't have exactly the same initialization
as if you logged in to the machine as user X. One fix is to decode how
sshd sets up the new processes and adjust that to get the results you
want, in particular, to get the PATH set the same way.

An alternative is to use the -servercmd argument. From the Unison
manual:

You can give an explicit path for the unison executable on the
server by using the command-line option -servercmd
/full/path/name/of/unison or adding
servercmd=/full/path/name/of/unison to your profile (see the Profile
section). Similarly, you can specify a explicit path for the ssh
program using the -sshcmd option. Extra arguments can be passed to
ssh by setting the -sshargs preference.

Dale
Martin Genet genet@crans.org [unison-users]
2018-03-15 14:40:33 UTC
Permalink
Many thanks to all for your help.

On both linux and the mac I compiled the last stable version of unison,
and put it in /usr/local/bin.

What is a little surprising is that from the linux machine, I can ssh
into the mac and run unison, no problem; but when I run unison from the
linux machine it does not find unison on the mac. Anyway, I added
servercmd=/use/local/bin/unison to the profile file on the linux
machine, and now it can find unison on the mac.

Thanks again.

Martin
Post by ***@alum.mit.edu [unison-users]
Post by Martin Genet ***@crans.org [unison-users]
Contacting server...
bash: unison: command not found
Fatal error: Lost connection with the server
Linux ssh's in to the Mac. But on the Mac, the PATH of the process
doesn't contain unison.
It is fairly common that when you ssh into a machine "as user X", the
new process that is set up doesn't have exactly the same initialization
as if you logged in to the machine as user X. One fix is to decode how
sshd sets up the new processes and adjust that to get the results you
want, in particular, to get the PATH set the same way.
An alternative is to use the -servercmd argument. From the Unison
You can give an explicit path for the unison executable on the
server by using the command-line option -servercmd
/full/path/name/of/unison or adding
servercmd=/full/path/name/of/unison to your profile (see the Profile
section). Similarly, you can specify a explicit path for the ssh
program using the -sshcmd option. Extra arguments can be passed to
ssh by setting the -sshargs preference.
Dale
Loading...