User Tools

Site Tools


synergy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
synergy [2017/06/23 17:14]
k2patel
synergy [2020/12/22 23:37] (current)
k2patel [Synergy]
Line 1: Line 1:
 ====== Synergy ====== ====== Synergy ======
  
-Project : [[https://​github.com/​symless/​synergy|Github]]+Project : [[https://​github.com/​symless/​synergy-core.git|Github]]
  
-=== Installation === +:!: Barrier / Opensource forked from 1.x after it became paid. 
-Due to infrastructure requirement,​ my mac now has 10.12 SDK and 10.11 MacOS.\\ +Project : [[https://​github.com/​debauchee/​barrier|Barrier]] 
-was able to successfully build Synergy and install on system, but failed ​to run with following error.+ 
 +==== 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. 
 +<code bash | fedora>​ 
 +sudo dnf install synergy 
 +</​code>​ 
 + 
 +=== Mac ===
 <code bash> <code bash>
-export ​PATH=$PATH:/​usr/​local/​Cellar/​qt5/5.9.0_1/bin +  git clone https://​github.com/​symless/​synergy-core.git 
-./hm.sh conf -g2 --mac-sdk 10.12 --mac-identity ElCapitan +  git checkout v2.0.0-stable 
-./hm.sh build +  brew update 
-./hm.sh dist mac+  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
 </​code>​ </​code>​
-**Error**+ 
 +Once building binary is done, Copy files to **~/bin/** so it can be used used within path.\\ 
 + 
 + 
 +====Post Build==== 
 +=== Server === 
 +<code bash> 
 +  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 
 +</​code>​ 
 + 
 +=== Client === 
 +Copy server key hash to following file.
 <code text> <code text>
-You have OS X 10.11.6. The application requires OS X 10.12 or later.+~/​Library/​Synergy/​SSL/​Fingerprints/​TrustedServers.txt
 </​code>​ </​code>​
  
-Next step for me is to explicitly build app for 10.11 using 10.12 SDK.\\ +==== Starting server / client ==== 
-As quick fix here is what i changed.+In my case server is on linux and client ​is on mac.
  
-<​code ​diff|ext/toolchain/​commands1.py+=== Server === 
-diff --git a/​ext/​toolchain/​commands1.py b/​ext/​toolchain/​commands1.py +== Configuration == 
-index f32ec483..7f41f489 100644 +<​code ​bash ~/.synergy.conf
---- a/​ext/​toolchain/​commands1.py +# sample synergy configuration file 
-+++ b/​ext/​toolchain/​commands1.py +
-@@ -449,10 +449,10 @@ class InternalCommands:​ +# comments begin with the # character and continue to the end of 
-                        if generator.cmakeName.find('​Unix Makefiles'​) == -1: +# line ​comments may appear anywhere the syntax permits
-                                sdkDir = self.getMacSdkDir() +# +-------+  +--------+ +---------
-                                cmake_args += " ​-DCMAKE_OSX_SYSROOT="​ + sdkDir +# |Laptop |  |Desktop1| |iMac     | 
-                              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: +
-</​code>​+
  
-After above changes i was able to build and run synergy, there you go package build on 10.12 SDK for OS 10.11. 
  
 +section: screens
 + # three hosts named: ​ Laptop, Desktop1, and iMac
 + # These are the nice names of the hosts to make it easy to write the config file
 + # The aliases section below contain the "​actual"​ names of the hosts (their hostnames)
 + desk:
 + mac:
 +end
  
-=== Autossh ===+section: links 
 + # iMac is to the right of Desktop1 
 + # Laptop is to the left of Desktop1 
 + desk: 
 +   right = mac 
 + 
 + # Desktop1 is to the right of Laptop 
 + mac: 
 +   left = desk 
 + 
 +end 
 + 
 +section: aliases 
 + # The "​real"​ name of iMac is John-Smiths-iMac-3.local. If we wanted we could remove this alias and instead use John-Smiths-iMac-3.local everywhere iMac is above. Hopefully it should be easy to see why using an alias is nicer 
 + desk: 
 +   desk 
 + 
 + mac: 
 +   mac 
 +end 
 +</​code>​ 
 +Now server can be using following command. 
 +<code bash | start server>​ 
 +/​usr/​bin/​synergy-core --server --name desk -c /​tmp/​Synergy.TJ6658 --address :24800 -c ~/​.synergy.conf --enable-drag-drop --enable-crypto --daemon 
 +</​code>​ 
 + 
 +=== Client === 
 +:?: One can also create the alias in bash profile 
 +<code bash | start client>​ 
 +~/​bin/​synergy-core --client --enable-crypto -n mac desk 
 +</​code>​ 
 +==== Autossh ​( If do not want to use built-in crytpo library ) ====
  
 Opensource version of synergy does not support encryption any more.\\ Opensource version of synergy does not support encryption any more.\\
Line 59: Line 111:
 Best bet is to use autossh, so if you are roaming between location it will auto connect when you are on same network.\\ Best bet is to use autossh, so if you are roaming between location it will auto connect when you are on same network.\\
  
-**Installation**+**Installation**\\
 <code bash> <code bash>
 brew install autossh brew install autossh
 </​code>​ </​code>​
  
-**Setup Tunnel**+**Setup Tunnel**\\
 <code bash> <code bash>
 autossh -f -v -M 24800 -N -R 24800:​localhost:​22 user@hostname autossh -f -v -M 24800 -N -R 24800:​localhost:​22 user@hostname
 </​code>​ </​code>​
  
-**Client**+**Client**\\
 Set ServerIP = '​localhost'​ Set ServerIP = '​localhost'​
  
 That should do it. That should do it.
synergy.1498238050.txt.gz · Last modified: 2020/08/10 02:29 (external edit)