Took me a couple of days to get remote desktop to work on my Jetson Nano. Here is a runbook in case you run into the same issues I did.
1. Install XRDP Server
Install XRDP so the Ubuntu / Jetson machine can accept Remote Desktop Protocol connections.
sudo apt update
sudo apt install xrdp
Enable and start XRDP:
sudo systemctl enable xrdp
sudo systemctl start xrdp
Check status:
sudo systemctl status xrdp
Confirm port 3389 is listening:
ss -tlnp | grep 3389
If firewall is enabled, allow RDP:
sudo ufw allow 3389/tcp
2. Install XRDP Xorg Backend
XRDP needs the Xorg backend package so it can create a remote X session.
sudo apt update
sudo apt install xorgxrdp dbus-x11 -y
3. Initial Symptom
Problem: Login worked, but after entering the password, the remote window flashed the NVIDIA logo and disappeared.
This indicated that XRDP authentication succeeded, Xorg started, but the desktop/window manager immediately exited.
4. Check XRDP Session Logs
Check the XRDP session manager log:
sudo journalctl -u xrdp-sesman -n 50 --no-pager
The important lines from the log were:
[INFO ] starting Xorg session...
[INFO ] Session started successfully for user tuna on display 10
[WARN ] Window manager exited with non-zero exit code 2
[WARN ] Window manager exited quickly (0 secs)
[INFO ] ++ terminated session: username tuna, display :10.0
This confirmed XRDP was not the main failure. The window manager / desktop environment was failing.
5. Check Xorg XRDP Log
Check the Xorg XRDP log:
cat ~/.xorgxrdp.10.log | tail -50
The key result was:
Server terminated successfully (0). Closing log file.
That meant the XRDP X server itself did not crash. The failure was still the desktop session.
6. Disable Wayland for NVIDIA / XRDP Stability
GNOME + NVIDIA + Wayland can cause XRDP login loops or immediate disconnects.
sudo nano /etc/gdm3/custom.conf
Find this line:
#WaylandEnable=false
Change it to:
WaylandEnable=false
Then reboot or restart the display manager:
sudo reboot
7. Install XFCE Desktop
GNOME can be unreliable under XRDP on Jetson/NVIDIA systems. XFCE is lighter and usually works better.
sudo apt update
sudo apt install xfce4 xfce4-goodies xorgxrdp dbus-x11 -y
8. Switch from GDM3 to LightDM
For Jetson + NVIDIA + XRDP, LightDM is usually more stable than GDM3.
sudo apt update
sudo apt install lightdm -y
If prompted, select:
lightdm
If it does not prompt, force the selection:
sudo dpkg-reconfigure lightdm
Then choose:
lightdm
Reboot:
sudo reboot
9. Set the User Session to XFCE
Create or replace the user XRDP session file:
rm -f ~/.xsession ~/.Xauthority ~/.ICEauthority
echo "startxfce4" > ~/.xsession
chmod +x ~/.xsession
10. Fix /etc/xrdp/startwm.sh
The key fix was editing XRDP’s startup script so it does not fall through to the default Xsession startup.
sudo nano /etc/xrdp/startwm.sh
Incorrect version
This was not ideal because after startxfce4 exits or fails, it continues into /etc/X11/Xsession:
if test -r /etc/profile; then
. /etc/profile
fi
if test -r ~/.profile; then
. ~/.profile
fi
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
startxfce4
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
Correct working version
Use this instead:
if test -r /etc/profile; then
. /etc/profile
fi
if test -r ~/.profile; then
. ~/.profile
fi
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
exec startxfce4
Important: The key line is exec startxfce4. Remove or comment out these fallback lines:
test -x /etc/X11/Xsession && exec /etc/X11/Xsession
exec /bin/sh /etc/X11/Xsession
11. Restart XRDP Services
After editing startwm.sh, restart XRDP:
sudo systemctl restart xrdp
sudo systemctl restart xrdp-sesman
If needed, reboot:
sudo reboot
12. Login Notes
- Use the Ubuntu/Linux username and password, for example
tuna. - Do not use Microsoft account credentials.
- If a session dropdown appears, use Xorg.
- If the same user is already logged in locally on the Jetson monitor, log out locally first before using XRDP.
13. Optional: Test With a Fresh RDP User
If the normal user profile is broken, create a clean test user:
sudo adduser rdpuser
sudo usermod -aG sudo rdpuser
Set XFCE for that user:
sudo su - rdpuser
echo "startxfce4" > ~/.xsession
chmod +x ~/.xsession
exit
Restart XRDP:
sudo systemctl restart xrdp
sudo systemctl restart xrdp-sesman
Then try logging in as rdpuser.
14. Remmina Client Resolution Fix
Once login worked, the RDP screen was tiny because XRDP negotiated a small resolution like 592x440. Since the client was Remmina on Ubuntu, set resolution in Remmina.
Recommended Remmina settings
- Open Remmina.
- Edit the Jetson/Ubuntu RDP connection.
- Go to the Basic tab.
- Set Resolution to
1920x1080. - Save and reconnect.
Other useful options:
1920x1080
1920x1200
2560x1440
Fullscreen shortcut in Remmina:
F11
15. Final Working Stack
| Component | Working Choice |
|---|---|
| RDP server | XRDP |
| XRDP backend | xorgxrdp |
| Desktop environment | XFCE |
| Display manager | LightDM |
| Session startup | exec startxfce4 in /etc/xrdp/startwm.sh |
| Client | Remmina on Ubuntu |
16. Useful Debug Commands
sudo journalctl -u xrdp -n 50 --no-pager
sudo journalctl -u xrdp-sesman -n 80 --no-pager
cat ~/.xorgxrdp.10.log | tail -50
cat ~/.xsession-errors
loginctl
ss -tlnp | grep 3389