Bootstrap

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
;