Provided OS Image for Nvidia Jetson Nano has Ubuntu 18.04 with Ubuntu Unity as Desktop Environment. Although it provides a more-user friendly and nice-looking interface, memory load is high. Considering the limited RAM (4GB) and the fact that many use cases do not require desktop environment, replacing Ubuntu Unity Desktop with a simpler but more memory-efficient one can save you around ~1GB RAM.
As I am going to explain in this post, using LXDE based desktop environment reduces the startup memory consumption from 1.4 GB to around 0.4 GB.
In this post, I am going to show how to convert Ubuntu Unity Desktop Environment to LXDE based Lubuntu Desktop.
I assume that you have already installed Ubuntu 18.04 on Jetson Nano and you are able to ssh to it. After you ssh to your machine:
sudo apt remove --purge ubuntu-desktop
Install lxdm display manager. It may prompt a dialog to choose a display manager. Choose lxdm
sudo apt install lxdm
Remove Ubuntu Unity's default display manager gdm3
sudo apt remove --purge gdm3
Ubuntu 18.04 do not have Lubuntu-desktop as a package in repo. That's why, Install LXDE desktop environment if you have 18.04.
sudo apt install lxde
For 18.10 and above you can install Lubuntu-desktop by
sudo apt install lubuntu-desktop
It is recommended to reinstall lxdm to reconfigure for lubuntu-desktop
sudo apt install --reinstall lxdm
After reboot, you will notice that a new login screen and a new desktop environment will welcome you if your Jetson Nano is connected to a display. If you run top or htop, the memory consumption will look like 400M.
Configuring VNC for LXDE
It is also possible to use LXDE when you do Remote Desktop to your Jetson Nano. It is enough to update xstartup file in ~/.vnc by commenting /etc/X11/Xsession and adding /usr/bin/startlxde . My xstartup file is as follows (Note that I use tightvncserver ):
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# Fix to make GNOME work