Wednesday, March 25, 2020

using synergy to share your keyboard and mouse with another computer

What's Synergy?

An awesome program that allows you to share your mouse/keyboard over the network with another computer.
You basically need to have the "server" installed on the computer your keyboard/mouse are connected to, and a "client" to the other one.


I use this at the office, where I'm sadly forced to use ms windows, and connect it to my GNU/Linux box.
I also use it at home when I bring my office laptop sometimes, and just do all the input with my home keyboard/mouse, as I'm a happyhacking keyboard fan.

How to install

On Windows: google for "windows synergyc 1.8.8", for the windows one, and install that
On GNU/Linux Debian-family: sudo apt-get install synergy

in Debian 10

As of debian 10, synergy is an outdated package apparently. I guess it wasn't very popular...

But you can install it from the stretch's repo directly, like this:


sudo apt-get install libcrypto++6 libqt4-network libqtcore4 libqtgui4
wget http://ftp.jp.debian.org/debian/pool/main/s/synergy/synergy_1.4.16-2_amd64.deb #just find this deb file in whatever mirror you prefer
sudo dpkg -i synergy_1.4.16-2_amd64.deb 


How to setup

in ms windows (client)

Just make a "shortcut" with something like "C:\Synergy\synergyc.exe XX.XX.XX.XX"  (your server's IP)

in GNU/Linux

create a file /etc/synergy.conf with these contents:


section: screens
random_name_for_your_server_box:
random_name_for_your_client_box:
end
 
section: links
random_name_for_your_client_box:
        left = random_name_for_your_server_box
random_name_for_your_server_box:
        right  = random_name_for_your_client_box
end


You'll also need to put your "random_name_for_your_server_box" name in /etc/hosts.

How to use

1. in windows: double click the "shortcut" thing
2. in GNU/Linux, open a terminal, and type "synergys"

The client terminal should show some debug messages, like "server connected!" and stuff like that.
Just move your mouse pointer and see it go from your server screen to your client's.

I'm surprised really so few people know about this and end up buying more keyboards, or worst, using a bluetooth one just to be able to switch the input (facepalm). sshing is also super useful and all, but sometimes you use a crappy OS like ms windows in which that's just not possible, or just want to use it on its same screen.

You can also use this in a better environment, GNU/Linux with GNU/Linux.
Don't get me started about macs.

No comments:

Post a Comment