Jetson Nano — VS Code X11 Forwarding over SSH
2 min readAug 5, 2021
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.
- Download latest VcXsrv from release page here, https://github.com/ArcticaProject/vcxsrv/releases
- Install & Run VcXsrv in our Client Computer
- Add Windows Environment Variable :
DISPLAY = localhost:0.0
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
insetting.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
,