代码之家  ›  专栏  ›  技术社区  ›  Harry

紧密的VNC服务器和Gucamole

  •  -1
  • Harry  · 技术社区  · 6 年前

    我有一个虚拟机,我在其中使用以下链接安装了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
    

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

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

    enter image description here

    有人能帮我吗?

    谢谢, 哈里

    2 回复  |  直到 6 年前
        1
  •  -1
  •   Federico    6 年前

    编辑~/.vnc/xstartup文件如下:

    #!/bin/sh
    
    startxfce4 &
    

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

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

        2
  •  -2
  •   Wesley Stewart    6 年前

    您也可以尝试关闭并重新启动VNC服务器

    杀死$(pgrep Xvnc) vncserver服务器

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

    如果你没有被拒绝,至少应该和服务部门谈谈。

    推荐文章