This is my setup for the open source core component of Synergy, a keyboard and mouse sharing tool.
Clone the repo and submodules into ~/code/
cd ~/code/
git clone --recursive https://github.com/lu0/synergy-coreAdd synergy to path
cd ~/code/synergy-core
sudo ln -srf build/bin/synergy* /usr/bin/Run Synergy GUI on both laptops, so you can see Client's and Server's name.
synergyModify ~/code/synergy-core/synergy.conf to your needs. Then link it to your Home folder.
ln -srf synergy.conf ~/.synergy.confRun synergy as Server on your primary PC (the one with the keyboard you're going to use).
synergy-core --server -f -a <address> -c ~/.synergy.confRun synergy as a Client on the other PC.
synergy-core --client -f <server-address>Run Synergy as client at startup (if using SDDM)
sudo sh -c 'echo "" >> /usr/share/sddm/scripts/Xsetup'
sudo sh -c 'echo "/usr/bin/synergy-core --client <serverIP>" >> /usr/share/sddm/scripts/Xsetup' Paste this in /usr/share/sddm/scripts/Xsetup of your 2nd computer, this will force SDDM to be displayed on the external monitor. Use this if you always keep the lid of your 2nd computer closed, just like I do.
xrandr --output eDP-1 --offOr paste this if you want SDDM on both screens but the HDMI one has the wrong resolution (my 2nd computer is HD, but my monitor is FHD).
xrandr --output HDMI-1 --mode 1920x1080Modify schedule-on-off.sh to your needs.
sudo ln -srf schedule-on-off.sh /usr/bin/Paste this in /usr/share/sddm/scripts/Xsetup
/usr/bin/schedule-on-off.shPrevent the computer from sleeping automatically when SDDM is active.
sudo sh -c "echo 'HandleLidSwitch=ignore' >> /etc/systemd/logind.conf"Rebuild Synergy if you need to or if the Synergy submodule has new commits. The binaries are symlinked, you don't need to repeat the previous step.
rm -rf build-previous/
mv build/ build-previous/
mkdir build && cd build/
cmake ../source-code-git/
makeIf the build is unsuccessful, you may need the following libraries:
sudo apt install -y \
qtcreator \
qtbase5-dev \
qttools5-dev-tools \
qttools5-dev \
cmake \
make \
g++ \
xorg-dev \
libssl-dev \
libx11-dev \
libsodium-dev \
libgl1-mesa-glx \
libegl1-mesa \
libcurl4-openssl-dev \
libavahi-compat-libdnssd-dev \
qtdeclarative5-dev \
libqt5svg5-dev \
libsystemd-dev \
libnotify-dev \
libgdk-pixbuf2.0-dev \
libglib2.0-devI'm not the maintainer of Synergy, nor am I affiliated with Symless in any way. Bugs or issues related to Synergy should be reported directly on the official issues page.