Synergy works by designating one computer as a server, the one with the mouse and keyboard attached, and one as a client. When you move the mouse off the edge of the screen on the “server” computer, it will then appear on the “client” computer. In this example, we will configure a Windows PC to be the Synergy server and add a Raspberry Pi as a Synergy client.
Setting up
On your Windows PC, download Synergy for Windows from the project’s download page.
Run the downloaded .msi and follow the installation wizard. Once installed, you need to run the Synergy application. The first time you run it, you will need to answer a few questions including which language you would like to use.
When asked if you would like to run a server or a client, check “Server (new setup)”.
After you click “Next”, the Synergy server main window will appear.
Click “Configure Server…” to configure the layout of your Synergy setup. The configuration screen allows you to define where the mouse will leave the Windows PC and become active on the Raspberry Pi.
Drag the monitor icon from the top right into the square next to the monitor in the middle of the grid.
Now double-click on the “Unnamed” monitor and enter “raspberrypi” in the “Screen name:” field. If you have changed the hostname of your Pi to be something other than “raspberrypi” then enter the current name. You can discover your Pi’s hostname using the hostname
command. Now click on “OK”.
Click on “OK” to close the “Server Configuration” window and then click “Start” to run the Synergy server. The Windows part of the configuration is now complete. But before you move over to the Pi, you need to note the IP address that the Synergy server is using. Just below the tick box “Server (share this computer’s mouse and keyboard)” is a list of one or more IP addresses next to the “IP addresses” label. The first one should be in bold (as it is the primary address). Note it as you will need it when you configure the Raspberry Pi.
Over on your Raspberry Pi, open a terminal window and install Synergy with the command:
sudo apt-get install synergy |
As on the Windows platform, Synergy can run as a client or as a server. Since we have configured a server on Windows already, your Raspberry Pi needs to be the client. To start the client, type the following command in a terminal window:
synergyc 192.168.1.169 |
Where “192.168.1.169” is the IP address that you noted from the Synergy server on your Windows PC.
Now back on your PC, try moving your mouse off the edge of the screen towards your Raspberry Pi. The mouse should disappear off the screen on your Windows PC and should appear on the screen of your Raspberry Pi.
You can now control the Pi completely using the mouse and keyboard attached to your Windows PC! If you look at the “Log” output on the Synergy server, you will notice some informational messages which can help you troubleshoot your configuration.
When the Pi connects, you should see the message “client raspberrypi has connected” and when you move the mouse off the edge of the screen, you will see messages like “switch from PC to raspberrypi” and so on.
If you have any problems with the example setup described above, then please feel free to use the comments section below with your questions and we will see if we can help.
The post Share Your Mouse and Keyboard Between Windows and a Raspberry Pi Using Synergy appeared first on Make Tech Easier.