NVIDIA Jetson working

Jetson 配置VNC访问(Xavier/Nano/NX...

2020-06-10  本文已影响0人  童年雅趣

A VNC server allows access to the graphical display of a Linux for Tegra system over the network. This allows you to work physically remote from the Linux for Tegra system, and avoids the need to connect an HDMI display, USB keyboard, or mouse.
All commands specified below should be executed from a terminal on the Linux for Tegra system. This could be a serial port, an SSH session, or a graphical terminal application running on the HDMI display.
It is expected that the VNC server software is pre-installed. Execute thefollowing commands to ensure that it is:

步骤一、安装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登陆密码('thepassword' 修改为自己的密码)
$gsettings set org.gnome.Vino authentication-methods "['vnc']"
$gsettings set org.gnome.Vino vnc-password $(echo -n 'thepassword'|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 1280 720 # Modify the resolution by editing these values
EndSubSection
EndSection

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

上一篇下一篇

猜你喜欢

热点阅读