解决方法:
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
- Install gnome-session-flashback:
$ sudo apt install gnome-session-flashback
- 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内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复