Barrier is a free popular KVM software that enables mouse/keyboard sharing across several devices.
I've been fiddling with it for a few hours and I can't seem to get it right.
I have a barrier server running on my Windows machine.
I've downloaded the git repository and built the binaries. I've copied barrier
, barrierc
and barriers
into /usr/bin
.
If I run barrier GUI, specify the server IP and enable the server, it works. I can do it with and without SSL (as long as both the client and the server have the same setting set). I would prefer to use SSL though.
I've then tried running barrierc --enable-crypto <ip>
. The server acknowledges the connection, but says it's not secure and it doesn't work. However, if I run the same command with the -f
flag barrierc -f --enable-crypto <ip>
which makes it run in the foreground, it all works dandy.
Since I'm on Ubuntu 18.04, I've setup a systemd service like so:
[Unit]
Description=Barrier mouse/keyboard share
Requires=display-manager.service
After=display-manager.service
StartLimitIntervalSec=0
[Service]
Type=simple
ExecStart=/usr/bin/barrierc -f --enable-crypto 192.168.12.96
Restart=always
RestartSec=1
User=karlovsky120
[Install]
WantedBy=multi-user.target
I've named it barrier.service
and copied it into /etc/systemd/system/
.
I've tried starting it manually, but it refuses to work. From what I can tell from systemctl
status, it looks like systemd
runs the client, but the client exits immediately and then it restarts it. I've tried with and without the -f
flag, but the result is the same.
The server also complains that the client connection might not be secure, which is the same error you get when you try to connect with a non SSL client to an SSL server. It does so with and without the -f
flag.
I know I have to enable the service to have it run on startup, but how do I get it to work at all?