我已经尝试过几种解决方案。但没有一个专门针对 Kubuntu 22.04。我尝试了所有方法,但最接近有效的方法是使用 socat 将 tcp 套接字连接到 unix 套接字。
我的 ubuntu 系统是在 Fedora 25 Linux 上运行的 vmware VM。
应用 socat 后,我可以成功在虚拟机显示屏上打开 xterm:
xterm -display 127.0.0.1:0
但
xterm -display 172.16.82.172:0 (where this is the IP address of the vm)
产量
2023/12/31 17:02:30 socat[3667] N accepting connection from AF=2 172.16.82.172:47228 on AF=2 172.16.82.172:6000
2023/12/31 17:02:30 socat[3667] N forked off child process 4778
2023/12/31 17:02:30 socat[3667] N listening on AF=2 0.0.0.0:6000
2023/12/31 17:02:30 socat[4778] N opening connection to AF=1 "/tmp/.X11-unix/X0"
2023/12/31 17:02:30 socat[4778] N successfully connected from local address AF=1 "\xEE\xEE\xEE\xEE\xEE\xEE"
2023/12/31 17:02:30 socat[4778] N starting data transfer loop with FDs [6,6] and [5,5]
Authorization required, but no authorization protocol specified
xterm: Xt error: Can't open display: 172.16.82.172:0
2023/12/31 17:02:30 socat[4778] N socket 1 (fd 6) is at EOF
2023/12/31 17:02:30 socat[4778] N socket 2 (fd 5) is at EOF
2023/12/31 17:02:30 socat[4778] N exiting with status 0
westall@kubuntu-22:~$ 2023/12/31 17:02:30 socat[3667] N childdied(): handling signal 17
有人知道指定授权协议的方法吗?