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 ?
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
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.
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:~$ /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.
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?
@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.
Moreover, when I add these lines to the openvino script, it throws authentication errors
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password "<my_pswd>"
gsettings set org.gnome.settings-daemon.plugins.sharing active true
On using @suryadi 's solution, I get an error that it cannot connect the the display when my HDMI port is open (no screen connected). I tried to fix it with XVFB which is a virtual display buffer. Now, it shows a black screen.
My Openvino script is as follows:
#!/bin/bash
export DISPLAY=:1
Xvfb :1 -screen 0 1024x768x16
gsettings set org.gnome.Vino enabled true
gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino require-encryption false
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino vnc-password "<my_pswd>"
gsettings set org.gnome.settings-daemon.plugins.sharing active true
/usr/lib/vino/vino-server &
I connect my jetsonNano to ubuntu laptop using just ethernet cable with IP 10.42.0.x and have successfully used vncserver for desktop sharing: Screenshot-from-2021-01-31-22-36-26 — ImgBB
I used vncserver instead of vino-server following the step:
Connect JN to laptop using ethernet cable and use putty to enter SSH
in SSH, install vncserver as well as viewer:
sudo apt install tightvncserver && sudo apt instsall xtightvncviewer
then run cmd “vncserver” to enter password
edit file xstartup:
sudo nano ~/.vnc/xstartup
then add 3 lines and save:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startlxde &
reboot JN and enter SSH again, then start vncserver and viewer:
vncserver
xtightvncviewer (enter hostname:x and pwd)
Then enjoy using remote desktop of JN with only ethernet cable :))
@hxn130599
Thank you for sharing!
However, your implementation probably also requires a display conencted to the jetson nano, so it would not run if the display is disconencted by the time the jetson nano boots?
otherwise?
I’ve tried use @suryadi 's solution but I’m still stuck…
When I launch openvino, this is what appears:
No protocol specified
Unable to init server: Could not connect: Connection refused
Cannot open display:
Run ‘vino-server --help’ to see a full list of available command line options