Sharing Keyboard and Mouse without KVM Switch using “Synergy” on Linux March 2, 2011Posted by Tournas Dimitrios in Linux.
Synergy is an open source platform independent application which allows you to control two system (ie Windows – Linux ) using the same Keyboard and Mouse without using a KVM Switch and help the organization save few dollars 🙂 . Even copy/paste can be implemented between the two systems .
Latest release of Synergy supports almost all Windows Platforms and Unix platforms with X Windows Version 11 revision 4 or up. Synergy uses the network to share keyboard and mouse hence, all the systems must support TCP/IP Networking .
Synergy is open source and released under the GNU Public License (GPL).
Let’s pretent the following scenario : We have on our desktop two TFT monitors (left is our favorite Linux – right is Windows XP ) . Now we would like to navigate between the two monitors with one single mouse .
Setting up Synergy on Linux (CentOs 5.x) :
- Let yum install the package (from rpmforge repository)
yum install synergy
- Identify one system as server system and other would be the client. I always prefer using a unix machine as server.
- On the linux system, create /etc/synergy.conf file with the following information.
- Execute the following command to start Synergy as Server on Linux Machine. You should see a message in /var/log/messages files that the synergy server is started.
- To make sure synergy starts at system boot time, add “synergys ” to /etc/rc.local file.
There are three sections in the configuration file.
Screens: This section defines the hosts or systems on which you want to share keyboard and mouse. The dns must be configured or else an entry has to be made in the hosts file before using the host names in /etc/synergy.conf file.
Aliases: Normaly we had to configure the “hosts” file so that DNS could be resolved . Alternatively we can include the “aliases” section to configure the IP address of each computer .
Links: This section defines which host is on which side i.e. in the above example windows host machine is @ the right side of Linux machine, so if you move the mouse pointer to the right side on Linux machine, the pointer should go to Windows Machine and vice versa.
Installing synergy application on the windows system:
- Download the .exe program from SourceForge.
- Install the .exe file (I hope you know how to do that 🙂 )
- Run synergy
- Select “Use another computer’s shared keyboard and mouse (client) and type the linux system’s hostname or IP address in “Other Computer’s Host Name” text box (if you prefer to use the hostname , configure the windows “hosts” file ) .
- Click the “Advanced” tab and define the screen-name as configured in /etc/synergy.conf
- Click the “test” tab
- Click the “Start” tab to start the session .
If you want to dig into Synergy more, here are some helpful links: