💾 Archived View for snowcode.ovh › barrier.gmi captured on 2023-07-10 at 13:24:11. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

-=-=-=-=-=-=-

How to setup barrier

Barrier is a software that lets you use the keyboard, mouse and clipboard of one computer to control other computers. It's a very good solution if you don't have secondary screen, but have a secondary laptop for instance.

You need to setup one server (from which you'll use the mouse and keyboard to control all the devices), and as many clients as you want.

Installing barrier

First you need to install barrier on all your devices, it's a cross-platform software so it shouldn't be a problem. You can install "barrier" package or "barrier-headless" if you don't want the GUI. If you are on Windows or macOS, go on the GitHub releases page:

Download page for Windows and macOS (GitHub)

Once you got it installed we can setup the server

Setting up the server

The server can be setted up using either GUI or text config file. I chose the latter version. First create a file in ~/.local/share/barrier/.barrier.conf :

nano ~/.local/share/barrier/.barrier.conf

Then paste the following default configuration:

section: screens
	left_device:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		preserveFocus = false
		switchCorners = none
		switchCornerSize = 0
	middle_device:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		preserveFocus = false
		switchCorners = none
		switchCornerSize = 0
	right_device:
		halfDuplexCapsLock = false
		halfDuplexNumLock = false
		halfDuplexScrollLock = false
		xtestIsXineramaUnaware = false
		preserveFocus = false
		switchCorners = none
		switchCornerSize = 0
end

section: aliases
end

section: links
	left_device:
		right = middle_device
	middle_device:
		right = right_device
		left = left_device
	right_device:
		left = middle_device
end

section: options
	relativeMouseMoves = false
	screenSaverSync = true
	win32KeepForeground = false
	clipboardSharing = true
	switchCorners = none
	switchCornerSize = 0
end

That's a 3-devices configuration, feel free to replace "left_device", "middle_device" and "right_device" by your appropriate device names as well as removing or editing parts of the config file.

Once that's done, you can run the barrier command

# Run barrier server in debug mode without SSL as "right_device"
barriers -f -d DEBUG --disable-crypto -n right_device

# Run barrier server without SSL as "right_device"
barriers --disable-crypto -n right_device

# Run barrier server without SSL as default computer's name
barriers --disable-crypto

Once the server is running grab your local IP address!

ip addr

Connecting to server (clients)

Now you can connect to this server from clients.

# Run barrier client in debug mode without SSL as "middle_device"
barrierc -f -d DEBUG --disable-crypto -n middle_device <IP ADDRESS>

# Run barrier client without SSL as "middle_device"
barrierc --disable-crypto -n middle_device <IP ADDRESS>

# Run barrier client without SSL as default computer's name
barrierc --disable-crypto <IP ADDRESS>

All those options can be changed in the GUI but I think it's more straightforward to do everything in one command.