一位开发者使用Zig 0.16和GTK4编写了ssh-askpass-zigtk,这是一款SSH密码输入工具,通过手写GTK绑定设计避免了对X11的依赖[1]。该项目旨在解决Gentoo软件包仓库中现有SSH askpass工具的问题——这些工具往往需要拉入X11或完整KDE栈作为依赖[1]。
该工具支持多种Linux架构的交叉编译,包括x86_64、aarch64、armv7、riscv64、powerpc64le、i386、loongarch64和s390x[1],并提供预编译二进制版本[1]。项目要求OpenSSH 8.4及以上版本以支持SSH_ASKPASS_REQUIRE=prefer功能[1]。开发者指出,由于GTK3中的gdk_seat_grab界面在GTK4已被移除,且Wayland不支持键盘抓取,因此GNOME_SSH_ASKPASS_GRAB_SERVER和GNOME_SSH_ASKPASS_GRAB_POINTER变量在新版本中无效[1]。项目代码托管在tty.fail及GitHub镜像上[1]。
A developer has created ssh-askpass-zigtk, an SSH password prompt utility built using Zig 0.16 and GTK4 [1]. The tool addresses a specific packaging challenge in Gentoo's software repository, where existing SSH askpass implementations require either X11 dependencies or a complete KDE desktop environment stack [1].
The project uses hand-written GTK bindings to minimize dependencies, avoiding the need for full X11 integration [1]. The tool supports cross-compilation across multiple Linux architectures, including x86_64, aarch64, armv7, riscv64, powerpc64le, i386, loongarch64, and s390x [1]. It is compatible with OpenSSH version 8.4 and later, leveraging the SSH_ASKPASS_REQUIRE=prefer functionality [1]. The project is available on tty.fail with a GitHub mirror [1].
According to the developer's documentation, certain features from GTK3 have been removed in GTK4; specifically, the gdk_seat_grab interface is no longer available [1]. Additionally, Wayland does not support keyboard grabbing, rendering the GNOME_SSH_ASKPASS_GRAB_SERVER and GNOME_SSH_ASKPASS_GRAB_POINTER environment variables ineffective [1]. Pre-compiled binary versions are provided for users [1].