Ubuntu18 远程桌面 VNC-Server 配置[亲测]

①安装vino
sudo apt update
sudo apt install vino

②设Enable VNC 服务

sudo ln -s ../vino-server.service   /usr/lib/systemd/user/graphical-session.target.wants
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
sudo  nano  /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml

结尾处加入下面这段内容:

<key name='enabled' type='b'>
   <summary>Enable remote access to the desktop</summary>
   <description>
        If true, allows remote access to the desktop via the RFB
        protocol. Users on remote machines may then connect to the
        desktop using a VNC viewer.
   </description>
   <default>false</default>
</key>

③设置为Gnome编译模式
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
在这里插入图片描述
在这里插入图片描述
sudo gedit ~/openvino

#!/bin/bash
export DISPLAY=:0
gsettings set org.gnome.Vino enabled true
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
xrandr --fb 1280x1024
/usr/lib/vino/vino-server &

sudo chmod +x ~/openvino

./openvino
在这里插入图片描述
如果这样则
sudo apt-get install dconf-editor
运行里输入dc
打开dcconf 关闭下面的选项就可以了
在这里插入图片描述
记得打开5900端口
apt install ufw
ufw enable
ufw allow 5900

分辨率

gedit /etc/X11/xorg.conf

Section "Screen"
   Identifier    "Default Screen"
   Monitor       "Configured Monitor"
   Device        "Tegra0"
   SubSection "Display"
       Depth    24
       Virtual 1280 800 # 改为自己需要的分辨率
   EndSubSection
EndSection
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值