? Editing: Post:21.body Save Delete Cancel
Content changed Sign & Publish new content

The Alarus Project

Various Programming Projects

Follow in NewsfeedFollowing

Latest comments:

Add new post

Title

21 hours ago · 2 min read ·
3 comments
Body
Read more

Not found

Running Synergy on Raspberry Pi

on Mar 16, 2017

Synergy is a free and open source software that allows multiple computers to share a mouse and keyboard. One of the computers that the keyboard and mouse is connected to becomes a Synergy server. The other computers becomes Synergy clients. All of this is done over the network. So if your Raspberry Pi is connected to the network somehow (via Ethernet or WiFi), you can setup your Raspberry Pi as a Synergy client so you can remotely control your Raspberry Pi from another computer. - Frank Zhao, adafruit.com

I used the tutorial[1] there on adafruit.com by Mr. Zhao as a base, but with several changes to Synergy since then, it took quite a bit more to get it installed and running. This github wiki from symless[2] also helped.

Setup Synergy Server

Setup the Synergy Server on the machine the keyboard and mouse are connected to. Add the Raspberry Pi to the configuration and name the display (remember this name for later)!

synergy-server.png (24x24)

Compile Synergy

Find the “Source” tar.gz URL from the Symless website[3] – it will be something like synergy-1.8.16-Source.tar.gz with the latest version number in the middle.

SSH into the Raspberry Pi and run the following commands:

Use wget to download latest version:

cd /home/pi/downloads
sudo wget syngery-version-Source.tar.gz

Extract the tarball:

sudo tar -xzf synergy-version-Source.tar.gz

Run some updates...

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install build-essential cmake libavahi-compat-libdnssd-dev libcurl4-openssl-dev libssl-dev lintian python qt4-dev-tools xorg-dev

Navigate to the source directory

cd synergy-version-Source

Open CMakeLists.txt in nano

sudo nano CMakeLists.txt

Look for this line:

set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/local/include")

Replace it with:

set(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH}:/usr/include")

Close nano (hotkey CTRL-X, save your changes).

Setup the configuration and compile Synergy:

./hm.sh conf -g1
./hm.sh build

This will take a looooooooooooooooooong time, take a break!

Copy built executables so we can use them!

sudo cp -a ./bin/. /usr/bin

Setup Synergy Cilent to Autostart

Create an autostart file for LXDE, or add to it if the file already exists:

sudo mkdir -p ~/.config/lxsession/LXDE
sudo touch ~/.config/lxsession/LXDE/autostart
sudo nano ~/.config/lxsession/LXDE/autostart

Add the following to the bottom of the file:

~/.startsynergy.sh

Close nano (hotkey CTRL-X, save your changes).

Create the .startsynergy.sh script:

sudo nano ~/.startsynergy.sh

.startsynergy.sh script contents:

#!/bin/bash

killall synergyc
sleep 1
synergyc --name pi 192.168.0.16
exit 0

Change the –name of “pi” to whatever you named the Raspberry Pi’s display on the Synergy Server setup step at the very beginning. Change the IP address to match that of your Synergy Server machine’s IP address.

Close nano (hotkey CTRL-X, save your changes).

Set file permissions and reboot:

sudo chmod 777 ~/.startsynergy.sh
sudo reboot

[1] https://learn.adafruit.com/synergy-on-raspberry-pi
[2] https://github.com/symless/synergy/wiki/Compiling
[3] http://symless.com/download/

0 Comment:

user_name1 day ago
Reply
Body
This page is a snapshot of ZeroNet. Start your own ZeroNet for complete experience. Learn More