The cool thing is called synergy.
The windows version has a great GUI to get you started. Here’s quickstart guide for Ubuntu.
Lets install synergy first ,
sudo apt-get install synergy on all the machines.
Now lets create an empty file /etc/synergy.conf,
sudo gedit /etc/synergy.conf
First find out the hostnames of the machines you are synerging (Case sensitive). Lets say hostnames are hostname1 and hostname2.
Out of the machines, you need to select one as synergy server and all others would be client to this server. Lets select hostname1 as our server.
Create the synergy config file (/etc/synergy.conf) on hostname1(server) as follows:
left = hostname2
right = hostname1
Choose left, right according to you machines placements or however you like. You can also use ‘up’, ‘down’ keywords. For all options see man synergys.
Ok now lets run the server on hostname1 as:
On client machine, hostname 2, connect to server as:
synergyc --daemon hostname1_ip
where hostname_ip is the ip address of hostname1, you could use hostname1 itself, if you are sure the name is resolving.
That’s it, your mouse and keyboards should be able to control both the machines now.
sudo apt-get install quicksynergy, is an easy GUI for the same. That should make the job a cake walk.