NVIDIA Jetson Nano P3450 Setup: Writing image, Setting up the mirror site for apt and Remote desktop sharing.
Today, we are going to go over three main sections: 1. Writing image 2. Setting up the mirror site for apt 3. Remote desktop sharing.
Things to start
- NVIDIA Jetson Nano Developer Kit (Required).
- Micro SD Card. 32GB and above recommended (Required).
- Micro USB power supply 5V 2A (Required).
- HDMI or DP computer display.
- HDMI or DP cable.
- Networking cable or WLAN card.
- SD Card-reader.
- USB keyboard and mouse.
- Computer.
Write Image for Jetson Nano
- Download Etcher, a program used for flashing OS images to SD cards. Remember to select the correct platform. https://www.balena.io/etcher/
2. Download the Jetson Nano image from NVIDIA Developer. It should be a zip document around 6.5GB.
https://developer.nvidia.com/jetson-nano-sd-card-image.
3. Insert SD Card to the computer by a SD Card reader. The SD Card I chose is Samsung EVO Plus 64GB.
4. Open Etcher. Click "Select Image" and choose the Jetson Nano image downloaded from NVIDIA Developer. Then click "Select Drive" and choose the inserted SD Card. Click "Flash" and then wait.
5. Writing system image is finished! For more information, go here https://developer.nvidia.com/embedded/learn/get-started-jetson-nano-devkit#write
Set Up the Hardware
- Unbox the Jetson Nano.
2. It's recommend to have a protective case for Jetson Nano, so that it will not short-circuited. I don't have one, so I will just place my Jetson Nano on the box.
3. Plug in the power cord. Connect the Jetson Nano with the computer display with a HDMI or DP cable. Connect the Jetson Nano with router. Connect USB keyboard and mouse.
4. Finally, insert the microSD Card on the underside of the Jetson Nano.
It’s all set! Waite for the monitor to display!
Complete System Configuration
- The first time entering the system, follow the system to set up the system , such as language and location.
After completing the system configuration, a fancy desktop of NVIDIA will appear.
Set up the Mirror Site for Advanced Package Tool (APT)
If you don't need a mirror site, you can jump to the next section. If your network cannot connect to www.ubuntu.com very well, it's very likely that you need a mirror site.
- Open the terminal and enter following command:
sudo gedit /etc/apt/sources.list
2. Enter computer password.
3. The following document will be opened.
4. Copy all the lines from this document into another document. In the future, when mirror site is not needed, you may want have those lines to restore the source site.
5. After backup the lines, delete all of them. Copy and paste the following site sources into the document. This is a mirror site from Tsinghua University. It works great only if your network is in China. If you are not in China, use this link to check out the best mirror site for your location. https://launchpad.net/ubuntu/+archivemirrors
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-security main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-updates main multiverse restricted universe
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ bionic-backports main multiverse restricted universe
6. After replacing the mirror site, remember to save it.
7. Run the following command in terminal to update the Advanced Package Tool (APT).
sudo apt-get update
If the terminal downloads things fast without giving any connection errors, it means your mirror site is all set and it works great!
Set Up Remote Desktop Sharing
Connect Jetson Nano to a computer display every time when we use it is not really convenient. VNC Viewer can help.
- Run the following command in Jetson Nano terminal to install Vino.
sudo apt install vino
2. Edit org.gnome.Vino.gschema.xml.
sudo vi /usr/share/glib-2.0/schemas/org.gnome.Vino.gschema.xml
3. A xml document will be opened in terminal.
4. Press "I" to enter INSERT mode. "-- INSERT --" should be shown at the bottom.
5. Add the following code to the end of the document.
<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>
6. The document should look like this after the code is added.
7. Press the ESC button to quit INSERT mode. Then type ":wq" to save the document.
For more information about vim commands, go here https://coderwall.com/p/adv71w/basic-vim-commands-for-getting-started
8. Run following command to compile.
sudo glib-compile-schemas /usr/share/glib-2.0/schemas
9. Install dconf-editor.
sudo apt-get install dconf-editor
10. Open dconf-editor.
dconf-editor
Following window will be opened.
11. Click “I’ll be careful” and go to “org →gnome →desktop →remote-access”. Turn on “enabled” and “notify-on-connect”, Turn off “prompt-enabled” and “require-encryption”.
12. Go back to the desktop. Open System Settings.
13. Click Desktop Sharing. Select "Allow other users to view your desktop" and "Allow other users to control your desktop". For security, select "Require the user to enter this password". Set a password you want. This password will be used later to verify your identity.
14. Close the window and return to the terminal. Run following command to start vino. Do not close this terminal window, vino-server is running.
/usr/lib/vino/vino-server
15. Download the VCN Viewer on the computer that you want to use to remotely control Jetson Nano. https://www.realvnc.com/en/connect/download/viewer/
16. In Jetson Nano, open a new terminal window and run following command to see IP address.
ifconfig
Here is an explanation on which one is the IP address from NVIDIA. https://forums.developer.nvidia.com/t/jetson-nano-vnc-headless-connections/77399
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).
17. Open the VCN Viewer and enter your IP address to connect. The following warning will appear. Just lick “Continue”.
18. Enter the password you set previously.
All set! Now you can remote control your Jetson Nano!
If you have any questions or suggestions, feel free to contact me. My email address: yzhong506@gmail.com