Live data from Hacker News

GWSL: Run graphical Linux apps in WSL

github.com

111–120 of 132 posts

Re: GWSL: Run graphical Linux apps in WSL

#111

Earlier quoted context omitted.

This will be a game changer if they flesh it out. Imagine Linux apps right alongside your windows apps with their own icons and everything. Windows Terminal + Visual Studio Code + WSL2 is the bee's knees.

All that goodness limited by networking troubles of WSL2 while on a VPN. Wonder why it is never seen by WSL devs! Most of those trying to use WSL are running Windows, in a corp network, where a VPN is there by default.

I'm glad we're using dedicated vpn boxes... kind of annoying that I can't use a wifi directly, but usually at my home desk and tethered in anyway. Didn't know about the VPN issues in practice.

Re: GWSL: Run graphical Linux apps in WSL

#112
post #16
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.

> 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: $…

maybe something like...

    (cmd.exe -C xauth -extract - $Display) | xauth nmerge -
first part to run via windows environment, second to pipe that to the wsl environment?

Actual commands probably different, but should be something you could maybe trigger from inside .bashrc file.

Re: GWSL: Run graphical Linux apps in WSL

#113
I tried this app. It was okay, but it did some weird things to my bashrc, so it was banshied.

I found the core x server it used but was unhappy with not being able to full screen windows on the fly.

So after firing out the Frankenstein build system I was able to modify the windows x server to allow alt enter to switch a window to and from full screen (no title bar over the start bar).

This one change was huge. And now gui emacs works perfectly in windoes, backed by wsl.

If anybody wants I can get the patch or, uh. Becausw windows and the Frankenstein build system requirements, share the binary.

Re: GWSL: Run graphical Linux apps in WSL

#114
post #58

Earlier quoted context omitted.

Well, except for the timekeeping problem (there are workarounds but they're annoying) and the significant networking issues (no bidirectional port forwarding so "localhost:8080" doesn't work with server in WSL and DISPLAY=:0.0 doesn't work with server on Windows).

Also if you connect to a VPN (like your corporate VPN using Cisco Anyconnect), you lose connectivity within WSL2... WSL is nice to have and a million times better than DOS/Powershell but it's not at Linux/Mac terminal level yet.

Depends on the nature of the VPN. I can connect fine through my work OpenVPN, but it's not a full tunnel, just pushes a couple routes and split DNS, both of which are accessible on the WSL2 VM.

Re: GWSL: Run graphical Linux apps in WSL

#115
This tech is pretty cool and I used to run virtual machines and WSL, but now I just keep separate computers for separate OSes and my life is so much simpler because I never have to worry if my Windows host or VM infrastructure is causing extra complexity. If something's not working, I have exactly only one OS to worry about fixing.

Now, not only is my configuration and maintenance simpler but everything runs faster because all my operating systems are running on dedicated hardware.

And before anyone says "it's too expensive", it's really not terribly expensive because I get refurbed machines like this [0]. If I want a laptop I get something like this [1] and it runs Linux (or Windows of course) just fine.

The only expensive machine I ever buy is a Macbook, but even those I'll buy refurbished. The last Macbook Pro I bought is from mid-2015 and I got it for only $1049 (in 2017) with 6 months of AppleCare+ still attached to it, which got me a new battery for free from Apple.

[0] https://www.amazon.com/HP-EliteDesk-i7-4770-3-40Ghz-Renewed/...

[1] https://www.amazon.com/Acer-A515-55G-57H8-Display-i5-1035G1-...

Re: GWSL: Run graphical Linux apps in WSL

#116
post #58

Earlier quoted context omitted.

Well, except for the timekeeping problem (there are workarounds but they're annoying) and the significant networking issues (no bidirectional port forwarding so "localhost:8080" doesn't work with server in WSL and DISPLAY=:0.0 doesn't work with server on Windows).

Also if you connect to a VPN (like your corporate VPN using Cisco Anyconnect), you lose connectivity within WSL2... WSL is nice to have and a million times better than DOS/Powershell but it's not at Linux/Mac terminal level yet.

I don’t have that problem with WSL2 and Cisco AnyConnect. Maybe something’s up with your company’s configuration?

Re: GWSL: Run graphical Linux apps in WSL

#117
post #89

Earlier quoted context omitted.

They'll need to manage their own app store as I can't imagine they'll have gapps//shims out of the box, but that works in their favor if they wanted to do another mobile play. When the new EU fair market regulation is accepted, they will be able to compete with an app store op Android (or iOS): allow the installation and effective use of third party software applications or software application stores using, or inter…

It's already possible to have other app stores than Play Store on Android, even simultanously. I think some features are reserved to Play Store in practice (to stores pre installed on the phone) so there could be some improvement on this point.

Google also currently prevents OEMs from installing competitors' stores by threatening to withhold access to Google's services. This is one of the points in Epic's lawsuit.

Re: GWSL: Run graphical Linux apps in WSL

#118
post #59

Earlier quoted context omitted.

The author of that article seems to be conflating GPU support somehow with GUI apps. GPU support is indeed coming to WSL2 and is available currently in Insider builds along with a special release of the Nvidia driver and some Linux support packages. This, however has nothing to do with graphical applications or GPU acceleration of such. It’s entirely targeted to machine learning frameworks. I do think Microsoft has s…

They are working on Wayland support: https://www.phoronix.com/scan.php?page=news_item&px=Microsof...

Will they run into the same roadblocks that befell Wayland on Nvidia? I guess not, because they'll likely create their own compositor that bridges into dwm, so they can use EGLStreams but I sorta hope MS does pressure Nvidia into some kind of support.

Re: GWSL: Run graphical Linux apps in WSL

#119
post #96

Earlier quoted context omitted.

> Performance was better than it was with WSL1 for me, at least (especially IO). WSL1 performance is better for CPU-bound problems WSL2 only shines due to the VHDX approach. If WSL1 could use a VHDX or (gasp!) a native partition in a native linux format, it would smoke WSL2.

WSL1 was more or less the reverse-equivalent of WINE as I understood it, more or less a translation layer for a subset of syscalls, the approach is awfully limited from the get go. Not sure how using a VHDX or partition would solve that. We'd be back to square one, with things like containers being unusable again.

> Not sure how using a VHDX or partition would solve that

The problem with WSL1 is limited to disk IO performance, because the compatibility layer that's easy to do with system calls isn't so easy to do with the filesystem.

> We'd be back to square one, with things like containers being unusable again.

It's complementary. WSL2 when you play with containers, WSL1 when you don't.

Personally, I don't bother with containers for about 90% of the development cycle - and it's just for testing before being deployed to a genuine linux, not some VM.

Also, if you want to run servers with WSL (say, postgres), having containers is the last of your problems.

Re: GWSL: Run graphical Linux apps in WSL

#120
post #96

Earlier quoted context omitted.

> Performance was better than it was with WSL1 for me, at least (especially IO). WSL1 performance is better for CPU-bound problems WSL2 only shines due to the VHDX approach. If WSL1 could use a VHDX or (gasp!) a native partition in a native linux format, it would smoke WSL2.

WSL1 was more or less the reverse-equivalent of WINE as I understood it, more or less a translation layer for a subset of syscalls, the approach is awfully limited from the get go. Not sure how using a VHDX or partition would solve that. We'd be back to square one, with things like containers being unusable again.

It's not all that limited.

VHDX/partition would help significantly by not being NTFS and/or enabling a linux-style dentry cache.

Post reply on HN