我是靠谱客的博主 紧张含羞草,这篇文章主要介绍VNC连接失败:The connection was refused by the host computer,现在分享给大家,希望可以做个参考。

解决方法:

1.用Xshell登陆自己的服务器

在这里插入图片描述

2.在命令行中输入vncserver,命令行中出现:

Warning: optimal6:2 is taken because of /tmp/.X2-lock

Remove this file if there is no X server optimal6:2

在命令行中输入:


rm  /tmp/.X2-lock

在ubuntu20.04 中配置 vncserver

  1. Install gnome-session-flashback:

$ sudo apt install gnome-session-flashback

  1. Add this to ~/.vnc/xstartup:

#!/bin/sh
autocutsel -fork
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP=“GNOME-Flashback:Unity”
export XDG_MENU_PREFIX=“gnome-flashback-”
unset DBUS_SESSION_BUS_ADDRESS
gnome-session --session=gnome-flashback-metacity --disable-acceleration-check --debug &

在macos中配置 vncviewer

在这里插入图片描述

连接完成,即可在vncviewer 中显示 ubuntu 桌面

最后

以上就是紧张含羞草最近收集整理的关于VNC连接失败:The connection was refused by the host computer的全部内容,更多相关VNC连接失败:The内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(58)

评论列表共有 0 条评论

立即
投稿
返回
顶部