Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to run any Linux graphic GUI program from Windows

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 257

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report