屏幕关闭时使用 x11vnc

屏幕关闭时使用 x11vnc

我有一台连接到投影仪的小型服务器,最近从 Ubuntu 18 升级到了 Ubuntu 22。最初通过 x11vnc 进行屏幕共享时出现了一些问题,但经过一些调整和禁用 wayland 后,我就能让它正常工作了。

我遇到的问题是,当投影仪关闭时,屏幕共享不再起作用。我似乎连接上了,也能看到应用程序窗口,但桌面背景在图像和黑屏之间闪烁,我的输入都不起作用。没有配置锁定屏幕,我有一个带有图形桌面的活动登录用户会话。在旧系统上,这有效,无论投影仪/显示器是否打开,我仍然可以控制屏幕。我怀疑这可能与从 lightdm 更改为 gdm 有关。

我具体运行的命令和选项是:

x11vnc -xkb -noxrecord -noxdamage -avahi -allinput -rfbauth /etc/x11vnc.pass -forever -rfbport 5900 -display :0

我在日志中没有看到任何错误示例::

Dec 22 19:02:24 hm80 x11vnc[4969]: 22/12/2022 19:02:24 Got connection from client 192.168.0.17
Dec 22 19:02:24 hm80 x11vnc[4969]: 22/12/2022 19:02:24   0 other clients
Dec 22 19:02:25 hm80 x11vnc[4969]: 22/12/2022 19:02:25 Normal socket connection
Dec 22 19:02:25 hm80 x11vnc[4969]: 22/12/2022 19:02:25 Disabled X server key autorepeat.
Dec 22 19:02:25 hm80 x11vnc[4969]: 22/12/2022 19:02:25   to force back on run: 'xset r on' (3 times)
Dec 22 19:02:25 hm80 x11vnc[4969]: 22/12/2022 19:02:25 incr accepted_client=9 for 192.168.0.17:58992  sock=8
Dec 22 19:02:25 hm80 x11vnc[4969]: 22/12/2022 19:02:25 Client Protocol Version 3.3
Dec 22 19:02:25 hm80 x11vnc[4969]: 22/12/2022 19:02:25 Protocol version sent 3.3, using 3.3
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Got connection from client 192.168.0.17
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27   1 other clients
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Normal socket connection
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 incr accepted_client=10 for 192.168.0.17:58993  sock=10
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 client_count: 1
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Client 192.168.0.17 gone
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Statistics             events    Transmit/ RawEquiv ( saved)
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27  TOTALS              :      0 |         0/        0 (  0.0%)
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Statistics             events    Received/ RawEquiv ( saved)
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27  TOTALS              :      0 |         0/        0 (  0.0%)
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Client Protocol Version 3.3
Dec 22 19:02:27 hm80 x11vnc[4969]: 22/12/2022 19:02:27 Protocol version sent 3.3, using 3.3
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Enabling full-color cursor updates for client 192.168.0.17
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000450)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044C)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Enabling NewFBSize protocol extension for client 192.168.0.17
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044D)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000451)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044E)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Using zlib encoding for client 192.168.0.17
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Pixel format for client 192.168.0.17:
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28   32 bpp, depth 32, little endian
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Enabling full-color cursor updates for client 192.168.0.17
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000450)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044C)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Enabling NewFBSize protocol extension for client 192.168.0.17
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044D)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000451)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000044E)
Dec 22 19:02:28 hm80 x11vnc[4969]: 22/12/2022 19:02:28 Switching from zlib to zlib Encoding for client 192.168.0.17
Dec 22 19:02:29 hm80 x11vnc[4969]: 22/12/2022 19:02:29 client_set_net: 192.168.0.17  0.0031
Dec 22 19:02:34 hm80 x11vnc[4969]: 22/12/2022 19:02:34 client 10 network rate 112.6 KB/sec (6333.6 eff KB/sec)
Dec 22 19:02:34 hm80 x11vnc[4969]: 22/12/2022 19:02:34 client 10 latency:  1136.2 ms
Dec 22 19:02:34 hm80 x11vnc[4969]: 22/12/2022 19:02:34 dt1: 1.3067, dt2: 0.0046 dt3: 1.1362 bytes: 147693
Dec 22 19:02:34 hm80 x11vnc[4969]: 22/12/2022 19:02:34 link_rate: LR_DIALUP - 1136 ms, 112 KB/s

我该怎么做才能让它再次工作?

相关内容