使用 Wayland 进行 VNC 远程登录?-- 20.04

b_l*_*shi 5 vnc wayland remote-login 20.04

我已经运行 Ubuntu 20.04 一段时间了。我设置了一台远程计算机,以便我可以在登录屏幕上使用 x11vnc VNC 进入它,如果需要,可以使用 Xauthority 文件/run/user/125/gdm/Xauthority(不,在这种情况下,Xauthority 前面不应该有一个点)。突然,我今天尝试访问它,却发现无法访问!

我做了一些挖掘,看起来登录界面在过去一两个月的某个时候从 X11 切换到了 Wayland。我可能可以将所有内容切换回 X11,但如果 Wayland 是未来,我宁愿在 Wayland 中找到一个可行的解决方案。

因此我的问题是这样的。如何让VNC在登录屏幕上运行?我不需要 RDP 解决方案;我的 RDP 连接工作正常!

我猜测 vino-server 应用程序可以处理登录,但直到用户登录后它才会启动。在这种情况下,简单地将用户配置为自动登录将不起作用。有一些问题(我猜是显卡驱动程序)导致自动登录失败。

小智 1

Vino 仅为 x11;在 Wayland+Gnome 上,唯一可用的软件是 gnome-remote-desktop。

apt-cache show gnome-remote-desktop:
(...)
 This feature will not work on Ubuntu until mutter is recompiled
 with the remote desktop option enabled.
Run Code Online (Sandbox Code Playgroud)

在 Ubuntu 20.04 上,Mutter(Gnome 合成器)是在没有远程桌面选项的情况下编译的,来自“apt source mutter”,文件 debian/rules:

# pipewire is not in Ubuntu main yet
ifeq ($(DEB_HOST_ARCH_OS),linux)
ifeq ($(shell dpkg-vendor --query vendor),Ubuntu)
    CONFFLAGS += -Dremote_desktop=false
Run Code Online (Sandbox Code Playgroud)

因此,除了尝试重新编译 mutter(并在 Ubuntu 升级后继续生活)之外,唯一的方法就是切换回 x11。

似乎在下一个 LTS 版本 22.04(又名 Jammy Jellyfish)中,Pipewire 将添加到主存储库中:

https://discourse.ubuntu.com/t/the-state-of-wayland-vs-x-esp-in-regard-to-to-the-next-lts/12576/26

最终远程桌面将与 Wayland 完全兼容:

https://discourse.ubuntu.com/t/desktop-team-updates-monday-15th-february-2021/20899/12