Jetson系列(Xavier/Nano/NX...)搭建VNC Server配置

在Jetson上搭建一个VNC服务器,从而允许其他设备通过网络访问Jetson的Linux图形界面进行远程工作,并避免了连接HDMI显示器、USB键盘或鼠标的需要。
如下时搭建VNC服务器的过程,搭建完成后即可通过ViewVNC进行远程访问:

步骤一、安装vino
$sudo apt update 
$sudo apt install vino
步骤二、Enable VNC 服务 (此时手动可打开vnc server)
每次登陆时使能VNC Server:
sudo ln -s ../vino-server.service   /usr/lib/systemd/user/graphical-session.target.wants
配置VNC server:
$gsettings set org.gnome.Vino prompt-enabled false
$gsettings set org.gnome.Vino require-encryption false
额外添加并手工启动VNC Service:
-1) Edit the org.gnome.Vino schema to restore the missing "enabled" parameter
$sudo vi /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml  
Add this key: (最后)
    <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>

-2) Compile the schemas for Gnome:
$sudo glib-compile-schemas /usr/share/glib-2.0/schemas

-3) Now the screen sharing panel in unity-control-center works... but this is not enough to get vino running! So you need to add in the programs at session start: Vino-server with the following command line:
$/usr/lib/vino/vino-server
步骤三、设置VNC登陆密码('12345678' 修改为自己的密码)
$gsettings set org.gnome.Vino authentication-methods "['vnc']"
$gsettings set org.gnome.Vino vnc-password $(echo -n '12345678'|base64)
步骤四、重启机器,验证是否设置vnc 成功
$sudo reboot
步骤五、设置开机自启动VNC Server

The VNC server is only available after you have logged in to Jetson locally. If you wish VNC to be available automatically, use the system settings application to enable automatic login.

$gsettings set org.gnome.Vino enabled true 

$mkdir -p ~/.config/autostart
$vi  ~/.config/autostart/vino-server.desktop

[Desktop Entry]
Type=Application
Name=Vino VNC server
Exec=/usr/lib/vino/vino-server
NoDisplay=true

保存

连接VNC Server

Use any standard VNC client application to connect to the VNC server that is running on Linux for Tegra. Popular examples for Linux are gvncviewer and remmina. Use your own favorite client for Windows or MacOS.

To connect, you will need to know the IP address of the Linux for Tegra system. Execute the following command to determine the IP address:

$ifconfig

Search the output for the text "inet addr:" followed by a sequence of four
numbers, for the relevant network interface (e.g. eth0 for wired Ethernet,
wlan0 for WiFi, or l4tbr0 for the USB device mode Ethernet connection).


设置显示桌面分辨率Setting the Desktop Resolution

如果没有显示器连接,默认VNC 连接后的分辨率为640x480 ,通过修改添加如下内容,将其默认VNC分辨率设置

$sudo vi /etc/X11/xorg.conf 

Section "Screen"
   Identifier    "Default Screen"
   Monitor       "Configured Monitor"
   Device        "Tegra0"
   SubSection "Display"
       Depth    24
       Virtual 1920 1080 # Modify the resolution by editing these values
   EndSubSection
EndSection

参考:
L4T-README/README-vnc.txt

QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空