Borrow a mouse and keyboard from another PC, usingonly your Raspberry Pi and Synergy
Install Synergy Synergy is available from the Raspbian repositories. We can install it by using the following:
$ sudo apt-get update$ sudo apt-get install synergyThis will go through the basic installation process as normal and Synergy will be put in the Accessories folder.
What you’ll need
- Latest Raspbian Image
- Synergy
- Host computer
Server naming Once the process has finished, go to Configure Server. Your host computer will be put virtually in the centre of your array of displays and you can drag and drop it around, along with
any connected screens. Double-click on the server to change its name, making it easier to remember and find. Add a new screen and call it pi.
any connected screens. Double-click on the server to change its name, making it easier to remember and find. Add a new screen and call it pi.any connected screens. Double-click on the server to change its name, making it easier to remember and find. Add a new screen and call it pi.
Starting and connecting Once you’re happy with the setup, click Start to be able to accept client connections. To connect from a Raspberry Pi, enter the following:$ synergyc --name pi [IP Address of host] It will be recognized as ‘pi’ on the host system.
Autostart Synergy To make sure it starts every time you turn on the Pi, we need to create an LXDE auto-start file by using the following:$ sudo mkdir -p ~/.config/lxsession/LXDE
$ sudo touch ~/.config/lxsession/LXDE/autostart
$ sudo nano ~/.config/lxsession/LXDE/autostart
And then add the following to autostart: ~/.startsynergy.sh
Start fi Open and populate the startsynergy fi le le with:$ sudo nano ~/.startsynergy.sh#!/bin/bash killall synergycsleep 1synergyc --name pi [IP address of host]exit 0
Permissions Finally, to finish it off you’ll need to run: sudo chmod 777 ~/.start synergy.shThis will auto-start, and hopefully auto-connect, Synergy whenever you turn it on. The Raspbian client is a little old, so if you get a problem you may need to compile the latest version from source.
Pi server Setting up the Raspberry Pi as a server is a little more involved and uses the synergys command. It allows you to listen for clients on specific addresses. You then need to create a separate configuration file to arrange the displays – however, you can load one from a different computer and edit it.
Start up Synergy on the host computer and choose the ‘Server’ option for the moment. We’ll cover how to use it as a client later, and how to use the Raspberry Pi as a server for the mouse and keyboard.
No comments:
Post a Comment