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.

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

Post Build

Copy server key hash to following file.

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

Next step for me is to explicitly build app for 10.11 using 10.12 SDK.
As quick fix here is what i changed.

diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py
index f32ec483..7f41f489 100644
--- a/ext/toolchain/commands1.py
+++ b/ext/toolchain/commands1.py
@@ -449,10 +449,10 @@ class InternalCommands:
                        if generator.cmakeName.find('Unix Makefiles') == -1:
                                sdkDir = self.getMacSdkDir()
                                cmake_args += " -DCMAKE_OSX_SYSROOT=" + sdkDir
-                               cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=" + self.macDeploy
+                               cmake_args += " -DCMAKE_OSX_DEPLOYMENT_TARGET=" + '10.11'
 
-                       cmake_args += " -DOSX_TARGET_MAJOR=" + macSdkMatch.group(1)
-                       cmake_args += " -DOSX_TARGET_MINOR=" + macSdkMatch.group(2)
+                       cmake_args += " -DOSX_TARGET_MAJOR=" + '10'
+                       cmake_args += " -DOSX_TARGET_MINOR=" + '11'
 
                # if not visual studio, use parent dir
                sourceDir = generator.getSourceDir()
@@ -510,7 +510,7 @@ class InternalCommands:
                        shortForm = "macosx" + self.macSdk
                        version = str(major) + "." + str(minor)
 
-                       qmake_cmd_string += " QMAKE_MACOSX_DEPLOYMENT_TARGET=" + self.macDeploy
+                       qmake_cmd_string += " QMAKE_MACOSX_DEPLOYMENT_TARGET=" + '10.11'
 
                        (qMajor, qMinor, qRev) = self.getQmakeVersion()
                        if qMajor <= 4:

After above changes i was able to build and run synergy, there you go package build on 10.12 SDK for OS 10.11.

Autossh

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.1525726618.txt.gz · Last modified: 2020/08/10 02:29 (external edit)