惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
O
OpenAI News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
S
Schneier on Security
Latest news
Latest news
F
Full Disclosure
T
Tenable Blog
T
Troy Hunt's Blog
The Last Watchdog
The Last Watchdog
S
Secure Thoughts
L
LangChain Blog
有赞技术团队
有赞技术团队
Project Zero
Project Zero
Cloudbric
Cloudbric
爱范儿
爱范儿
GbyAI
GbyAI
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
The Exploit Database - CXSecurity.com
S
Security @ Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
C
Cisco Blogs
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V2EX - 技术
V2EX - 技术
Engineering at Meta
Engineering at Meta
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
K
Kaspersky official blog
The Hacker News
The Hacker News
V
V2EX
F
Fortinet All Blogs
L
LINUX DO - 最新话题
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News | PayPal Newsroom
博客园 - 三生石上(FineUI控件)
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

Jiajun的技术笔记

你好,2026! TiDB 源码阅读(六):TiDB Coprocessor 源码解析 性能优化的核心思想 TiDB 源码阅读(五):索引 TiDB 源码阅读(四):AST、逻辑计划、物理计划 CockroachDB Serverless Architecture podman 无故退出 Cursor Control-L (CTRL-L) Keyboard Shortcuts in Terminal Replace docker with podman Using xmonad with xfce4 A RC script for freebsd frpc 自己动手写一个k8s controller AI 会取代你的(编程)岗位吗? 自建DERP服务器提升Tailscale连接速度(使用Nginx转发) 自动升级Docker容器 再读《程序员修炼之道-从小工到专家》 让浏览器下载文件 再读《软件随想录》/《黑客与画家》/《软技能》 HTTP 压力测试中的 Coordinated Omission 2的补码 编程语言中的 context 是什么? flutter macOS 构建出错 Flatpak 使用小记 Golang CAS 操作是怎么实现的 PostgreSQL 当MQ来使用 Clash 结合 工作VPN 的网络设计 使用 PostgreSQL 搭建 JuiceFS PostgreSQL 配置优化和日志分析 有GitHub Copilot?那就可以搭建你的ChatGPT4服务 窗口函数的使用(以PG为例) 读《为什么学生不喜欢上学》 OpenAI Prompt Engineering 摘录和总结 读《打造真正的新产品》 VueJS 总结 Linux 自动挂载 alist 提供的webdav FreeBSD 使用 vm-bhyve 安装Debian虚拟机 FreeBSD 和 Linux 网卡聚合实现提速 GPT 帮我搞定了时区转换问题 长任务系统如何处理? 使用开源软KVM - synergy-core 解决 macOS 终端hostname一直变化问题 KVM 共享 Intel 集成显卡 PromQL 备忘 读《格鲁夫给经理人的第一课》 读《打开心智》 为什么要把复杂的联表操作拆成多个单表查询? 红包系统的设计 MySQL Index Condition Pushdown Optimization Go mod 简明教程 OpenWRT 使用 Android/iOS USB 网络 搭建旁路由 Golang gRPC 错误处理 编写可维护的单元测试代码 OAuth 2 详解(六):Authorization Code Flow with PKCE OAuth 2 详解(五):Device Authorization Flow OAuth 2 详解(三):Resource Owner Password Credentials Grant OAuth 2 详解(四):Client Credentials Flow OAuth 2 详解(二):Implict Grant Flow OAuth 2 详解(一):简介及 Authorization Code 模式 ElasticSearch 学习笔记 三种git流程以及发版模型 错误处理实践 权限模型(RBAC/ABAC) OIDC(OpenID Connect) 简介 任务队列简介 PostgreSQL 操作笔记 使用Drone CI构建CI/CD系统 Golang migrate 做数据库变更管理 使用PostgreSQL做搜索引擎 Nginx 源码阅读(三): 连接池、内存池 Nginx 源码阅读(二): 请求处理 Nginx 源码阅读(一): 启动流程 Go 泛型简明教程 KVM 显卡穿透给 Windows 使用 HTTP Router 处理 Telegram Bot 按钮回调 使用反射(reflect)对结构体赋值 GIN 是如何绑定参数的 你好 2022(2021 年终总结) 用Go导入大型CSV到PostgreSQL 使用 OpenWRT 搭建软路由 使用软KVM切换器 barrier 共享键鼠 SQL 防注入及原理 使用 gomock 测试 Go 代码 gevent不是黑魔法(二): gevent 实现 gevent不是黑魔法(一): greenlet 实现 用 entgo 替代 gorm 应用内使用crontab不是那么方便 单测时要不要 mock 数据库? Sentry 自建指南 用selenium完成自动化任务 用闲置的安卓手机做垃圾电话短信过滤 推荐三个时间管理工具 一次事故反思 当JS遇到uint64:JS整数溢出问题 SQLite3 存储以及ACID原理 Redis源码阅读:pub/sub实现 Redis源码阅读:zset实现 Redis源码阅读:bitmap 位图的运算 Redis源码阅读:set是怎么做交并集运算的? Redis源码阅读:list实现(ziplist, quicklist)
macOS/Linux 编译 InputLeap
Jiajun Huang · 2023-11-11 · via Jiajun的技术笔记

上一篇说到,我安装了 synergy-core,但是是下载别人编译好的二进制。我就想着,反正我也能编译,干脆改改源码,把Synergy里 烦人的激活提示框干掉得了?但是又想到,Barrier本来就是改好了的,只是不维护了,InputLeap 又是 Barrier 的继任,那我就 直接自己编译 InputLeap 试试看了。

其实参照WIKI就可以,但是WIKI有点点坑没有指出来: https://github.com/input-leap/input-leap/wiki/Building-on-macOS

安装依赖

首先需要安装依赖,WIKI没有列全:

  1. 安装 Homebrew

    $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  2. 安装 xcode

去 AppStore 安装 Xcode,然后打开,同意协议。

  1. 安装依赖

    $ brew install qt5 openssl pkg-config cmake
    
  2. Clone 代码

    $ git clone https://github.com/input-leap/input-leap
    
  3. 编译

    $ cd input-leap
    $ export B_BUILD_TYPE=Release
    $ ./clean_build.sh
    
  4. 签名

    $ codesign --force --deep --sign - ./build/bundle/InputLeap.app
    

注意:

  • 其中第5步可能会失败,报错 ld ... System 之类的,就是说链接系统库失败,这个时候上面一般会有一个 Warning, 说是系统库没有找到,修改 clean_build.sh

B_CMAKE_FLAGS="${B_CMAKE_FLAGS} -DCMAKE_OSX_SYSROOT=$(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9"

这一行,把 $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk 替换成实际路径,一般来说,都是

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/

具体取决于你的系统版本。然后顺手把 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 改成你的系统版本,例如 -DCMAKE_OSX_DEPLOYMENT_TARGET=14, 再执行编译。

  • 第6步,我本来想一台机器编译,直接拷贝到另一个机器使用,但是发现不行,因为整个App不是做静态链接,所以还是需要哪个机器使用,哪个机器就要安装对应依赖,按道理应该可以做成静态链接的。

剩下的就是常规的操作了,拷贝 build/bundle/InputLeap.appApplications 中,打开,给权限,配置。

Linux 编译

Linux 编译就要简单很多,照着WIKI来就可以:

sudo apt update && sudo apt upgrade
sudo apt install git cmake make xorg-dev g++ libcurl4-openssl-dev \
                 libavahi-compat-libdnssd-dev libssl-dev libx11-dev \
                 qttools5-dev qtbase5-dev

git clone https://github.com/input-leap/input-leap.git
# This builds from master, but you can also checkout a tag or branch.
cd input-leap
git submodule update --init --recursive
export B_BUILD_TYPE=Release
./clean_build.sh
sudo cmake --install build # install to /usr/local/

然后就是创建system service文件:

[Unit]
Description=Soft KVM Client
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=<改成你的名字>
ExecStart=/usr/bin/unbuffer /usr/local/bin/input-leapc -f --display :0 <macOS IP地址>:24800
Environment=XAUTHORITY=/var/run/lightdm/root/:0
Restart=always
RestartSec=3

[Install]
WantedBy=graphical.target

启动。


2024.10.22

如果发现启动不了,报错:An error occurred: assistive devices does not trust this process, allow it in system settings.

那么就要去 System Settings - Privacy & Security - Accessibility 里把 InputLeap 添加进去,同时把 /Applications/InputLeap.app/Contents/MacOS/input-leap 添加进去。对于第二个路径,如果用图形界面的话,是添加不了的,最终我找到的办法是:

  • 打开命令行,执行 open /Applications/InputLeap.app/Contents/MacOS/
  • input-leap 拖拽到 Accessibility 的对话框
  • 完成

refs: