linux - Tightvnc 服务器和鳄梨酱

标签 linux ubuntu vnc vnc-server tightvnc

我有一个虚拟机,我使用链接安装了 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                 :::*  

现在,从我的本地计算机,我尝试从虚拟机将端口绑定(bind)到本地计算机(根据链接 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

在我的本地计算机中,我可以看到端口绑定(bind)到 5901

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

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

enter image description here

有人可以帮我解决这个问题吗?

谢谢, 哈里

最佳答案

编辑 ~/.vnc/xstartup 文件:

#!/bin/sh

startxfce4 &

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

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

关于linux - Tightvnc 服务器和鳄梨酱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53328028/

相关文章:

android - 获取adb版本失败;在 Ubuntu 11.10 中错误 = 13

python - Ubuntu 14.04 : python can't import module pydot

具有多个显示器的 VNC 查看器

raspberry-pi - 树莓派 VNC 连接失败

linux - 递归更改目录中文件的权限

c - 相当于 shell bash 中的 "(cond)? val_true : val_false"

ruby-on-rails - Nginx、Puma、Ubuntu 20.04 错误 111 : Connection refused

c -/net/ipmr.c中的MFC_HASH

linux - 在 bash 中从文件中读取并执行带空格的行

vnc - noVNC 多个本地主机服务器