# Computing

### Unison

Windows binaries obtained from https://www.irif.fr/~vouillon/unison/ include both text (command line) and GUI versions. Save these to a folder of your choice e.g. C:\Users\<user>\unison. All the command line setup is required to run the GUI version!

#### Command line version

The remote shell method described requires a Windows ssh client that it can invoke with a command-line interface & suggests Cygwin from http://www.cygwin.com/ (setup-x86_64.exe). Install Cygwin as follows.

Create a folder c:\cygwin for the root directory and c:\cygwinpkg for the package storage
Run the installer .exe choosing to download from the Internet and choose a UK mirror site
Choose the Base package but also locate the openssh package. It resides under the "Net" tree. Clicking on the word "Skip" will select the package resulting in an "x" being displayed in the Binary checkbox.
Append the location of ssh.exe (C:\cygwin\bin) to your Windows \$PATH environment variable.
Start a new Command window on your PC.

Start a cygwin terminal by typing mintty on the Windows command line. This should open a terminal & you will be placed in cygwin's home directory (/) where you will see the cyqwin installation files & folders (C:\cygwin). Change to the directory home and make a directory there <user> with your username/Admitto/CRSid. In the mintty terminal, make a key pair by typing

ssh-keygen.exe -q -t rsa -N ""

and place both id_rsa and id_rsa.pub files in (Cygwin's) /home/<user>/.ssh directory. Copy the id_rsa.pub file to your login directory on the destination fileserver and append it to the file /home/user/.ssh/authorized_keys. Create the directory .ssh and the file authorized_keys if they do not exist already. Exit the mintty terminal.

Unison needs to be installed on the remote fileserver which one of the Computer Officers will have to do. Contact support@ch.cam.ac.uk for this if the following test fails.

Test the connection from your PC to the fileserver on the Windows command line e.g. with

ssh <group>-fs unison -version

If keys have been set up correctly this will not prompt for a password and will display the unison version on the fileserver. If you do not want to use the command line version everything should now be set up to use the GUI version (below).

To access your home share on the fileserver add an extra forward slash after <group>-fs and use the full path e.g.

"unison 2.48.4 text.exe" -times C:\Users\<user>\test ssh://vignolini-fs//data/group/vignolini/general/people/<user>/home/test

By using the '-times' option, file modification times (but not directory modification times) are propagated.

#### GUI version

Requires .dll's from GTK+ for Windows Runtime Environment at https://sourceforge.net/projects/gtk-win/. Download and install this (to C:\Program Files (x86)\GTK2-Runtime). Copy all files from \bin and place them in the folder with the unison executables (C:\Users\<user>\unison). Start the GUI with the following command or with a shortcut you have made to the executable.

C:\Users\oj100\unison>"unison 2.48.4 GTK.exe"

The GUI starts & asks you to set a Profile for your file sync-ing. The Profile Creation Wizard guides you through this. You wish to perform synchronization 'Using SSH'. Enter the Host (your <group>-fs) & your User name. Enter your Local directory/folder and the Remote destination folder. This GUI accepts \\<group>-fs\nethome as the root of your share on the fileserver (the double forward slashes around <group>-fs were required in the text example above). Finally, Add the times Preferences variable with a value True. Passwordless ssh has been configured if the text test above gave the unison version on the fileserver without prompting for a password. You will be asked to Open the Profile just created.

The Sychronization window will compare local (Windows) files on the left and remote (Server) files on the right and let you choose which way to propagate changes. This is fairly intuitive but it may be best to start with small folders which exist in both places.

The Unison manual is extensive and can be accessed from Help in the GUI and at http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html

### System status

System monitoring page

## Can't find what you're looking for?

Then you might find our A-Z site index useful. Or, you can search the site using the box at the top of the page, or by clicking here.