概述
解决方法:
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 connection was refused by the host computer所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复