Using one keyboard and mouse to control two computers can be helpful in a number of situations. For example, if you’re working from home using a work-issued laptop and only have limited desk space and still need to use your desktop PC, but it wouldn’t be practical to set up another mouse and keyboard, nor to switch which device the peripherals were plugged into, nor could you justify buying a KVM switch as you only work from home occasionally, I have the solution for you.
Years ago I used to use Synergy to achieve this. However, when I went to download it years later, I was disappointed (but not surprised – I recall it being decent software) to find it is a paid product now. So I searched for an alternative, free way of achieving the same result.
Barrier is open source software available on GitHub that lets you set up one computer as a server and one as a client. The server computer has the mouse and keyboard plugged into it and it shares it with the client computer. In the case mentioned above, your desktop PC would be the server computer and the work laptop would be the client computer.
Here’s what you need to do to get it up and running:
- Download the latest release of Barrier from GitHub (the .exe file), run the file and complete the installation. You can select the option to create a desktop shortcut for easy access. You will need to do this on both computers (note that if the client device does not allow installation of programs, you unfortunately will not be able to do this)
- Run Barrier (via the start menu or the desktop icon) on both computers
- On the server computer (the PC with the mouse and keyboard plugged in), tick the first checkbox that says ‘Server’
- On the client computer (the computer without any mouse or keyboard plugged in), click the second checkbox labelled ‘Client’
- On both computers, within Barrier, click the text saying ‘Barrier’ on the top menu and press ‘Change Settings’. Untick ‘Enable SSL’ and ‘Require client certificate’ and press OK. Ensure this is carried out on both devices
- On the server computer, click ‘Configure Server’ and drag the screen icon in the top right corner down to where you would like the client computer to be. For example, if you want to move your mouse to the left side of the screen to move it onto the laptop that is sitting to the left of you, make sure the screen icon is to the left of the screen icon that already exists in the grid
- Double click the ‘Unnamed’ screen and change the ‘Screen name’ to whatever is showing on the client computer under the ‘Client section’ (e.g. DESKTOP-TX000000) and press OK
- Within Barrier on the client computer, ensure the ‘Server IP’ matches what is displaying next to ‘IP Addresses’ on the server computer’s Barrier window
- On both computers, press ‘Start’ and you now be good to go!
When you move your mouse in the direction of wherever you placed the client computer in the grid, it should now move over to that screen and you are able to use the other device as though it is just another monitor on your existing setup.
Notes & Troubleshooting
Here are some things to check if, after following the above instructions, you are still unable to use the mouse and keyboard on the other device:
- Ensure that both computers are on the same network as each other
- Double check the server IP matches on both computers’ software
- Check that the monitors are correctly set up with the correct names in the ‘Configure Server’ interface
- If you receive a pop-up asking for the program to have firewall access, press ‘Allow’
Video Guide (Step-by-Step)
Here is a video guide from YouTube that shows the process step-by-step. This is useful if you would prefer a video guide than reading a wall of text: