Longing for Universal Control? Want to use a single keyboard and mouse across multiple Macs, or even PCs? You can do that with Barrier, a free virtual KVM switch that allows you to share a keyboard and mouse between computers simply by dragging your mouse cursor to the other computer screen. And you even have a shared clipboard, allowing copy and paste crossing platforms between Mac, Windows, or Linux.
Barrier works great, so if you’ve been waiting for Universal Control on macOS Monterey and disappointed by its delay, this is essentially the same ability offered through an open source project.
While Universal Control, the tentpole feature of macOS Monterey that allows for sharing a keyboard and mouse across multiple Macs and iPads, is now delayed until macOS 12.3 and iPadOS 15.3, you don’t have to wait until then to start sharing a single keyboard and mouse between Macs, and PC’s too. Barrier offers this ability right now, and not only does it work to share a keyboard and mouse between multiple Macs, it also supports Windows and Linux computers, yes even with a shared clipboard. Unlike Universal Control, it is not available for iPad, but if you’re a Mac and PC user, you should really appreciate the cross-platform abilities offered there.
Barrier is a little technical but it’s pretty easy to setup and get working if you follow along, particularly on the Mac thanks to Bonjour. Barrier is open source software and it is not verified by Apple with Gatekeeper, so if you’re uncomfortable with that, you’d probably want to skip running Barrier completely.
How to Share Keyboard & Mouse Across Macs / PCs with Barrier
You’ll want to make sure the computers you want to share a mouse and keyboard with are all on the same network, and you’ll be switching back and forth between the different Macs during initial setup.
- Get the latest version of Barrier here (DMG for Mac, exe for Windows) – download this to every computer you want to be able to use the keyboard and mouse with
- Copy Barrier from the DMG (or install with the exe to Windows) to your /Applications folder on every Mac you intend to use this on, then right-click on Barrier.app and choose “Open” to get around Gatekeeper on each Mac
- On all Macs, choose “Open System Preferences” and authenticate to allow Barrier to control the Macs *
- On the Mac with the keyboard and mouse you wish to share (the “Server Mac”), choose “Server” in the Setup Barrier screen and then Done
- On the Mac or PC connecting to the Server Mac to use its mouse/keyboard (the ‘Client Mac’), choose “Client” and then Done
- On the Server Mac, wait a moment and Barrier should automatically detect the Mac wishing to connect via Bonjour, then simply click the orientation for where you want the client Mac(s) to be
- The Server Mac should then be setup and ready to go, with the screen looking something like this:
- Confirm on the Client Mac that you want to connect to the Mac / trust the sha fingerprint to connect to the Server Mac
- Repeat this process on all other Macs you wish to connect to the Server Mac to share the keyboard and mouse with
- For Windows PC’s clients, everything is the same minus the auto-Bonjour connection, so instead specify the Server Mac IP address and connect manually
Everything should be working now, and you can drag your mouse and keyboard across the Macs (or PCs) with ease simply by moving the cursor to where ever you oriented the other computers to be during setup.
You can use the clipboard to copy text or images, and paste them between the computers.
Troubleshooting if Barrier not working, fix “barrier ERROR: ssl certificate doesn’t exist” error
If things are not working, on the Server Mac pull down the Barrier menu item, and choose “Show Log”, to get an error message log of what’s going on, which should give you a good idea of what is going wrong.
If you see an error message that says something like:
openERROR: ssl certificate doesn't exist: /home/user/.var/app/com.github.debauchee.barrier/data/barrier/SSL/Barrier.pem
Then you need to manually generate a private security key for Barrier, you can do that by running the following commands in Terminal.app:
First change your directory to the Barrier SSL folder:
cd ~/Library/Application/ Support/barrier/SSL
Now generate a security key:
openssl req -x509 -nodes -days 365 -subj /CN=Barrier -newkey rsa:4096 -keyout Barrier.pem -out Barrier.pem
Back in the Barrier app on Server Mac, click to Stop, then Start Barrier server to load the private key.
The Client Mac(s) or PC(s) should now ask a security question showing the generated fingerprint, and asking you “Do you trust this fingerprint?” to which, assuming it matches, choose “Yes” to connect to the Barrier Server Mac.
You can also manually try to connect, by directly specifying the IP address of the Server Mac. If you’re not sure what that is you can get the IP address on the Mac operating as the Barrier server via Network preferences.
Barrier works across multiple operating system versions as well, in the setup shown here I am using Barrier across multiple Macs with macOS Big Sur and macOS Monterey, trouble free, but you can also set this up with Windows 11, Windows 10, Linux, and just about anything else that runs Barrier.
* If you aren’t comfortable with letting unvetted third party open source software control your Macs, you will not be able to use Barrier. Use at your own risk and make your own security/privacy decisions based on your use case and needs.
So, no more waiting for Universal Control, use Barrier to share a keyboard and mouse across multiple Macs (or even PCs) right now. Sure you won’t be able to run it on an iPad, but you can still use Sidecar on the iPad to turn it into another Mac display if you’d like to get your iPad involved in the mix.
For those curious, Barrier is split from and based on the Synergy open source project code base, before Synergy became a paid product offering. If you’re a longtime reader of OSXDaily, you may recall us covering Synergy back in 2012 (or a similar app called Teleport way back then too). And yes that means if you like the idea of Barrier but want official support, you can check out Synergy and buy that app instead, which offers cross-platform compatibility as well. If you’re exclusively a Windows user, there’s also Mouse Without Borders but that will not work with a Mac or Linux machine. Finally, ShareMouse is another paid solution that offers similar KVM features, if you want to check that out too.
Did you get Barrier up and running to share your keyboard and mouse across multiple Macs and even Windows PCs or Linux machines? Are you going to use this instead of Universal Control, or until Universal Control comes out? Let us know your thoughts and experiences in the comments.