用途:在容器中以无头方式运行 GNOME Shell(Wayland)与 gnome-remote-desktop(GRD),提供原生 RDP 远程访问。技术栈为 gnome-shell --wayland --headless 加 gnome-remote-desktop-daemon --headless,区别于 xrdp + X11 方案。GNOME Shell 46+ 已移除经典 X11 会话标志,远程访问使用 GRD(FreeRDP 服务端)。
主要能力:提供启动脚本 start-gnome-headless-rdp.sh(等待会话总线、grdctl 配置、pipewire、启动 shell 与 GRD)、promote-rdp-monitor.py(GRD 接入后将 Meta-1 提升为唯一主显示器)、configure-desktop-ui.sh(壁纸、深色主题、收藏栏),以及 nofuseabort.c 与预编译 libnofuseabort.so。
必要用法:将脚本复制到镜像 /usr/local/bin,入口以 root 执行 mknod /dev/fuse、启动 dbus/seatd,再用 runuser 运行启动脚本;通过环境设置 GNOME_RDP_PASS、用户与端口。grdctl 以桌面用户配置 TLS 证书、凭据、端口并启用 RDP。主机端口发布用 wslc run -d --name <name> -p <host-port>:<container-rdp-port> -m <memory> <image>,端口与凭据写入项目文档,技能中仅用占位符。
限制:容器 seccomp 常导致 /dev/fuse 挂载 EPERM,需 LD_PRELOAD 的 FUSE 桩规避,届时剪贴板重定向不可用,画面与输入仍可用。常见双头问题会只显示壁纸,需提升 Meta-1。无 GPU 时 EGL 失败通常不致命。日志优先排查,勿反复重连客户端。