Tutorial  Updated

Compiling and installing Barrier (synergy fork) for KVM L4T Ubuntu

Tired of the inconvenience of having to constantly detach your primary mouse and keyboard from your PC in order to use them with a switch? Don't have any spares lying around?

Barrier - a KVM software that is a fork from the old, free Synergy 1.9. Barrier focuses on maintaining the simplicity of the older software, while also incrementing on it and retaining Synergy's old price tag of $0. Synergy has since become a paid software with a plethora of bloat features and closed code (It was always paid, but used to be open source, with compilable nightlies and free builds. Not anymore.).
  • The program now have builds on flathub and snap so if you're lazy you don't need to compile it anymore.
Code:
sudo snap install barrier

Code:
flatpak install flathub com.github.debauchee.barrier

Get ready to follow these instructions, as if you actually care about getting this done.
  • First, update and upgrade with this simple command:
Code:
sudo apt-get update && sudo apt-get upgrade
  • Next, get your dependencies with:
Code:
sudo apt install git cmake make xorg-dev g++ libcurl4-openssl-dev libavahi-compat-libdnssd-dev libssl-dev libx11-dev libqt4-dev qtbase5-dev
  • Now, onto the thrilling part of compiling. You're going to need the source tarball, which you can get with:
Code:
wget https://github.com/debauchee/barrier/archive/refs/tags/v2.4.0.tar.gz && tar xzvf v2.4.0.tar.gz && cd barrier-2.4.0
  • Then, you'll need to use the building script:
Code:
./clean_build.sh
  • Finally, you can install it with:
Code:
cd build && sudo make install
  • But wait, there's more! Your cursor will be invisible, because of course it will be. To fix it, use this command:
Code:
gsettings set org.gnome.settings-daemon.plugins.cursor active false
  • There, happy now?
"How do i setup this? I'm new to this world".
Maybe you're a bit lost in this world. But don't worry, I'll give you some basic instructions.
  • First, you'll need to fire up the program by typing in some commands on your terminal or searching for it on your launcher.
  • Then, you'll need to select your language and client. Congratulations, you've completed the most basic step!
  • If you're on a PC, whether it's a Windows, Mac or Linux system, you can go ahead and download the release for your platform from Barrier's Github.
  • Once installed, launch the program, choose your language and server.
  • Now, you'll need to go ahead and configure the server. It's as easy as dragging the monitor icon to the side of the other monitor icon that represents your PC on the grid.
  • Double-click on the icon that now says "Unamed" and write your switch's name on the Screen Name box.
    • Your switch name is the one you choose at installation along with your username.
  • Click OK, then OK, then Apply and Start. With any luck, the program should detect itself and you should be done!
Of course, if you happen to come across any errors or have any suggestions, feel free to point them out.
 
Last edited by ZeroFX,

thejrosso

New Member
Newbie
Joined
May 15, 2019
Messages
1
Trophies
0
Age
29
XP
76
Country
Australia
Thanks for writing this up! I've only recently found barrier through a solution to an unrelated problem and I was looking for a way to run/compile it properly on L4T.
Confirmed working. Cheers!
 
  • Like
Reactions: ZeroFX

RHOPKINS13

Geek
Member
Joined
Jan 31, 2009
Messages
1,354
Trophies
2
XP
2,621
Country
United States
I've been using Barrier with my laptop and my development box at work, it's a great tool! Used Synergy on the computers at my parent's house over 10 years ago.

Using it with Ubuntu on the Switch is an awesome idea. Thanks for the tutorial, I'm sure it will help lots of people.
 
  • Like
Reactions: ZeroFX
D

Deleted User

Guest
Just decided to try installing this as it would be much easier than any other solution I've found so far, but on the switch, the service just gets stuck on "barrier is starting" and the terminal is complaining about not having, or missing a compatibility with "DnsServiceRegister", therefore I cannot connect at all.

Any solutions?
 
  • Like
Reactions: ZeroFX

RHOPKINS13

Geek
Member
Joined
Jan 31, 2009
Messages
1,354
Trophies
2
XP
2,621
Country
United States
Use your PC's IP Address instead of hostname?

Also, this sounds kinda dumb, but you do realize your Switch has to be connected to your wifi first, right? This isn't using USB.
 
  • Like
Reactions: ZeroFX

ZeroFX

why?
OP
Member
Joined
Jun 18, 2018
Messages
1,101
Trophies
1
Location
napaJ
XP
2,983
Country
Japan
I've been using Barrier with my laptop and my development box at work, it's a great tool! Used Synergy on the computers at my parent's house over 10 years ago.

Using it with Ubuntu on the Switch is an awesome idea. Thanks for the tutorial, I'm sure it will help lots of people.
You're welcome! And thanks, as soon as I remembered about synergy I found out about barrieer, got it running and then I thought of spreading, it's helping me a lot when messing with the system.

Just decided to try installing this as it would be much easier than any other solution I've found so far, but on the switch, the service just gets stuck on "barrier is starting" and the terminal is complaining about not having, or missing a compatibility with "DnsServiceRegister", therefore I cannot connect at all.

Any solutions?
Well that's really weird, have you installed something that could possibly mess with this? Like DNS of something that change network? Checked Firewall? I compiled in a fresh install, had nothing extra, and idk if something could break barrier.
 
D

Deleted User

Guest
You're welcome! And thanks, as soon as I remembered about synergy I found out about barrieer, got it running and then I thought of spreading, it's helping me a lot when messing with the system.


Well that's really weird, have you installed something that could possibly mess with this? Like DNS of something that change network? Checked Firewall? I compiled in a fresh install, had nothing extra, and idk if something could break barrier.
Making a fresh install, so hopefully it's just a incompatibility error from something I previously installed.
 
  • Like
Reactions: ZeroFX

LinkFan16

I link them all
Member
Joined
Mar 15, 2009
Messages
424
Trophies
1
XP
1,493
Country
Germany
I know I'm a bit late to the party, but thanks for writing this tutorial. I just set up L4T Ubuntu on my switch and so far had no luck with installing Barrier either from the flatpak or the snap. I thought that compiling it from source might be the solution, so this really helps. Will try and see how it goes.

Edit: Compiling Barrier went really smooth thanks to your great tutorial. I faced some problems when I tried to connect with Barrier on the Switch to use the mouse and keyboard of my Windows 10 host machine however. The following things might be good to know for setting up and using Barrier:

- If something isn't working, press F2 to check the Log in Barrier. This should give you an idea where the problem lies.
- If the Log shows some error related to an SSL library in Linux, disable SSL in the Barrier settings (pressing F4 will open the settings)
- Can't connect from Linux using a Windows machine as host? Allow Barrier to communicate through the firewall on Windows.
- Make sure you go through the server configuration on both the host and the client and add the other machine on the display and connections tab. Also use the actual display name of the machine. On windows, this can be found in the hardware manager. On Linux just open a terminal. The part between the "@" sign and the ":" is the display name.
 
Last edited by LinkFan16,
  • Like
Reactions: ZeroFX

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: We get 37 versions of Super Mario Bros but 0 of Beast Busters