User Tools

Site Tools


synergy

This is an old revision of the document!


Synergy

Project : Github

Installation

:!: Since version 2.x there is GUI for synergy available and there is no hm.sh script in source.
I've chose to use 2.x since it uses openssl to secure connection.

Linux

Most linux distro has package available.

| fedora
sudo dnf install synergy

Mac

  git clone https://github.com/symless/synergy-core.git
  git checkout v2.0.0-stable
  brew update
  brew upgrade
  brew info qt
  export CMAKE_PREFIX_PATH="/usr/local/Cellar/qt/5.10.1/Frameworks/"
  export LD_LIBRARY_PATH=$(brew --prefix openssl)/lib
  export CPATH=$(brew --prefix openssl)/include
  export PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig
  mkdir build
  cmake -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 -DCMAKE_OSX_ARCHITECTURES=x86_64
  make

Once building binary is done, Copy files to ~/bin/ so it can be used used within path.

Post Build

Server

  openssl req -x509 -nodes -days 3650 -subj /CN=Synergy -newkey rsa:4096 -keyout ~/.synergy/SSL/Synergy.pem -out ~/.synergy/SSL/Synergy.pem
  openssl x509 -fingerprint -sha1 -noout -in ~/.synergy/SSL/Synergy.pem > ~/.synergy/SSL/Fingerprints/Local.txt
  sed -e "s/.*=//" -i ~/.synergy/SSL/Fingerprints/Local.txt
  cat ~/.synergy/SSL/Fingerprints/Local.txt # This is where you get server key hash

Client

Copy server key hash to following file.

~/Library/Synergy/SSL/Fingerprints/TrustedServers.txt

Starting server / client

In my case server is on linux and client is on mac.

Server

| start server
/usr/bin/synergy-core --server --name desk -c /tmp/Synergy.TJ6658 --address :24800 -c ~/.synergy.conf --enable-drag-drop --enable-crypto --daemon

Client

Autossh ( If do not want to use built-in crytpo library )

Opensource version of synergy does not support encryption any more.
In order to secure data transmitted over network i use ssh tunnel, they suggest the same on their website.
Best bet is to use autossh, so if you are roaming between location it will auto connect when you are on same network.

Installation

brew install autossh

Setup Tunnel

autossh -f -v -M 24800 -N -R 24800:localhost:22 user@hostname

Client
Set ServerIP = 'localhost'

That should do it.

synergy.1525727326.txt.gz · Last modified: 2020/08/10 02:29 (external edit)