Logo

::<lexlblog>

Share your mouse and keyboard accross machines using Barrier.

Have you ever heard of a kvm-switch? KVM stands for _keyboard video mouse_, and
a kvm-switch is a piece of hardware that lets you share one set of mouse,
keyboard and screen between multiple computers. They are quite common in server
space, but they also tend to be expensive.

What if you as an individual come into a situation where you have multiple
machines, and you would like to control both with only one set of keyboard and
mouse? Maybe you have a desktop PC and a laptop - possibly a mac. Or, as I
sometimes do, you have two laptops, one running Windows and the other one
running Linux. Or you're carrying a laptop and a tablet. Wouldn't it be nice if
you could use the tablet basically as a second screen? Just jumping accross
different machines and operating systems like there were no barriers between
them?

Boy I've got good news for you: [Barrier](https://github.com/debauchee/barrier).
I've tested it myself a few days ago, and I will **keep** it around on all of
my machines from now on. If you want to test it, it's super easy to setup,
because you can get it from
[flathub](https://flathub.org/apps/details/com.github.debauchee.barrier)
for Linux systems and
[precompiled](https://github.com/debauchee/barrier/releases)
for Windows-based machines.

!!! WARNING
    If you go cross-platform, make sure the versions of Barrier match up.

You simply setup the machine where you want to use keyboard and mouse as
_Server_ and all other machines as _Client_. Then, on the server, create a
virtual screen for every client (the names have to match the machine's names!).
And boom, you should be able to move the mouse accross all machines! If you type
something, it should go to the machine where the mouse is currently active.
Aaand, you can even share the clipboard. So if you say, type a command into the
terminal on one machine, you can simply copy it over to other machines. Very
convenient!

Honestly, whether you want to build a home theater using NUCs or PIs, or you
want to work on a MAC Studio and a PC simultaneously, the possibilities are just
endless.