解决Windows用vnc连接Ubuntu时出现The connection was refused by the host computer问题

问题情境:

项目服务器为Ubuntu,为了方便管理,使用vnc远程连接Ubuntu,在Ubuntu上并没有什么特殊设置,好像Ubuntu自带了vnc的相关软件,好像叫vino-什么的,反正没有详细看,然后安装了dconf-editor,这个网上有很多教程,总之配置好了之后,我在Windows上安装了vnc直接就可以远程连接Ubuntu了。但是使用了一段时间之后突然出现了这个问题The connection was refused by the host computer,一番搜索之后终于解决。

直接在shell上输入:

echo $DISPLAY
export DISPLAY=:0
dbus-launch --exit-with-session gsettings set org.gnome.Vino enabled true
dbus-launch --exit-with-session gsettings set org.gnome.Vino prompt-enabled false
dbus-launch --exit-with-session gsettings set org.gnome.Vino require-encryption false
/usr/lib/vino/vino-server

就可以了。

参考文章连接:http://askubuntu.com/questions/304017/how-to-set-up-remote-desktop-sharing-through-ssh

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值