How to run any Linux graphic GUI program from Windows
This article mainly introduces how to run any Linux graphics GUI program from Windows. It is very detailed and has certain reference value. Friends who are interested must finish reading it.
Although the wsl mode on Windows10 solves the pain point of running linux programs, the programs running are still trapped in Terminal. For example, emacs:
Terminal version of emacs
If you want to get pleasing visual effects, such as beautiful fonts and graphics, you must try to get GUI.
1. Install VcXsrv
First install VcXsrv with the choco tool:
PS C:\ Users\ gaowei > sudo choco install vcxsrc Chocolatey v0.10.15 Installing the following packages: vcxsrc By installing you accept licenses for the packages.
two。 Configure bashrc or zshrc files
Add these two lines of code to .bashrc or .zshrc:
Export DISPLAY=$ (awk'/ nameserver / {print $2; exit}'/ etc/resolv.conf 2 > / dev/null): 0 # in WSL 2 export LIBGL_ALWAYS_INDIRECT=1
3. Initialize VcXsrv
After opening the program, first select multiple windows:
To continue to the next step, select start no client:
After the next step, select all options:
The next step is completed:
4. Run the GUI program:
For example, run the graphical version of emacs immediately:
The above is all the contents of the article "how to run any Linux graphic GUI program from Windows". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!