Share a single mouse and keyboard between different machines and OS's

byo71's picture
Communications | Debian Support

Did you know you can share one mouse and keyboard over many different locally networked machines running different OS's.

This is achieved using a program called Synergy.

For Windows:
Windows .exe version download site.

For Debian:
# apt-get install synergy

This is a basic example that will show you how to set up Synergy with your windows box as the host or server and a Debian box running KDE as a client.

1. Install it on all systems to be linked.
2. Decide which mouse and kyb you want to use (this will be your host or server machine)
3. set up the server.

In windows:
a. run the Synergy program in the start menu.
b. choose the "server" radio button.
c. click advanced in the options section
d. type in the name of the machine you are on and click "ok"
e. click "add"
f. type in the name of the machine you are on and click "ok"
g. do steps e-f for each client machine you are adding.
h. click each screen and tell the program in the layout section which screen is to what direction.
i. click "start"
j. now there should be an icon in your systray. when you click it, it should say "Synergy: Waiting for clients" and have a box with the host's name in it.

4. Set up the client

In Debian KDE:
a. open a console window to your home folder (you should be a user not root in KDE)
b. $ nano synergy.conf
c. "Jim-Desktop" is the name of my windows box and "digimortal" is the name of my Debian box.
Put the following in the file you are now editing with info for your systems and save:

section: screens
Jim-Desktop:
digimortal:
end
section: links
Jim-Desktop:
right = digimortal
digimortal:
left = Jim-Desktop
end
section: aliases
Jim-Desktop:
192.168.0.103
digimortal:
192.168.0.111

d. $ synergyc -f ip.of.host.machine
e. you should get a message saying that you are "connected to server" and when you click on the systray icon on the windows box, it should say "Synergy: Connected" and have both systems in the box.
f. you can close the console window you have open in KDE

Now you only need one mouse and kyb for two systems.

Have fun...another cool feature of Synergy is the ability to cut and paste from machine to machine. Its pretty cool. Screen savers will also be synchronized.

Note: if you do a "F-whatever" to go to a different session, you also have to do "F-7" to get back to the X-session or "F-whatever" to get to other other tty sessions from the remote kyb.

how do you do the reverse?

How do you make the debian box the server and the windows box the client?