These commands come AS IS, WITH NO WARRANTY. I AM NOT RESPONSIBLE IF YOU BORK YOUR SYSTEM
Synergy on Linux - It's great when it works, but it's also a pain because most guides are intended for Ubuntu 18, which is absolutely useless now. Here is how I was able to setup Synergy at login on a Pop_OS 22.04, but should ALSO work for ANY distribution using GDM3 as it's login manager (i.e Fedora and/or Ubuntu).
Install synergy. Make sure that synergyc is installed first (included in deb or rpm)
Connect to your host system while logged in. This will populate the known host fingerprints in $HOME/.synergy/SSL -
which we 100% need to make sure that a headless Synergy instance can also use the same fingerprints later.
If you can't connect from the desktop, good luck connecting from GDM
Add the login service for GDM. Replace [your-synergy-client-id] and [your-synergy-host-ip-or-hostname] respectively with
the values already used by your client Synergy
sudo vim /usr/share/gdm/greeter/autostart/synergy.desktop[Desktop Entry]
Type=Application
Version=1.0
Name=Synergy
Comment=-
Exec=/usr/bin/synergyc --name [your-synergy-client-id] --enable-crypto [your-synergy-host-ip-or-hostname]
Icon=synergy
Terminal=false
Categories=-;
Keywords=-;
Copy your Synergy SSL to the virtual GDM directory using root. The GDM3 process is virtualised using a fake root user, which has
it's $HOME located at /var/lib/gdm3
cd $HOME
sudo -s
cp -r ./.synergy/ /var/lib/gdm3/.synergy/
exitMake sure that the GDM synergy process terminates once a valid user logs in via the GDM greeter
sudo vim /etc/gdm3/PostLogin/Default#!/bin/sh
# purge all synergyc processes
/usr/bin/killall synergyc
# then wait until it's been successfully purged
while \[ $(pgrep -x synergyc) \]; do sleep 0.1; done
Setup Synergy to autostart. You can do this with your desktop manager, but most allow you to do it as follows:
vim ~/.config/autostart/synergy.desktop[Desktop Entry]
Type=Application
Version=1.0
Name=Synergy
Comment=-
Exec=/usr/bin/synergyc --name [your-synergy-client-id] --enable-crypto [your-synergy-host-ip-or-hostname]
Icon=synergy
Terminal=false
Categories=-;
Keywords=-;
Reboot