Setting Up VNC

This guide explains how to enable and configure VNC on Jetson for remote desktop access. It includes setup steps for Jetson Nano and TX2 NX, along with connection instructions for Windows, macOS, and Linux clients.

Principle

What is VNC?

VNC (Virtual Network Computing) enables you to control your Jetson Developer Kit from another computer on the same network by viewing and interacting with the Developer Kit's desktop from the other computer. To learn more about VNC, click here.

Your Jetson Developer Kit and the other computer need to be on the same network. A fairly fast network connection is required. A slower connection will degrade the desktop interaction experience.

Setting Up the VNC Server on Jetson Nano

  1. Make the VNC server start every time you log in

    If you have a Jetson Nano 2GB Developer Kit (running LXDE):

    mkdir -p ~/.config/autostart
    cp /usr/share/applications/vino-server.desktop ~/.config/autostart/.
    

    For all other Jetson Developer Kits (running GNOME):

    cd /usr/lib/systemd/user/graphical-session.target.wants
    sudo ln -s ../vino-server.service ./.
    
  2. Configure the VNC server

    gsettings set org.gnome.Vino prompt-enabled false
    gsettings set org.gnome.Vino require-encryption false
    
  3. Set a password to access the VNC server

    # Replace thepassword with your desired password
    gsettings set org.gnome.Vino authentication-methods "['vnc']"
    gsettings set org.gnome.Vino vnc-password $(echo -n 'thepassword'|base64)
    
  4. Restart the system for the settings to take effect

    sudo reboot
    

    The VNC server is only available after you log in to Jetson locally. If you want the VNC to be available automatically, use the System Settings app on the Developer Kit to enable automatic login.

Setting Up the VNC Server on Jetson TX2 NX

When there is no display, you need to use remote desktop login to access the desktop of Jetson TX2 NX. (It is recommended to use a display as VNC has a certain delay)

Jetson TX2 NX uses vino as the default VNC server, but the default settings need to be modified.

  1. Configure the VNC Server

    gsettings set org.gnome.Vino require-encryption false
    gsettings set org.gnome.Vino prompt-enabled false
    gsettings set org.gnome.Vino authentication-methods "['vnc']"
    gsettings set org.gnome.Vino lock-screen-on-disconnect false
    gsettings set org.gnome.Vino vnc-password $(echo -n "mypassword"|base64)
    
    • Note that you should not run the above commands with sudo, and "mypassword" is the password for connecting to VNC.
  2. Set the desktop to start automatically at boot, and create a new autostart file in the .config directory

    mkdir -p .config/autostart
    sudo vim ~/.config/autostart/vino-server.desktop
    
  3. Check which display manager is currently in use

    cat /etc/X11/default-display-manager
    
  4. Edit the file

    sudo vim /etc/gdm3/custom.conf
    
  5. Uncomment the following three lines, and modify the AutomaticLogin line to your own username.

    WaylandEnable=false
    AutomaticLoginEnable = true
    AutomaticLogin = waveshare
    
  6. Restart Jetson TX2 NX

    sudo reboot
    

Connecting to the VNC Service from Another Computer

You need to know the IP address of your Jetson Developer Kit to connect from another computer. Run the ifconfig command on your Developer Kit and note down the IP address assigned to the eth0 interface (if using Ethernet), wlan0 interface (if using wireless), or l4tbr0 (if using USB device mode Ethernet connection).

Windows

  • Step 1: Download and install VNC Viewer from here
  • Step 2: Launch VNC Viewer and enter the IP address of your Developer Kit
  • Step 3: Provide the VNC password if you have configured the VNC server for authentication

macOS

The example below uses the Screen Sharing app that comes with macOS. However, any vnc client you prefer should also work fine.

  • Step 1: Open Finder and select Go | Go to Folder from the menu bar.
  • Step 2: Enter "/System/Library/CoreServices/Applications" and click Go
  • Step 3: Open the app named Screen Sharing and enter the connection information. For example: username@
  • Step 4: Click Connect.
  • Step 5: Provide the VNC password if you have configured the VNC server for authentication.

Linux

The example below uses gvncviewer, but any vnc client you prefer should also work fine. A popular alternative is remmina.

  • Step 1: Install gvncviewer by executing the following commands:

    sudo apt update
    sudo apt install gvncviewer
    
  • Step 2: Launch gvncviewer

    gvncviewer 
    
  • Step 3: Provide the VNC password if you have configured the VNC server for authentication

These instructions can also be found in the README-vnc.txt file on the L4T-README volume included in the system image. You can access the contents of this volume by mounting it on the Developer Kit.

The volume can also be accessed from other computers via the Developer Kit's USB device mode feature:

  • Power on your Developer Kit
  • Connect another computer to the Micro-USB port of your Developer Kit (the front USB-C connector if it is a Jetson AGX Xavier Developer Kit)
  • The L4T-README volume will be mounted on the other computer, including files such as README-vnc.txt.

Was this article helpful?

TOP