Tightvnc服务器和Guacamole

我有一个VM,我在其中使用以下链接安装了VNC服务器(TightVNC):https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04

它安装成功,我可以看到端口5901正在运行

/etc/tigervnc$ netstat -tulpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:5901          0.0.0.0:*               LISTEN      16460/Xtigervnc     
tcp        0      0 127.0.0.1:5902          0.0.0.0:*               LISTEN      16183/Xtigervnc     
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                   
tcp6       0      0 ::1:5901                :::*                    LISTEN      16460/Xtigervnc     
tcp6       0      0 ::1:5902                :::*                    LISTEN      16183/Xtigervnc     
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
tcp6       0      0 ::1:631                 :::*                    LISTEN      -                   
udp        0      0 0.0.0.0:36618           0.0.0.0:*                           -                   
udp    29184      0 127.0.0.53:53           0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:68              0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:631             0.0.0.0:*                           -                   
udp     7680      0 0.0.0.0:5353            0.0.0.0:*                           -                   
udp6       0      0 :::37372                :::*                                -                   
udp6   20736      0 :::5353                 :::*  

现在从我的本地机器,我尝试从VM端口绑定到我的本地(根据链接https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04)

ssh -L 5901:127.0.0.1:5901 -C -N -l test 172.1.1.1

在我的本地机器上,我能看到端口被绑定到5901

/etc/guacamole$ fuser 5901/tcp
5901/tcp:            22049

现在,当我尝试使用127.0.0.1:5901进行VNC连接时,它会提示VM密码并仅显示空白页面。

enter image description here

有人可以帮我吗?

谢谢,天

-1
投票

编辑你的〜/ .vnc / xstartup文件:

#!/bin/sh

startxfce4 &

我有同样的问题,这解决了它

作为参考我从这里得到它:https://www.raspberrypi.org/forums/viewtopic.php?t=52557

-2
投票

您还可以尝试终止并重新启动VNC服务器

kill $(pgrep Xvnc)vncserver

您是否尝试从本地计算机到本地计算机的VNC?我假设只是为了测试正确吗?

如果你没有得到拒绝,至少应该与服务商谈。