Real VNC can't Connect 连不上

本文介绍了当RealVNCviewer无法连接到x11vnc服务端时的故障排查及解决办法。通过检查日志文件定位问题原因,并利用x11vnc命令断开旧连接,最终成功解决连接失败的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Real VNC can’t Connect 连不上

标签(空格分隔): linux


Ubuntu 14.04 Linux的SSH已经很好用了,但是由于一些图形取钱,经常需要看到Linux的桌面。所以装了VNC,客户端是Real VNC viewer,服务端是x11vnc。

有时忘了关机器,Real VNC viewer就一直连不上,症状就是下面的,黑屏(其实是灰的):

vnc连接故障

重启机器就好了。但是有时做计算的时候,刚算了一半,不能重启,于是想解决这个问题。

  1. 查看vnc的Log:
tail -100 /var/log/x11vnc.log

看到似乎有个Client一直是连上的,有一个Client Session,所以阻止新的Client连上来。

  1. 使用VNC的命令查询连接的客户端:
x11vnc -Q clients
netstat -anp |grep 5900

也证实了的确有客户端还连接的。

  1. 使用VNC的命令disconnect所有客户端:
x11vnc -R disconnect:all

Voila!!!!

我的VNC桌面

给我翻译To set up VNC on Debian, you can follow these steps: Install a desktop environment if you haven't already done so. For example, you can install GNOME by running the command sudo apt-get install gnome-core. Install the VNC server software. One popular option is TigerVNC. You can install it by running the command sudo apt-get install tigervnc-standalone-server. Configure the VNC server. You can do this by creating a configuration file in the directory /etc/systemd/system. For example, you can create a file called vncserver@.service with the following contents: 复制 [Unit] Description=Start TigerVNC server at startup After=syslog.target network.target [Service] Type=forking User=%i ExecStart=/usr/bin/vncserver :1 -geometry 1280x800 -depth 24 -dpi 96 ExecStop=/usr/bin/vncserver -kill :1 [Install] WantedBy=multi-user.target This configuration will start the VNC server on display 1 with a resolution of 1280x800, a color depth of 24 bits, and a DPI of 96. You can modify these settings to suit your needs. Enable and start the VNC server. You can do this by running the following commands: 复制 sudo systemctl enable vncserver@:1.service sudo systemctl start vncserver@:1.service This will enable the VNC server to start automatically at boot time, and start the server immediately. Connect to the VNC server. You can use any VNC client software to connect to the server. For example, you can use RealVNC or TightVNC. Just enter the IP address of the Debian machine and the display number (in this case, :1) to connect.
06-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值