How to Share your Keyboard & Mouse via Barrier – An Alternative to KVM Switch
Posted On August 17, 2020
Your case scenario, you have 3 laptops (we’ll name them A, B, and C) and you have an external keyboard and mouse primarily use in your laptop A. You still want to use laptops B and C but don’t really want to like change keyboards every time. One solution is to use a KVM switch, this is an external device with ports which allows you to control multiple computers with a set of keyboard and mouse .
If you don’t want to use external hardware like a KVM switch, there are applications that allow you to have the same functionality but instead of connected adapter and cables, they are connected via your local network. This is what the application Barrier does.
Here’s the description directly from their Github page.
Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you’re controlling at any given moment. Barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system.
The good thing with Barrier compared to others is that it allow connection to other Operating Systems. In my end, I have laptops running Windows 10 and Ubuntu 18.04.
How to Set it Up?
Install Barrier to your laptops or computers. You can check out the installers and packages here.
Identify and configure which of your computers is the server and the client. The server would be the computer that will be the source or host of the keyboard and mouse. The client(s) would be the computers where you want to share the keyboard of the mouse of the host. In our case, we have 3 laptops. Laptop A would be the host and the others would be the client.
Configure your Barrier in laptop A. You should see that “Server” checkbox is selected by default.
Take note of the IP addresses (specifically the 1st one). This is the local IP address of laptop A that is assigned by your network.
Laptop A (Server Info): – Local IP: 192.168.0.16
In your laptops B and C, enable the “Client” checkbox and take note of the screen name and their IP addresses. A quick hack to find the machine’s local IP address is by checking the “server” section that is grayed out.
Laptop B (Client Info): – Local IP: 192.168.0.10 – Screen name: B
Now in the “Server IP” field of the client section, enter there the local IP of laptop A.
After configuring your clients, go back to laptop A (server). Click on the “Configure Server…” button. It should show up a window similar below. In your initial set up, laptop B and C won’t be there. You can add the clients hereby drag and drop the monitor icon.
You can then configure those by double-clicking on the monitor icon. Below is the sample window where you can set the screen name of the client and add the IP addresses in the “Aliases” list. Note that the screen name should match the screen name showing in the client Barrier application.
Hit the “Start” button of the Barrier application in all of your laptops, best to start the server first.
The only disadvantage I see is if you’re on a wireless network and you have a weak signal or a bad connection, that would affect the performance of the shared mouse to your clients.
Did you find this useful? Do you have other similar applications that’s better? Leave a comment below. Thanks!