「Barrier」- 多电脑共享鼠标和键盘 | 替代 Synergy 程序

认识

Barrier 是模仿 KVM 切换器功能的软件,过去它允许您使用单个键盘和鼠标来控制多台计算机,方法是通过物理转动盒子上的旋钮来切换您在任何给定时刻控制的计算机。 Barrier 通过软件来完成此操作,允许您通过将鼠标移动到屏幕边缘或使用按键将焦点切换到不同的系统来告诉它要控制哪台机器。

KVM switch(keyboard, video, and mouse switch)的软件实现,该项目从 synergy 1.9 分叉出来。目前,Barrier与 Synergy 并不兼容。 Barrier 需要安装在所有共享键盘和鼠标的机器上。Barrier 更加专注与共享鼠标键盘功能。

项目:https://github.com/debauchee/barrier
文档:https://github.com/debauchee/barrier-wiki

组成

配置文件路径

通过 flatpak 运行,其配置结构如下:

~/.var/app/com.github.debauchee.barrier
# tree -L 3
.
├── cache
│   ├── fontconfig
│   │   ├── 3830d5c3ddfd5cd38a049b759396e72e-le64.cache-8
│   │   └── da43223dd54fb3bb4243ae19d4b583b2-le64.cache-8
│   ├── mesa_shader_cache
│   │   └── index
│   └── tmp
├── config
│   ├── Debauchee
│   │   └── Barrier.conf
│   ├── fcitx
│   │   └── dbus
│   └── kdeglobals
└── data
    └── barrier
        └── SSL

12 directories, 5 files

性质

使用一台计算机上的键盘和鼠标来控制一台或多台其他计算机。

支持剪贴板共享。

Hassle-free reliability. We are users, too. Barrier was created so that we could solve the issues we had with synergy and then share these fixes with other users.

Compatibility. We use more than one operating system and you probably do, too. Windows, OSX, Linux, FreeBSD… Barrier should “just work”. We will also have our eye on Wayland when the time comes.

Communication. Everything we do is in the open. Our issue tracker will let you see if others are having the same problem you’re having and will allow you to add additional information. You will also be able to see when progress is made and how the issue gets resolved.

构建

安装方法

Debian GNU/Linux 10 (buster)

apt-get install barrier

macOS Sierra (Version 10.12.6)

访问 Releases · debauchee/barrier 下载 Barrier-x.x.x-release.dmg 文件。对于 macOS Sierra 可以下载并成功安装 barrier-2.0.0.dmg 版本,但是不能安装 Barrier-2.3.3-release.dmg 版本(系统不兼容),两者直接的版本我们没有试用;

然后,执行 dmg 文件安装,这里不再赘述。

Linux | Flatpak

https://flathub.org/apps/com.github.debauchee.barrier
flatpak install flathub com.github.debauchee.barrier
flatpak run com.github.debauchee.barrier

应用

常见场景 | Solutions to Scenarios

改进

问题 | Problems | 改进 | Improvements

[WIP] … cpu 100% … strace … write(…) …

# 06/2x/2024

相似问题:
Barrier server sometimes gets stuck at 100% cpu, strace shows write(4, “\1\0\0\0\0\0\0\0”, 8) · Issue #1936
Barrier server uses 100% CPU and all available memory · Issue #715

[Sol] … ipc connection error …

Windows IPC connection error · Issue #235 · debauchee/barrier

Windows 11, Barrier 2.4.0

The IPC issue on windows is because the barrierd service isnt running. Its normally installed/started by the barrier installer. See if its under the list of services and start it. If its not there, you likely need to manually added it. To do that check the [Run] section in dist/inno/barrier.iss.in for details about what the installer is doing to install/start it.

在 Windows 中,Computer Management / Services,重启启动 Barrier 服务。

[Sol] … Unable to save configuration in gui …

# 07/16/2024 | Flatpak | Barrier 2.4.0 | Ubuntu 24.04 LTS

在图形化界面中,barrier,无法保存配置。例如,修改 Enable SSL 之后,功能正常,但是退出应用并启动,Enable SSL 变为禁用状态。

同时,Configure Server…,同样无法保存配置。但是,当启动时,其能够读取 .config/Debauchee/Barrier.conf 配置文件。

当时,尝试启动 Server(barriers)时,其又会输出 cannot open configuration “…/data/barrier/.barrier.conf” 错误。

另外,Barrier > Save Configuration,保存的配置格式并不同于 Barrier.conf 文件。

barrier,其启动的时候将读取 ~/.var/app/com.github.debauchee.barrier/config/Debauchee/Barrier.conf 配置文件。
barriers,其启动的时候将读取 ~/.var/app/com.github.debauchee.barrier/data/barrier.barrier.conf 配置文件。

相关问题:
Unable to save configuration in gui · Issue #2078 · debauchee/barrier

# 07/17/2024 参考如下文章,升级 apparmor 即可。

参考

Install barrier for Linux using the Snap Store | Snapcraft
debauchee/barrier: Open-source KVM software