sudo apt install vino

好像Jetpack 5.0中已经自带了。。

配置VNC server:

gsettings set org.gnome.Vino prompt-enabled false

gsettings set org.gnome.Vino require-encryption false

编辑org.gnome,增加一个“enabled key”的参数:

cd /usr/share/glib-2.0/schemas

sudo cp org.gnome.Vino.gschema.xml org.gnome.Vino.gschema.xml.old

sudo vi org.gnome.Vino.gschema.xml

Enable remote access to the desktopIf true, allows remote access to the desktip via the RFBprotocol. Users on remote machines may then connect to thedesktop using a VNC viewer.false

编译:

sudo glib-compile-schemas /usr/share/glib-2.0/schemas

手工启动vnc-server:

/usr/lib/vino/vino-server

Step 0:在设置中打开屏幕共享,并且打开自动登录

Settings → Sharing → Screen Sharing → set ‘Active’

Step 1:安装xserver-xorg-video-dummy

$ sudo apt update

$ sudo apt install xserver-xorg-video-dummy

Step 2:创建虚拟显示器

$ cd/etc/X11$ sudo vim xorg.conf.dummy

Step3:xorg.conf.dummy中添加如下配置(下面1920×1080的配置)

jetsonorin系列虚拟显示配置文件资源-CSDN文库文件

Section "Device" Identifier "DummyDevice" Driver "dummy" VideoRam 256000EndSection Section "Screen" Identifier "DummyScreen" Device "DummyDevice"Monitor "DummyMonitor" DefaultDepth 24SubSection "Display"Depth 24Modes "1920x1080_60.0"EndSubSectionEndSectionSection "Monitor"Identifier "DummyMonitor"HorizSync 30-70VertRefresh 50-75ModeLine "1920x1080" 148.50 1920 2448 2492 2640 1080 1084 1089 1125 +Hsync +VsyncEndSection

Step 4: 替换 /etc/X11/xorg.conf

$ cpxorg.conf xorg.conf.backup

$ cpxorg.conf.dummy xorg.conf

Step 5: 重启

$sudo reboot

1、如果想恢复hdmi的硬件显示,需要恢复配置然后reboot

cpxorg.conf.backup xorg.conf

2、如果window平台连不上提示server did not offer supported security type

gsettings set org.gnome.Vino prompt-enabled false

gsettings set org.gnome.Vino require-encryption false