How to set a X11 server for display the remote GUI app
井民全, Jing, mqjing@gmail.com
LT;DR
1. Setup the local host (Windows)
[Host] VSCode in Windows
Step 1: Enable the ssh remote forward
In vscode extension [ssh remote], open the config
E.g.
Step 2: Install a X server
I choose the MobaXterm.
Step 3: Start the MobaXterm, and wait
2. Setup the Guest (Linux)
[Guest] Setup the Display for gui app
Option 1: Setup the variable
export DISPLAY= [your-host-ip]:0.0
ex
export DISPLAY=192.168.24.1:0.0
Option 2: Write to the ~/.zshrc
Command
vi ~/.zshrc
File: ~/.zshrc
source ~/.zshrc
3. Verification
On Guest, we worte a simple python app that will show a 3D chart on screen.
3.1. Python code
Step 1: the demo 3D code
File: test.py
Step 2: Run
python test.py
3.2. Result
MobaXterm will prompt you a noti
Show the result on host machine (Windows)