Jetson Nano vnc/headless connections

I am currently trying to use a Jetson Nano Ubuntu 18.04 without a monitor by using NoMachine software but it consumes a lot of processing power (approximately 20-30% of each CPU core) and causes my deep learning model predictions to slow down when I want to see the output on the screen. I am trying to use vnc4server on it however vnc4server doesn’t start and gets terminated immediately despite creating xstartup. Another problem is that Jetson requires a HDMI to be plugged in for the NoMachine software to display the screen or else it shows a blank screen.

  • What would be the best alternative for NoMachine which is lightweight as well?
  • How to overcome the HDMI plug condition to display on VNC ?
1 Like

Please check this document. Not sure if you could see this when nano device mode is on.

=======================================================================
                            README-vnc
                          Linux for Tegra
               Configuring VNC from the command-line
=======================================================================

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.

----------------------------------------------------------------------
Installing the VNC Server
----------------------------------------------------------------------

It is expected that the VNC server software is pre-installed. Execute the
following commands to ensure that it is:

sudo apt update
sudo apt install vino

----------------------------------------------------------------------
Enabling the VNC Server
----------------------------------------------------------------------

Execute the following commands to enable the VNC server:

# Inform the system which graphic display to interact with
export DISPLAY=:0
# Enable the VNC server
gsettings set org.gnome.Vino enabled true
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
# Reboot the system so that the settings take effect
sudo reboot

----------------------------------------------------------------------
Connecting to the 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).

Once you are connected to the VNC server, execute the following command to
display the VNC server's graphical configuration tool, and then configure a
password for the VNC connection:

vino-preferences
1 Like

Hi, I got vnc4server running on Jetson Nano. How do I need to change the xstartup file so that I can get the desktop rather than the gray screen? Also, on NoMachine only if a HDMI cable is plugged in the display slot it loads the desktop even without being connected to a monitor.

I create a file name ~/openvino at Jetson Nano

#!/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
/usr/lib/vino/vino-server &
$ chmod +x ~/openvino
$ ~/openvino

Then at my ubuntu host, I activate Remmina

Group = WORKGROUP
Protocol = VNC
Server = 192.168.55.1
Username = suryadi
Password = ***

Now, I can remote desktop to Jetson Nano.

A litte bit sluggish. It is better than nothing.
Thank you.

Nice! Thanks for sharing!

Mine keeps hanging at “Connecting…” screen. I am running in Headless mode and interacting with it via JupyterLab. What is username and password for the vnc connection? I am using the DLINano Image, and log jupyter shell kernel:

dlinano@jetson-nano:~$ hostname
jetson-nano
dlinano@jetson-nano:~$ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:04:4b:e6:26:6d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 148  base 0xe000

l4tbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.55.1  netmask 255.255.255.0  broadcast 192.168.55.255
        inet6 fe80::1  prefixlen 128  scopeid 0x20<link>
        inet6 fe80::3cc6:92ff:fe96:1cf9  prefixlen 64  scopeid 0x20<link>
        ether e2:e8:03:ec:79:35  txqueuelen 1000  (Ethernet)
        RX packets 1848  bytes 345766 (345.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3358  bytes 1349967 (1.3 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 1540  bytes 154095 (154.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1540  bytes 154095 (154.0 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

rndis0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::e0e8:3ff:feec:7935  prefixlen 64  scopeid 0x20<link>
        ether e2:e8:03:ec:79:35  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::e0e8:3ff:feec:7937  prefixlen 64  scopeid 0x20<link>
        ether e2:e8:03:ec:79:37  txqueuelen 1000  (Ethernet)
        RX packets 1848  bytes 345766 (345.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3384  bytes 1400209 (1.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 50:3e:aa:ce:c6:29  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

dlinano@jetson-nano:~$ 01/10/2019 01:20:15 PM rfbProcessClientInitMessage: client gone
01/10/2019 01:20:15 PM Client _gateway gone
01/10/2019 01:20:15 PM Statistics:
01/10/2019 01:20:15 PM   framebuffer updates 0, rectangles 0, bytes 0
01/10/2019 01:20:33 PM [IPv4] Got connection from client _gateway
01/10/2019 01:20:33 PM   other clients:
01/10/2019 01:20:33 PM Client Protocol Version 3.3
Error while displaying notification bubble: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files

And server start log:

dlinano@jetson-nano:~$ /usr/lib/vino/vino-server &
[1] 7983
dlinano@jetson-nano:~$
** (vino-server:7983): WARNING **: 02:09:46.469: Your XServer does not support the XTest extension - remote desktop access will be view-only

02/10/2019 02:09:46 AM Autoprobing TCP port in (all) network interface
02/10/2019 02:09:46 AM Listening IPv6://[::]:5900
02/10/2019 02:09:46 AM Listening IPv4://0.0.0.0:5900
02/10/2019 02:09:46 AM Autoprobing selected port 5900
02/10/2019 02:09:46 AM Advertising security type: 'TLS' (18)
02/10/2019 02:09:46 AM Re-binding socket to listen for VNC connections on TCP port 5900 in (all) interface
02/10/2019 02:09:46 AM Listening IPv6://[::]:5900
02/10/2019 02:09:46 AM Listening IPv4://0.0.0.0:5900
02/10/2019 02:09:46 AM Clearing securityTypes
02/10/2019 02:09:46 AM Advertising security type: 'TLS' (18)
02/10/2019 02:09:46 AM Clearing securityTypes
02/10/2019 02:09:46 AM Advertising security type: 'TLS' (18)
02/10/2019 02:09:46 AM Advertising authentication type: 'No Authentication' (1)
02/10/2019 02:09:46 AM Re-binding socket to listen for VNC connections on TCP port 5900 in (all) interface
02/10/2019 02:09:46 AM Listening IPv6://[::]:5900
02/10/2019 02:09:46 AM Listening IPv4://0.0.0.0:5900
02/10/2019 02:09:46 AM Clearing securityTypes
02/10/2019 02:09:46 AM Clearing authTypes
02/10/2019 02:09:46 AM Advertising security type: 'TLS' (18)
02/10/2019 02:09:46 AM Advertising authentication type: 'No Authentication' (1)
02/10/2019 02:09:46 AM Advertising security type: 'No Authentication' (1)
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password $(echo -n 'dlinano'|base64)
gsettings set org.gnome.settings-daemon.plugins.sharing active true

This seems to work, but I got black screen when I logged on. Probably due to incorrect setting of $DISPLAY variable. I reboot and start the server with this command:

/usr/lib/vino/vino-server --display=:0 &

It works but the screen is too small. I followed this guide to make the screen to usable size:

Conclusion

Guide for VNC on the DLINANO image is very inaccurate and needs to be updated.

There might be problem ,when you turn on screen share option in Nvidia ,which can be fixed by following the instruction in this link: https://github.com/Aravindseenu/Nvidia-jetson-VNC-remote-access

1 Like

I followed the commands that WayneWWW posted above (2nd post). I installed the VNC to Jetson Nano, but when I try to connect through VNC from my laptop, it refuses. What should I do?

Any idea???

@suryadi @kayccc @
Don’t you face the problem of the zoomed screen when you take remote from vnc viewer on the very first time jetson start?

My workaround:
I have set up the remote access for vnc, but when I take remote without attaching HDMI to jetson, the remote gets zoom and when I attach the HDMI display it gets required resolution. If you know why is this happening, then please let me know. I don’t want to attach HDMI at every time jetson boot.

Please help to open a new topic for your issue. Thanks