Difference between revisions of "Synergy"

From ArchWiki
Jump to: navigation, search
(Arch Linux)
m (Add missing instructions to setup encrypted connections with synergyc and synergy GUI on client side.)
 
(39 intermediate revisions by 23 users not shown)
Line 1: Line 1:
 
[[Category:Input devices]]
 
[[Category:Input devices]]
 +
[[fr:Synergy]]
 
[[it:Synergy]]
 
[[it:Synergy]]
[http://synergy-foss.org/ Synergy] lets you easily share a single mouse and keyboard between multiple computers (even with different operating systems) without the need for special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s).
+
[[ja:Synergy]]
 +
[http://synergy-project.org/ Synergy] lets you easily share a single mouse and keyboard between multiple computers (even with different operating systems) without the need for special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s).
  
 
Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all.  
 
Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all.  
Line 8: Line 10:
  
 
===Arch Linux===
 
===Arch Linux===
You can [[pacman|install]] the {{pkg|synergy}} package from the [[Official Repositories|official repositories]].
+
You can [[install]] the {{pkg|synergy}} package.
  
===Windows and Mac OS X===
+
===Windows and OS X===
Download and run [http://synergy-foss.org/download the newest installer] from the official website.
+
[http://synergy-project.org/download/ Download] and run the newest installer from the official website.
 
+
{{Tip|You can also try the BETA versions of Synergy.}}
+
 
+
*Read [http://synergy-foss.org/pm/projects/synergy/wiki/Compiling the official compiling help].
+
  
 
==Pre-configuration==
 
==Pre-configuration==
First determine the IP addresses and [[Configuring_Network#Set_the_host_name|host names]] for each machine and make sure each has a correct hosts file.
+
First determine the IP addresses and [[Network_configuration#Set_the_hostname|host names]] for each machine and make sure each has a correct hosts file.
  
 
* Arch Linux - {{ic|/etc/hosts}}
 
* Arch Linux - {{ic|/etc/hosts}}
 
* Windows - {{ic|C:\WINDOWS\system32\drivers\etc\hosts}}
 
* Windows - {{ic|C:\WINDOWS\system32\drivers\etc\hosts}}
* Mac OS X - [http://support.apple.com/kb/TA27291?viewlocale=en_US How to Add Hosts to Local Hosts File].
+
* OS X - [http://support.apple.com/kb/TA27291 How to Add Hosts to Local Hosts File].
 
   
 
   
 
{{hc|/etc/hosts|
 
{{hc|/etc/hosts|
Line 30: Line 28:
  
 
{{Note|Check that the clients can reach the server.}}
 
{{Note|Check that the clients can reach the server.}}
 +
 +
===Arch Linux===
 +
====Enable Encryption====
 +
Synergy version 1.7 replaced their own transport encryption with SSL.
 +
 +
To install the SSL plugin, copy or symlink it to the plugins directory, which is {{ic|~/.synergy/plugins}} by default.
 +
$ mkdir -p ~/.synergy/plugins
 +
$ ln -s /usr/lib/synergy/libns.so ~/.synergy/plugins/libns.so
  
 
==Server configuration==
 
==Server configuration==
 
In synergy, the computer with keyboard and mouse you want to share is called server.
 
In synergy, the computer with keyboard and mouse you want to share is called server.
See [http://synergy2.sourceforge.net/configuration.html Synergy Configuration File Format] for a detailed description of all available sections and options.
+
See [http://synergy-project.org/wiki/Text_Config Synergy Configuration File Format] for a detailed description of all available sections and options.
  
 
===Arch Linux===
 
===Arch Linux===
 
 
The configuration file for Arch Linux is {{ic|/etc/synergy.conf}}. If it does not exist, create it using {{ic|/etc/synergy.conf.example}}, whose comments should give you enough information for a basic configuration; if you need further reference, read the guide mentioned above.
 
The configuration file for Arch Linux is {{ic|/etc/synergy.conf}}. If it does not exist, create it using {{ic|/etc/synergy.conf.example}}, whose comments should give you enough information for a basic configuration; if you need further reference, read the guide mentioned above.
{{Tip|1=You may also use either {{Pkg|qsynergy}} from the [[official repositories]] or {{AUR|quicksynergy}} from the [[AUR]]  which provide a GUI to simplify the configuration process.}}
+
{{Tip|1=You may also use {{AUR|quicksynergy}} from the [[AUR]]  which provide a GUI to simplify the configuration process.}}
{{Tip|1=Need to open tcp port 24800}}
+
{{Tip|1=Make sure the server port is not blocked. By default, synergy uses port 24800.}}
 
+
To start the server daemon, run:
+
# systemctl start synergys
+
  
 
If you experience problems and you wish to run the server in the foreground, you can run the following command instead:
 
If you experience problems and you wish to run the server in the foreground, you can run the following command instead:
 
  # synergys -f
 
  # synergys -f
  
If you want to run the synergy server daemon every time Arch Linux boots up,  
+
The synergy server process needs to attach to your user's X session, which means it needs to run as your user. [[Enable]] {{ic|synergys@mary}} as the appropriate user (replacing 'mary' with your username).
  # systemctl enable synergys
+
{{Tip|1=You can enable {{ic|synergys@mary.socket}} to start the server when a client tries to connect instead. This is useful when the service can't connect to an X server on boot.}}
 +
 
 +
====Use Encryption====
 +
 
 +
To generate a certificate and fingerprint for the server to use.
 +
$ mkdir -p ~/.synergy/SSL/Fingerprints
 +
$ openssl req -x509 -nodes -days 365 -subj /CN=Synergy -newkey rsa:1024 -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
 +
 
 +
To activate the SSL plugin, add the {{ic|--enable-crypto}} option.
 +
 
 +
* Starting from the command line:
 +
  # synergys --enable-crypto
 +
 
 +
* Starting with systemd:
 +
{{hc| /usr/lib/systemd/system/synergys@.service|2=
 +
[Unit]
 +
Description=Synergy Server Daemon
 +
After=network.target
 +
 
 +
[Service]
 +
User=%i
 +
ExecStart=/usr/bin/synergys --no-daemon --config /etc/synergy.conf --enable-crypto
 +
Restart=on-failure
 +
 
 +
[Install]
 +
WantedBy=multi-user.target}}
 +
 
 +
To start the service for your user:
 +
# systemctl start synergys@mary
  
 
===Windows===
 
===Windows===
Line 65: Line 97:
 
If you want to start the server from the command-line, here is a Windows command you can place in a {{ic|.bat}} file or just run from {{ic|cmd.exe}}:
 
If you want to start the server from the command-line, here is a Windows command you can place in a {{ic|.bat}} file or just run from {{ic|cmd.exe}}:
  
{{bc|C:\Program Files\Synergy+\bin\synergys.exe  -f --debug ERROR --name left --log c:\windows\synergy.log -c C:/windows/synergy.sgc --address 10.66.66.2:24800}}
+
C:\Program Files\Synergy+\bin\synergys.exe  -f --debug ERROR --name left --log c:\windows\synergy.log -c C:/windows/synergy.sgc --address 10.66.66.2:24800
  
===Mac OS X===
+
===OS X===
  
Mac OS X has a similar configuration as Unix: check [http://synergy-foss.org/docs the official documentation] for more information.
+
OS X has a similar configuration as Unix: check [http://synergy-project.org/wiki/Developer the official documentation] for more information.
  
 
===Configuration examples===
 
===Configuration examples===
Line 178: Line 210:
  
 
{{Note|This assumes a server has been set up and configured '''properly'''.  Make sure the server is already configured to accept the client(s) before continuing.}}
 
{{Note|This assumes a server has been set up and configured '''properly'''.  Make sure the server is already configured to accept the client(s) before continuing.}}
 +
{{Tip|You don't need to setup a client on the host server as the server includes one.}}
  
 
===Arch Linux===
 
===Arch Linux===
Line 187: Line 220:
  
 
Here, {{ic|server-host-name}} is the host name of the server.
 
Here, {{ic|server-host-name}} is the host name of the server.
 +
 +
====Use Encryption====
 +
 +
 +
If you use the synergy command line client, copy the file containing the fingerprint [[synergy|{{ic|~/.synergy/SSL/Fingerprints/Local.txt}}]] from the server into the clients home directory [[synergy|{{ic|~/.synergy/SSL/Fingerprints/TrustedServers.txt}}]]. To start the synergy command line client with encryption, type:
 +
$ synergyc --enable-crypto
 +
 +
{{Note| There is an open issue with the GUI client of synergy (see https://github.com/symless/synergy/issues/4737). The dialog to prompt for confirmation of the server's fingerprint, only pops up if the logging level is set to INFO, DEBUG or DEBUG2.}}
  
 
====Autostart====
 
====Autostart====
Line 210: Line 251:
 
}}
 
}}
  
* Otherwise, if you are using a [[Display Manager|display manager]] (kdm, gdm, [[SLiM]], ...), or a stand-alone [[Window Manager|window manager]] (Openbox, ...), you could exploit its start-up script and add the following:
+
* Otherwise, if you are using a [[display manager]] (kdm, gdm, [[SLiM]], ...), or a stand-alone [[window manager]] (Openbox, ...), you could exploit its start-up script and add the following:
 
  synergyc server-host-name
 
  synergyc server-host-name
  
 
For example, using ''kdm'' you should edit {{ic|/usr/share/config/kdm/Xsetup}}.
 
For example, using ''kdm'' you should edit {{ic|/usr/share/config/kdm/Xsetup}}.
  
{{out of date|this section does not work for systemd}}
+
* To start the Synergy client with systemd, create a service file, '''/etc/systemd/system/synergyc@.service''' and optionally a config file, '''/etc/conf.d/synergyc.conf'''
* You can even start ''synergyc'' in the init chain by adding the following to {{ic|/etc/rc.local}}:
+
  
{{hc|/etc/rc.local|
+
{{hc| /etc/systemd/system/synergyc@.service|2=
...
+
[Unit]
 +
Description=Synergy Client Daemon
 +
After=network.target
  
echo "Starting Synergy client"
+
[Service]
#replace server-host-name with the real name
+
EnvironmentFile=/etc/conf.d/synergyc.conf
synergyc server-host-name
+
ExecStart=/usr/bin/synergyc --no-daemon --debug ${DEBUGLEVEL:-INFO} ${SERVERALIAS}
}}
+
User=%i
  
* A similar result can be obtained by creating a daemon and adding it to the daemons array in {{ic|/etc/rc.conf}}; just create a file {{ic|/etc/rc.d/synergyc}} with the following content, making sure to set its permissions to {{ic|chmod 755}}:
+
[Install]
 +
WantedBy=multi-user.target}}
  
{{hc|/etc/rc.d/synergyc|2=
+
{{hc|/etc/conf.d/synergyc.conf|2=
#!/bin/bash
+
DEBUGLEVEL=WARNING
. /etc/rc.conf
+
SERVERALIAS=server-name}}
. /etc/rc.d/functions
+
  
#Put the server host name in the following line
+
To start the service for your user,
SERVERALIAS="server-host-name"
+
  
PID=`pidof -o %PPID /usr/bin/synergyc`
+
  # systemctl start synergyc@mary
case "$1" in
+
  start)
+
  stat_busy "Starting Synergy Client"
+
  [ -z "$PID" ] && /usr/bin/synergyc "$SERVERALIAS"
+
  if [ $? -gt 0 ]; then
+
    stat_fail
+
  else
+
    /usr/bin/xset r on
+
    add_daemon synergyc
+
    stat_done
+
  fi
+
  ;;
+
stop)
+
  stat_busy "Stopping Synergy Client"
+
  [ ! -z "$PID" ] && kill -9 $PID
+
  if [ $? -gt 0 ]; then
+
    stat_fail
+
  else
+
    rm_daemon synergyc
+
    stat_done
+
  fi
+
  ;;
+
restart)
+
  $0 stop
+
  sleep 1
+
  $0 start
+
  ;;
+
*)
+
<nowiki>  echo "usage: $0 {start|stop|restart}"</nowiki>
+
esac
+
exit 0}}
+
  
Automatically starting Synergy is also documented in its [http://synergy2.sourceforge.net/autostart.html official reference page].
+
Automatically starting Synergy is also documented in its [https://github.com/symless/synergy/wiki/Startup official reference page].
  
 
===Windows===
 
===Windows===
Line 282: Line 292:
 
{{bc|<nowiki>START /MIN /D"C:\Program Files\Synergy+\bin" synergys.exe -d ERROR -n m6300 -c C:\synergy.sgc -a 10.66.66.2:24800</nowiki>}}
 
{{bc|<nowiki>START /MIN /D"C:\Program Files\Synergy+\bin" synergys.exe -d ERROR -n m6300 -c C:\synergy.sgc -a 10.66.66.2:24800</nowiki>}}
  
===Mac OS X===
+
===OS X===
  
 
Locate the synergyc program in the synergyc folder and drag it onto the terminal window: the full path will appear in the terminal.
 
Locate the synergyc program in the synergyc folder and drag it onto the terminal window: the full path will appear in the terminal.
Line 289: Line 299:
 
{{bc|/path/to/synergyc/synergyc server-host-name}}
 
{{bc|/path/to/synergyc/synergyc server-host-name}}
  
Then press {{Keypress|Enter}}.
+
Then press {{ic|Enter}}.
  
 
==Known Issues==
 
==Known Issues==
If Arch is being used as a client in a Synergy installation, the server may not be able to wake the client monitor. There are some workarounds, such as executing the following via [[Secure Shell|SSH]], if ACPI is enabled (see: [[Display_Power_Management_Signaling#Modifing_DPMS_and_screensaver_settings_using_xset|Modifying DPMS and ScreenSaver settings with xset]]):
+
If Arch is being used as a client in a Synergy installation, the server may not be able to wake the client monitor. There are some workarounds, such as executing the following via [[SSH]], if ACPI is enabled (see: [[Display Power Management Signaling#Modifying DPMS and screensaver settings using xset|Modifying DPMS and ScreenSaver settings with xset]]):
 
{{bc|# xset dpms force on}}
 
{{bc|# xset dpms force on}}
  
 
==Troubleshooting==
 
==Troubleshooting==
The official documentation has a [http://synergy-foss.org/pm/projects/synergy/wiki/UserFAQ FAQ] and also a [http://synergy2.sourceforge.net/trouble.html troubleshooting page].
+
The official documentation has a [http://synergy-project.org/wiki/Synergy_FAQ FAQ] and also a [https://github.com/symless/synergy/wiki/User-Guide#Troubleshooting troubleshooting page].
 +
 
 +
===Keyboard AltGr===
 +
If you encounter problems with AltGr add
 +
 
 +
altgr = alt
 +
 
 +
on the screen/client section in /etc/synergys.conf.
  
 
===Keyboard repeat===
 
===Keyboard repeat===
Line 308: Line 325:
 
  # setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')
 
  # setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')
  
===messages.log being spammed with by synergyc===
+
===No Cursor in Gnome3===
If you run ''synergyc'' as described above then your {{ic|/var/log/messages.log}} file will get spammed with messages like these:
+
When Gnome 3 doesn't detect a mouse, it will default to touchscreen mode and hide the cursor. To enable run:
 
+
  May 26 22:30:46 localhost Synergy 1.4.6: 2012-05-26T22:30:46 INFO: entering screen
+
          /build/src/synergy-1.4.6-Source/src/lib/synergy/CScreen.cpp,103
+
  May 26 22:30:47 localhost Synergy 1.4.6: 2012-05-26T22:30:47 INFO: leaving screen
+
          /build/src/synergy-1.4.6-Source/src/lib/synergy/CScreen.cpp,121
+
  
To prevent this run ''synergyc'' with the {{ic|-d WARNING}} option. This ''debug level'' option tells synergy to only log messages if they are level ''WARNING'' or above.
+
# dconf write /org/gnome/settings-daemon/plugins/cursor/active false
  
  synergyc -d WARNING server-host-name
+
This can be added to an init script or systemd unit:
  
You can also edit the line that calls ''synergyc'' if you use a {{ic|/etc/rc.d/synergyc}} file.
+
  ExecStartPost=dconf write /org/gnome/settings-daemon/plugins/cursor/active false
  
    [ -z "$PID" ] && /usr/bin/synergyc -d WARNING "$SERVERALIAS"
+
===Client is returning "failed to verify server certificate fingerprint"===
 +
You need to copy the content of server's "~/.synergy/SSL/Fingerprints/Local.txt" into client's "~/.synergy/SSL/Fingerprints/TrustedServers.txt".
  
 
==External Links==
 
==External Links==
* Synergy website: http://synergy-foss.org
+
* Synergy website: http://synergy-project.org
* Official documentation: http://synergy-foss.org/docs
+
* Official documentation: http://synergy-project.org/wiki/User_Guide
* Gentoo Wiki Synergy Setup: http://en.gentoo-wiki.com/wiki/Synergy
+

Latest revision as of 08:20, 21 July 2016

Synergy lets you easily share a single mouse and keyboard between multiple computers (even with different operating systems) without the need for special hardware. It is intended for users with multiple computers on their desk since each system uses its own monitor(s).

Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all.

Installation

Arch Linux

You can install the synergy package.

Windows and OS X

Download and run the newest installer from the official website.

Pre-configuration

First determine the IP addresses and host names for each machine and make sure each has a correct hosts file.

/etc/hosts
10.10.66.1        archserver.localdomain       archserver
10.10.66.100      archleft.localdomain         archleft
10.10.66.105      archright.localdomain        archright
Note: Check that the clients can reach the server.

Arch Linux

Enable Encryption

Synergy version 1.7 replaced their own transport encryption with SSL.

To install the SSL plugin, copy or symlink it to the plugins directory, which is ~/.synergy/plugins by default.

$ mkdir -p ~/.synergy/plugins
$ ln -s /usr/lib/synergy/libns.so ~/.synergy/plugins/libns.so

Server configuration

In synergy, the computer with keyboard and mouse you want to share is called server. See Synergy Configuration File Format for a detailed description of all available sections and options.

Arch Linux

The configuration file for Arch Linux is /etc/synergy.conf. If it does not exist, create it using /etc/synergy.conf.example, whose comments should give you enough information for a basic configuration; if you need further reference, read the guide mentioned above.

Tip: You may also use quicksynergyAUR from the AUR which provide a GUI to simplify the configuration process.
Tip: Make sure the server port is not blocked. By default, synergy uses port 24800.

If you experience problems and you wish to run the server in the foreground, you can run the following command instead:

# synergys -f

The synergy server process needs to attach to your user's X session, which means it needs to run as your user. Enable synergys@mary as the appropriate user (replacing 'mary' with your username).

Tip: You can enable synergys@mary.socket to start the server when a client tries to connect instead. This is useful when the service can't connect to an X server on boot.

Use Encryption

To generate a certificate and fingerprint for the server to use.

$ mkdir -p ~/.synergy/SSL/Fingerprints
$ openssl req -x509 -nodes -days 365 -subj /CN=Synergy -newkey rsa:1024 -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

To activate the SSL plugin, add the --enable-crypto option.

  • Starting from the command line:
# synergys --enable-crypto
  • Starting with systemd:
 /usr/lib/systemd/system/synergys@.service
[Unit]
Description=Synergy Server Daemon
After=network.target

[Service]
User=%i
ExecStart=/usr/bin/synergys --no-daemon --config /etc/synergy.conf --enable-crypto
Restart=on-failure

[Install]
WantedBy=multi-user.target

To start the service for your user:

# systemctl start synergys@mary

Windows

  1. Open the Synergy program
  2. Select the option Server (share this computer's mouse and keyboard)
  3. Select Configure interactively
  4. Click the Configure Server... button
  5. This opens a window in which you can add screens depending on how many computers/screens you have: just drag the screen icon in the top-right corner to the screens area, and double-click it to edit its settings
  6. Click OK to close the screens window when you are ready, then click on Start to start the server

On Windows, configuration is saved by default in a synergy.sgc file, but its name and location can of course be changed at pleasure.

If you want to start the Synergy server everytime Windows starts, you have to launch the program as administrator, then go to Edit -> Services and select Install in the Server section; note that at the following reboot Synergy will indeed automatically start, but the tray icon will not display automatically (at least for version 1.4.2 beta on Windows 7). To uninstall the service, do the same thing but obviously select Uninstall.

If you want to start the server from the command-line, here is a Windows command you can place in a .bat file or just run from cmd.exe:

C:\Program Files\Synergy+\bin\synergys.exe  -f --debug ERROR --name left --log c:\windows\synergy.log -c C:/windows/synergy.sgc --address 10.66.66.2:24800

OS X

OS X has a similar configuration as Unix: check the official documentation for more information.

Configuration examples

This is an example for a basic 3-computers setup:

/etc/synergy.conf
section: screens
	server-fire:
	archright-fire:
	archleft-fire:
end

section: links
	archleft-fire:
		right = server-fire
	server-fire:
		right = archright-fire
		left = archleft-fire
	archright-fire:
		left = server-fire
end

This should be the example bundled with the Arch Linux package:

/etc/synergy.conf
section: screens
        # three hosts named:  moe, larry, and curly
        moe:
        larry:
        curly:
end

section: links
        # larry is to the right of moe and curly is above moe
        moe:
                right = larry
                up    = curly

        # moe is to the left of larry and curly is above larry.
        # note that curly is above both moe and larry and moe
        # and larry have a symmetric connection (they're in
        # opposite directions of each other).
        larry:
                left  = moe
                up    = curly

        # larry is below curly.  if you move up from moe and then
        # down, you'll end up on larry.
        curly:
                down  = larry
end

section: aliases
        # curly is also known as shemp
        curly:
                shemp
end

The following is a more customized example:

synergy.sgc
section: screens
	leftpc:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		switchCorners = none +top-left +top-right +bottom-left +bottom-right 
		switchCornerSize = 0
	rightpc:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		switchCorners = none +top-left +top-right +bottom-left +bottom-right 
		switchCornerSize = 0
end

section: aliases
leftpc:
10.66.66.2
rightpc:
10.66.66.1
end

section: links
	leftpc:
		right = rightpc
	rightpc:
		left = leftpc
end

section: options
	heartbeat = 1000
	relativeMouseMoves = false
	screenSaverSync = false
	win32KeepForeground = false
	switchCorners = none +top-left +top-right +bottom-left +bottom-right 
	switchCornerSize = 4
end

Clients configuration

Note: This assumes a server has been set up and configured properly. Make sure the server is already configured to accept the client(s) before continuing.
Tip: You don't need to setup a client on the host server as the server includes one.

Arch Linux

In a console window, type:

$ synergyc server-host-name

Or, to run synergy in the foreground:

$ synergyc -f server-host-name

Here, server-host-name is the host name of the server.

Use Encryption

If you use the synergy command line client, copy the file containing the fingerprint ~/.synergy/SSL/Fingerprints/Local.txt from the server into the clients home directory ~/.synergy/SSL/Fingerprints/TrustedServers.txt. To start the synergy command line client with encryption, type:

$ synergyc --enable-crypto
Note: There is an open issue with the GUI client of synergy (see https://github.com/symless/synergy/issues/4737). The dialog to prompt for confirmation of the server's fingerprint, only pops up if the logging level is set to INFO, DEBUG or DEBUG2.

Autostart

There exist several ways to automatically start the Synergy client, and they are actually the same that can be used for every other application.

Note: In all of the following examples, you always have to substitute server-host-name with the real server host name.
~/.xinitrc
...

#replace server-host-name with the real name
synergyc server-host-name

The following is an alternative:

~/.xinitrc
XINIT_CMD='/usr/bin/synergyc -d FATAL -n galileo-fire 10.66.66.2:24800'
/usr/bin/pgrep -lxf "$XINIT_CMD" || ( ( $XINIT_CMD ) & )
  • Otherwise, if you are using a display manager (kdm, gdm, SLiM, ...), or a stand-alone window manager (Openbox, ...), you could exploit its start-up script and add the following:
synergyc server-host-name

For example, using kdm you should edit /usr/share/config/kdm/Xsetup.

  • To start the Synergy client with systemd, create a service file, /etc/systemd/system/synergyc@.service and optionally a config file, /etc/conf.d/synergyc.conf
 /etc/systemd/system/synergyc@.service
[Unit]
Description=Synergy Client Daemon
After=network.target

[Service]
EnvironmentFile=/etc/conf.d/synergyc.conf
ExecStart=/usr/bin/synergyc --no-daemon --debug ${DEBUGLEVEL:-INFO} ${SERVERALIAS}
User=%i

[Install]
WantedBy=multi-user.target
/etc/conf.d/synergyc.conf
DEBUGLEVEL=WARNING
SERVERALIAS=server-name

To start the service for your user,

# systemctl start synergyc@mary

Automatically starting Synergy is also documented in its official reference page.

Windows

After installation, open the Synergy program, select the option Client (use another computer's keyboard and mouse) and type the host name of the server computer in the text box, then click Start to start the client.

Note: You can use the tray icon to stop the client.

If you want to start the Synergy client every time Windows starts, you have to launch the program as an administrator, then go to Edit -> Services and select Install in the Client section.

If you want to start the client from the command-line, here is a Windows command you can place in a .bat file or just run from cmd.exe. This points to a configuration file in C:\synergy.sgc and runs in the background like a service.

START /MIN /D"C:\Program Files\Synergy+\bin" synergys.exe -d ERROR -n m6300 -c C:\synergy.sgc -a 10.66.66.2:24800

OS X

Locate the synergyc program in the synergyc folder and drag it onto the terminal window: the full path will appear in the terminal. Now append the host name of the server, so that the complete command will look like this:

/path/to/synergyc/synergyc server-host-name

Then press Enter.

Known Issues

If Arch is being used as a client in a Synergy installation, the server may not be able to wake the client monitor. There are some workarounds, such as executing the following via SSH, if ACPI is enabled (see: Modifying DPMS and ScreenSaver settings with xset):

# xset dpms force on

Troubleshooting

The official documentation has a FAQ and also a troubleshooting page.

Keyboard AltGr

If you encounter problems with AltGr add

altgr = alt

on the screen/client section in /etc/synergys.conf.

Keyboard repeat

If you experience problems with your keyboard repeat on the client machine (Linux host), simply type:

# /usr/bin/xset r on

in any console.

Keyboard mapping

If you experience problems with the keyboard mapping when using the server's keyboard in a client window (e.g a terminal) then re-setting the X key map after starting synergyc may help. The following command sets the keymap to its current value:

# setxkbmap $(setxkbmap -query | grep "^layout:" | awk -F ": *" '{print $2}')

No Cursor in Gnome3

When Gnome 3 doesn't detect a mouse, it will default to touchscreen mode and hide the cursor. To enable run:

# dconf write /org/gnome/settings-daemon/plugins/cursor/active false

This can be added to an init script or systemd unit:

 ExecStartPost=dconf write /org/gnome/settings-daemon/plugins/cursor/active false

Client is returning "failed to verify server certificate fingerprint"

You need to copy the content of server's "~/.synergy/SSL/Fingerprints/Local.txt" into client's "~/.synergy/SSL/Fingerprints/TrustedServers.txt".

External Links