Step Up Your Multi-Computer Setup By Sharing Mouse and Keyboard Between Systems

horusgoul profile image Horus Lugo ・3 min read

Last week, I finished setting up my main computer, which uses Ubuntu, and today I needed to work with my MacBook Pro to be able to work with the iOS simulator. I placed it in my desk and after using both computers for a few hours, I noticed that this could be better if both systems shared the same keyboard and mouse.

Well, seems like I wasn't the only one to think about that.

KVM Switches

KVM Switches (KVM stands for keyboard, video and mouse), allow you to share these peripherals between multiple systems. In general, there are two types, hardware and software KVM switches.

Clearly, the first thing I did was to look for a software solution, and I decided to try with Barrier.

GitHub logo debauchee / barrier

Open-source KVM software


Eliminate the barrier between your machines Find releases for windows and macOS here Your distro probably already has barrier packaged for it, see distro specific packages below for a list. Alternatively, we also provide a flatpak and a snap.

Contact info:

  • #barrier on freenode

CI Build Status

Master branch overall build status: Build Status

Platform Build Status
Linux Build Status
Mac Build Status
Windows Debug Build Status
Windows Release Build Status
Snap Snap Status

Our CI Builds are provided by Microsoft Azure Pipelines, Flathub, and Canonical.

What is it?

Barrier is KVM software forked from Symless's synergy 1.9 codebase. Synergy was a commercialized reimplementation of the original CosmoSynergy written by Chris Schoeneman.

What's different?

Whereas synergy has moved beyond its goals from the 1.x era, Barrier aims to maintain that simplicity. Barrier will let you use your keyboard and mouse from machine A to control machine B (or more). It's that simple.

Project goals

Hassle-free reliability. We are users…

Barrier Configuration

Installing Barrier was easy, they provide a snap package for Ubuntu and also pre-built binaries for OS X and Windows.

Barrier uses a Client-Server architecture, and because of that, the first thing we're going to configure is the server. The server is the machine that will "own" the keyboard and the mouse, while the clients will receive information about what is going on and then act accordingly.

  1. Open the Barrier app in the machine that you picked to be the server. Select the Configure interactively option and click in the button that says Configure Server.

  2. That will open a new window where you can modify the layout of screens by using drag and drop. In my case, I added it to the left of my main computer.

  3. Double click the new added screen and give it a name. The name is important because it has to match the name of the client you're going to configure next. To check the client name, open the Barrier app in the client and check the name there.

Server configuration

  1. Save all this configuration and start the server.

  2. Take a look to the IP addresses in the server, one of them should be bold, that's the IP of our server and we need to use it in order to configure our clients. Go to your client and configure them, you can first check if the auto config works for you, otherwise just fill the Server IP with the one you got earlier.

Client configuration

And that's it, with this you just configured a KVM switch and it should be working now!

Sharing mouse and keyboard between Ubuntu and OS X

What now?

This KVM switch uses your LAN network to establish the Client-Server communication, there are multiple things that can result in a degraded experience.

Barrier is the program I chose, but there are others that may work better for your system, if this one doesn't do it, just keep looking, and remember, there are hardware KVM switches too!

Follow me on Twitter if you want to know about my future articles, projects or whatever I come up with!

Posted on Jun 12 by:

horusgoul profile

Horus Lugo


Software development has been my passion for years. I've been always building stuff with the purpose of helping others to learn, build communities or even just for fun.


markdown guide

Works like a charm my man! Thank you 😁