Live data from Hacker News

GWSL: Run graphical Linux apps in WSL

github.com

21–30 of 132 posts

Re: GWSL: Run graphical Linux apps in WSL

#21

I'm running X applications like the Gnome terminal on Windows via VcXsrv, works pretty flawlessly on my 4k Surface Pro by just setting the DISPLAY environment variable and tweaking GDK_DPI_SCALE.

May I just ask You for try does AzPainter V2[0] works that way on your machine?

[0] https://github.com/Symbian9/azpainter

Re: GWSL: Run graphical Linux apps in WSL

#22
post #3

Weird project description. Is it an X11 Server for Windows? If so, why doesn't it say this first (but only mentions further down that the software includes some advanced X11 Server)?

You mean "Is it possible to launch X11 app based on `xlib` under Windows without WSL?", right?[0]

[0] https://nitter.net/app4soft/status/1337723296922677252

Re: GWSL: Run graphical Linux apps in WSL

#23
post #2

VcXsrv and a bashrc to set DISPLAY= automatically did it for me export DISPLAY=$(route -n | grep UG | head -n1 | awk '{print $2}'):0 and on the Windows side, start VcXsrv with the 'Disable Access Control' combo box checked. this will enable X clients from other hosts (WSL is another host, basically) to connect to the server without too much hassle. that's it.

Did you do this for WSL2? I had to do some firewall shenanigans before that worked for me.

Re: GWSL: Run graphical Linux apps in WSL

#27
post #16

Earlier quoted context omitted.

> Disable Access Control This was terrible advice back in the 90s and still is. An attacker anywhere on the network can listen to your input devices, insert fake keypresses, view your screen, etc. Basically a total system compromise. All without log entries. The correct way to do this is to use MIT-MAGIC-COOKIE. One the client host: $ xauth -extract - $DISPLAY Then copy the output. On the host running the X server: $…

VcXsrv binds to localhost by default, so unless you already have malware on your system the added risk is quite small I'd say.

What about javascript code on a harmfull website that does requests to localhost?

It used to be possible to easily scan what sites are running locally, even if js code was from a public website. [0]

[0] https://defuse.ca/in-browser-port-scanning.htm

Re: GWSL: Run graphical Linux apps in WSL

#28
post #5

what about audio ? next task would be to support some kind of synaptic that would update windows's menu with linux apps...

Until WSL2 gets native support for audio, you can run Windows PulseAudio yourself - there are various guides listed in the comments of this issue:

https://github.com/microsoft/WSL/issues/5816

Re: GWSL: Run graphical Linux apps in WSL

#29
post #3

Weird project description. Is it an X11 Server for Windows? If so, why doesn't it say this first (but only mentions further down that the software includes some advanced X11 Server)?

It includes binaries for VcXsrv[1], which is an X11 server for Windows. This project itself seems to be glue code that helps you set up and manage VcXsrv and it's connection with your WSL instances.

[1] https://sourceforge.net/projects/vcxsrv/

Post reply on HN