Jetson Nano — VS Code X11 Forwarding over SSH

Muhammad Yunus
2 min readAug 5, 2021

--

X11 Forwarding over SSH in VS Code run chromium-browser from Jetson Nano

Using X11 Forwarding over SSH, we can run graphical application that exist on a remote server from a client computer. This technique quite different compared to VNC or RDP, as it only uses an SSH connection to forward X11 graphical application. Now, I want to share how to setup X11 forwarding over SSH from remote machine (Jetson Nano) in VS Code run on Windows 10 as client computer.

1. Install X11 Server in Client Computer (Windows 10)

In order to run X11 Forwarding over SSH, we must be running an X server program on Client Computer. There are several X server program available on internet, one of them is VcXsrv.

Add Windows Environment Variable

2. Setup DSPLAY variable on VS Code

  • Open VS Code and press F1
  • Search and open Preferences: Open Setting (UI)
  • Search terminal.integrated.env.windows in VS Code Setting UI
  • Click Edit in setting.js
  • Modify terminal.integrated.env.windows in setting.js to :
“terminal.integrated.env.windows”: {       “DISPLAY”: “127.0.0.1:0.0”}

3. Modify SSH Connection in VS Code

  • Press F1 and Search : Remote-SSH: Open SSH Configuration File…
  • Change your Jetson Nano SSH connection in VS Code from :
Host <YOUR_CONNECTION_NAME>HostName <YOUR_JETSON_IP>User <YOUR_JETSON_USERNAME>
  • To,
Host <YOUR_CONNECTION_NAME>HostName <YOUR_JETSON_IP>User <YOUR_JETSON_USERNAME>ForwardAgent yesForwardX11 yesForwardX11Trusted yes

4. Test X11 Forwarding in VS Code

  • Connect to Jetson Nano using modified connection in previous step,
  • Open remote terminal in VS Code, and type chromium-browser ,

--

--

Muhammad Yunus
Muhammad Yunus

Written by Muhammad Yunus

IoT Engineer, Software Developer & Machine Learning Enthusiast