Hacker News new | past | comments | ask | show | jobs | submit login
GWSL: Run graphical Linux apps in WSL (github.com/opticos)
223 points by magnio on Dec 17, 2020 | hide | past | favorite | 129 comments



Isn't it officially coming anyway from Microsoft - https://www.theverge.com/2020/5/19/21263377/microsoft-window...


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 said that GUI stuff is on the roadmap. I hope they can continue to force the hand of Nvidia on the ridiculous matter of not providing any kind of GPU virtualization on their consumer cards.


You should be able to run Linux GUI apps via WSL2 on a preview build soon.

https://devblogs.microsoft.com/commandline/whats-new-in-the-...


I love how WSL was put in the "command line" team and they are now doing graphics, GPU, and audio (plus probably Android again) :)


There was a story a few weeks back about Microsoft working on a new android subsystem. So truly coming full circle; android OS stability (via project treble), the vm approach instead of compatibility layer approach, and improvements to hardware sharing/passthrough to wsl 2 mean that they can finally realize what they tried to do with Projecy Astoria.

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.


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 interoperating with, operating systems of that gatekeeper and allow these software applications or software application stores to be accessed by means other than the core platform services of that gatekeeper.

Since they already allow alternative app stores (e.g. Steam) on regular Windows, not much changes for them in this respect. But they will also be able to compete with the Play Store and iOS App Store with their own store.

Source: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CEL...


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.


Um.... Samsung phones come with Samsung store...in usa..and have google services on them just fine...

There is also a web frontend for it: https://www.samsung.com/us/apps/galaxy-store/


At this point I could see how some developers may prefer an MS store for ios and android devices over the native stores. Especially if they make deeper cuts on pricing (10% of sales instead of 30% and 3% of transactions instead of 30%).

I'm slightly leery about it all, but definitely warming up to MS this past decade. WSL2 and VS Code have made my life much easier to say the least. Of course this is the intended effect, I no longer have the urgency to get into a full Linux environment this way.

On-Topic: glad to see this GWSL thing, as I'd been thinking about doing similar... getting X and pulseaudio working in windows, and configured right in WSL environment is a pain to say the least. If this eases that pain even if only for local logins, I'm pretty happy with it. I spent a couple days trying to get it all working... I could launch Ubuntu's Firefox instance, but couldn't for the life of me get audio working right and just gave up after a couple days.


>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.

They own App Center so maybe its not that far away.



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.


Microsoft has shown it at X Developer Days 2020.


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.


Until they allow USB passthrough (which is more or less blocked by the fact that Hyper-V itself doesn't seem to have the feature), a whole bunch of my use cases are basically barred from WSL2. Shame, cause otherwise I really, really enjoyed using it - coming from a guy who's been on Linux for 99% of his time for ~15 years at this point.


Wsl 2 is really cool, right up until you want/need to do anything with the underlying hardware. No usb passthrough, no hardware acceleration, gpu passthrough is there but it's still early stages as performance is about half of native and vendor tooling is absent, etc

It's getting better all the time though - they tease usb passthrough might be doable as it's already supported with remote desktop


Yeah it's actually pretty damn good. Performance was better than it was with WSL1 for me, at least (especially IO). IIRC they are exploring USB passthrough using Hyper-V sockets, but it's still very early to actually talk about having that included[1]

Once they figure that out I might just as well be able to switch over and stop dual booting. I hate dual booting more than I hate Windows, so it would be an improvement.

[1] https://github.com/microsoft/WSL/issues/2195#issuecomment-74...


> 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.


Probably, but it also introduced a lot of edge cases for compatibility issues. I thought it was a reasonable approach, though likely took more devs than just supporting the more tightly integrated VM environments.

I will say that Docker Desktop works MUCH more smoothly with WSL2 than the prior approach.

About the only issue I see now is about once a month I have to reboot because the magic localhost port mapping between docker, wsl-ubuntu and native host goes wonky. It's not so bad as long as I realize before diving into a rabbit hole to figure out why I can't connect to something.


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.


Ah, different usecases then. I pretty much tend to go containers from A-Z for anything non-trivial, thus WSL1 was more or less useless for me. IO is also a big problem, just running a simple git status on a bigger project is a PITA.


It's not all that limited.

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


I wouldn't call having only a subset of system calls, no containerization, no background services, no proper init system, no kernel modules, "not all that limited". But maybe that's just my use case.


I've never hit a system call I wanted but wasn't available on WSL. In fact the couple times I've been disappointed at the lack of a system call it was when I was booting linux.

No containerization: Agreed, this is a significant limit.

Background services work just fine, I don't know what you're getting at. I have cron and stuff going.

What's improper about the init system? I start services, I stop services, it seems fine.

No kernel modules: I feel like this is pretty niche.


It seems many people find USB/IP works as a replacement for real USB passthrough http://usbip.sourceforge.net/


Found this guide a couple of days ago[1]. Looks awfully convoluted and impractical. Good if it works, but I personally draw my line of acceptable minimum functionality somewhere between "working" and "practical". This is a bit much, and has a couple of pretty bad gotchas, unfortunately.

[1] https://github.com/rpasek/usbip-wsl2-instructions


I managed to get usb pass through working the other day for the serial monitor on a development board, they may have updated since last you tried.


I really hope that happens at some point, since there's so much messing around just to get a yubikey working in WSL. I eventually gave up on that.


uh oh. I intend to use only external HDs on my new box (the SSD HD is small) and if I can't mount a USB it ain't gonna work.

I can do it fine in WSL1.


WSL2 is backed by an actual virtual machine, so it comes with the limitations of its hypervisor (Hyper-V). Hyper-V doesn't support full USB passthrough. AFAIK it does support passing down USB volumes though.


You can mount partitions/drives but something like a yubikey, mic, etc you can't right now


Ah, ok. I was trying to follow a support thread and it wasn't clear about that. It made it sound like WSL2 didn't support USB at all.


You can already do some of this with wslu (out of the box on the ubuntu image). You can create desktop shortcuts to linux apps (and I think provide an icon, otherwise it'll try to guess), wslview proxies to your default browser on the Windows side, and I think there are a couple of other things.


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.


Here is a technet thread where Microsoft's brightest (including yours truly) discuss how to do this using a vxserver. https://techcommunity.microsoft.com/t5/windows-dev-appconsul...


That's how I do it- mostly to run urxvt.

Off-Topic: I'm setting up a new machine, and wondering whether I should use WSL 1 or 2 (or both?). Is there a clear path forward for these systems? WSL 1 has served me pretty well. Most of the inter-filesystem interaction amounts to using rsync to back up directories. Otherwise it's just sshing into servers. I use virtualbox for off-line development.


> That's how I do it- mostly to run urxvt.

> Off-Topic: I'm setting up a new machine, and wondering whether I should use WSL 1 or 2 (or both?). Is there a clear path forward for these systems? WSL 1 has served me pretty well. Most of the inter-filesystem interaction amounts to using rsync to back up directories. Otherwise it's just sshing into servers. I use virtualbox for off-line development.

I would recommend wsl2 for sure.


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.


Having used UNIX since Xenix was introduced to me in 1993, I rather keep using Powershell, thanks.


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.


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


Maybe I did something wrong, but for me getting a local X-server running, with X-forwarding from WSL1 was dead easy and something I used on a day to day basis.

Getting the same working with WSL2 was a pain in the ass, and I eventually gave up.

So if you like X-forwarding... I personally would recommend sticking to WSL1, unless that gives you other issues.


> Getting the same working with WSL2 was a pain in the ass, and I eventually gave up.

Overall it works the same as WSL 1, you just need to change DISPLAY=:0 to DISPLAY="$(/sbin/ip route | awk '/default/ { print $3 }'):0"

Here's a snippet from my bashrc that handles both WSL 1 and WSL 2: https://github.com/nickjj/dotfiles/blob/385007837ab787a2be2e...


You can also read the IP from etc/resolv conf.


Thanks for that.


Is "X-forwarding" being able to see and interact with linux GUI apps running inside WSL on Windows? I do this to run Cypress interactively within WSL2.

I have no idea what I did (i just blindly follow some guide on a no-name blog), but I got it all working fairly effortlessly. The only slightly annoying thing is having to start the server on windows if i restart my pc, but otherwise it was pretty easy.


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:

    $ xauth nmerge -
then paste the output copied previously. Press enter and CTRL-D (EOF). If you then check the output of "xhost" on the client, it should only say "Access control enabled."


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


A JS based exploit that hijacks the X Window System Core Protocol running on your localhost to inject key presses into your X server or steal screenshots? I mean it's possible, but it seems quite far-fetched except maybe if someone specifically targets you.


The main impediment is that http request won't look anything like the x window requests, so the x server would likely reject it.


There are actually several (published and non-published) ways to exploit that type of configuration, here is one example:

https://samy.pl/slipstream/


If you're talking about the general concept of using js to spoof another protocol: that exploit involves middleboxes sniffing TCP connections at the packet level, rather than at connection/stream level. It certainly won't work for connections with a TCP server.

If you're talking about using that exploit to allow access to the victim's machine from the internet: that won't work because listening interface for the x11 server is localhost, not the LAN interface.


Thank you for posting this. I tried many times to google how to do this and saw the magic cookie explanation, but never found a good clear description of what was happening. Much appreciated!


Glad to help.

Btw there is a typo, you need to use "nextract", it's too late to edit it now


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.


Instruction unclear: on the host running the X server, I get

  PS C:\Users\user> _


You'll want to make sure clipboard sharing is enabled too. This way you can share clipboard data from WSL and Windows.

My VcXsrv config is public on GitHub at: https://github.com/nickjj/dotfiles/blob/master/c/Users/Nick/...

Putting it in that directory sets VcXsrc to start when Windows boots up. You would just replace "Nick" with your Windows user name and put it in that path. Then you never have to worry about starting VcXsrv ever again.

Also if anyone is using both WSL 2 and WSL 1, you need to set different values for DISPLAY depending on which version you use.

My .bashrc handles this at: https://github.com/nickjj/dotfiles/blob/385007837ab787a2be2e...


Yip, been doing it this way for years. Here is guide I originally followed. https://medium.com/@pck/how-to-use-sublime-text-3-from-comma...


We have a guide for it in microsoft/vscode: https://github.com/microsoft/vscode/wiki/Selfhosting-on-Wind...


The first line was enough for me to make it work.Microsoft supports it officially in the latest version I think.


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


And that is slow as hell, laggy scrolling etc. Hope the MS implementation works better.


> And that is slow as hell, laggy scrolling etc.

It's not slow for me. Maybe you have something else running that's interfering with WSL (Defender, etc.)?

I've been using the VcXsrv set up for years (in WSL 1 and now WSL 2). It runs native GUI Linux apps really well. It's how I ran Sublime Text in WSL for a long time before I eventually switched to a different editor. I even ran i3 in it for a bit but gave up on that because it didn't work well with dual monitors. It was smooth as butter tho.


When will Windows Linux happen?

I genuinely don't understand the point of Windows as it exists anymore.

  * Games are developed on cross platform engines. I can't remember the last game I played that was Windows-exclusive.
  * Business apps work in the browser or Electron, or are otherwise cross-platform. Things that aren't, could work with emulation
  * Developers are using unix-like operating systems, and MS has leaned hard into that. Windows is incongruent with the rest of their developer strategy.
  * The server ecosystem is almost entirely Linux based, apparently even on Azure
  * By all appearances, Windows is now a service that upsells other services, and there won't be a Windows 11 as we would traditionally think of it
  * The people who know what an OS is, prefer unix-like OSes by a vast margin. The people who don't, wouldn't notice the difference.
  * x86 looks even less like the future than it did a month ago
So I don't understand what the holdup is?


I think may be very much underestimating the number of line of business apps built as Windows GUIs over the last 30 years - not to mention server software running on IIS and similar.

I also think you're underestimating the number of developers who know Visual Studio and Windows and nothing else (many of whom are the so-called "dark matter" devs).

On top of this, the NT kernel is actually pretty decent - despite the horror of the Win32 API. Personally, I don't want to touch it though.


On top of this, the NT kernel is actually pretty decent

A lot of people that where not in computing back then do not realize that Microsoft picked up a lot of great people due to market forces, they picked up a lot of talent from DEC including David Cutler and the cream of the crop from the OS2 team. This was the team that designed and built the original NT Kernel and it was by and large the best parts of VMS and OS2 coupled with those individuals learnings in building those other systems. I agree with you on the Win32 API and it is a shame that the NT Kernel gets dinged for it.


The value of Windows is to run three decades of legacy Windows applications. (four decades of MS-DOS) Being able to run those still represents an actual (but declining) value.

Also the value of Intel is all that legacy software. Without the legacy software, Intel could be just another ARM or RISC V competitor.


> Games are developed on cross platform engines. I can't remember the last game I played that was Windows-exclusive.

You may not play them, but a significant number of popular[1] games are Windows-only.

[1] https://en.wikipedia.org/wiki/List_of_most-played_video_game...


Yeah - I'm not sure what GP is referring to, most new cross platform games that come out are xbox/ps/pc and very rarely will you see a linux or OS X release.


Microsoft Office is much better than the competition (including both LibreOffice and web apps like Google Docs). It's a great shame to say, but if I'm really honest with myself it's clear reality. Using Windows sucks, but Office is seriously so much better than everything else that it's worth it.


What do you like that’s not available elsewhere? I only know about Excel being irreplaceable for some.


> * Games are developed on cross platform engines. I can't remember the last game I played that was Windows-exclusive.

To some, that's not a relevant fact. Consider someone like me who plays only one game that's only for Windows and consoles. It's never been released on Linux and I had a terrible experience playing under Wine.

I got a KVM switch to play it on my secondary PC. I think there are a lot of people out there for whom one game or one app doesn't work or only works poorly on Linux, and they keep a Windows PC or dual boot just for that.


This is me as well, for league of legends. It's the one game I and most of my friends play exclusively, and is how I keep in touch with the ones who live far away. I'll have a windows box around until league runs on Linux or dies, and not a day more or less.


Why is there Pepsi? Coke Cola Classic has been the world best selling soft drink for over a decade and probably longe

People who want a Cola like drink prefer Coke.

Or even any other soft drinks than Cola derivates. They sell the most by far.

Why does Dr Pepper exist? Or Club-Mate? Or Tøyen Cola.

There is a concept called competition. People believe it drives innovation.

There is also nice to have variety and being able to pick something you like the best form a selection.

A single operating system dominating the entire world from PDP11 --> entirely is a bleak dystopia.

WindowsNT was lightyears ahead of Linux kernel when it come out. Async everything from the start. Better protection for hardware. Easily portable. x66, PowerPC, Alpha, Mips Able to run win32, OS/2 and a posix layer that could be extended into other adventures. Also the most modern operating out there in wide use.

It sadly has retrograded over time.

Both WindowsNT, Linux and BSD are all unsuited for the world we live in now.

I can't wait until some sharp minds are able to create the next generation operating system. It is taking far too long.

I loved the time of competition and variety Atari TOS/GEM, MSDos, VAX, OS2, OS/400, Sintran, Mac OS (System 1.0 -->), AmigaOS, WindowsNT, many flavours of UNIX, Sinclair BASIC

Those are just alternate operating systemsI have used myself over a life.

I want far more flavours, ideas, alternatives out there, not less.


If the question is "is there something technical preventing Microsoft from pivoting to a *nix kernel instead of NT" the answer is "no, and there hasn't been for at least 20 years - if ever".


Microsoft has already pivoted before. First was change from DOS based Windows to NT Kernel based Windows. Then again to Longhorn kernel based Windows.


The switch from from DOS-based Windows to NT took place over many years: development started in 1989, the first release was in 1993 and the switch only really completed in 2001 when Windows XP was released, which was the first NT release targetted at consumers. That's well over a decade. Microsoft bet a huge amount of resources on NT because they could see that DOS was never going to work on in the long term, especially on servers. There's no reason for them to spend so much resources and time on a switch a *nix kernel when there's (currently) nothing like that at stake with the NT kernel.

Longhorn was the codename for Vista, which just used the same NT kernel as before (with some feature improvements, just like in every new Windows release).


Actually there were a couple of other reboots, but staying on the same NT kernel model, one being the kernel refactoring around Windows 7 release, and during Windows 10 it got the capabilities of split personality with secure kernel, driver guard and ability to run containers directly on top of Hyper-V.


Not to mention a Unix (Xenix) used to be one of Microsoft's main products.


> * Games are developed on cross platform engines. I can't remember the last game I played that was Windows-exclusive.

The Unity editor doesn't have full Linux support (its coming "soon"), for example. Neither do a lot of other tools.

Hopefully we'll get there.


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/


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


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-...


Can run wine on windows finally?


A few years ago there was an (amusing) announcement of WINE running on WSL. The link quit working a few years ago. The broken link was:

https://woafre.tk/2017/02/08/wsl-wine-runs-on-it/

This is the (still working) Hacker News story:

https://news.ycombinator.com/item?id=13603451


Just ran into this yesterday. What a great solution! I now have WSL2 running graphical linux apps and got a nested VM running with Mojave so I can run osx with macOS-Simple-KVM. I can finally cross compile in a way no one should.


How is the performance in such a nested VM setup?


Not awful, though the lack of USB pass-through makes for a challenge. You need to make sure to rune your QEMU with at least 8G ram or it is pretty bad. Good enough to build with anyways.


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.


I recently migrated to Windows from MacOS and have found the following paid apps really helpful:

1. [Pengwin](https://www.whitewaterfoundry.com/) - a customized Debian distribution with helpful scripts for setting up a dev environment

2. [X410](https://x410.dev/) - a customized X11 Server

They made all the setup really easy. I reuse some of the scripts from Penguin in the Ubuntu distribution.

One caveat for those who want to try WSL2, which is available if you subscribe to Windows Insider program, is the instability.

Some times, after an update, your WSL will not start. After some restarts everything is back to normal.


WSL2 became available outside of insider builds in version 1903 which came out May 2019.

I have not experienced WSL2 a not starting issue at all and I use it every day this year.

Also what benefit does Pengwin have apart from X server? I use the Ubuntu image and I've had no issues.


For me it really helped to copy and paste the commands related to the X server.

For instance I had a small issue with the scale of the applications. In Windows I have 250% (recommended) scaling applied.

``` export QT_SCALE_FACTOR=2.5

export GDK_SCALE=$(echo "(${QT_SCALE_FACTOR} + 0.49) / 1" | bc) #Round ```


Is the instability related to one of the above apps? I've been using WSL2 for at least six months without that issue.


I don't think so.

I blame it on being on the Dev release channel.

To be honest I thought I had to be on the latest and greatest to take benefit of WSL2.


I sometimes get wsl2 to be not responsive too, but you can force shutdown ask (WSL --shutdown) that solves most problems except networking.


I had no problem running XFCE desktops under WSL and WSL2 using XRDP and standard Windows's remote desktop client. Still feature set, GUI and overall experience under VMWare feels way better to me. Also ability to test with systemd is a plus.


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


Anyone have experience with this? The only thing I miss from a Linux Desktop is https://sw.kovidgoyal.net/kitty/ but it requires direct access to GPU as I understand. Anyone tried kitty with this?


VcXsrv with SSH forwarding can work quite well in my experience. It also supports OpenGL so it is worth giving a shot.


I actually think WSL2 may have gpu-compute now so it may work. No guarantees though


Of course, you can already run X11 apps. Run a Windows-based X11 server and connect to it from the app.


WSL is nice but still lacking. I prefer Windows VM on Linux host.

One thing I do like is the 9p "interface" between Windows host and WSL, and the improvements they made to file sharing between the two.


Would this be less resource-hungry than Citrix remote desktop? I had to switch back and forth native Windows and Citrix and the latter stutters and generates heavy artifacts around text.


Does this work with WSL, WSL2 or both?


VcXsrv works with both, IMO I would just use it directly. I've been happily using it to run GUI apps in both WSL 1 for WSL 2 for quite some time now.

Check this comment for more details: https://news.ycombinator.com/item?id=25455503


I use MobaXterm which works seamlessly with WSL. No need to configure anything.


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


I've been running apps via xpra instead of X forwarding, and audio works fine there. For silly reasons I'm doing it in Docker, but there's no reason to do that part if you don't need the ephemeral containers.

https://github.com/mook/wsl2-xpra-generic


It's nice that Microsoft installed a restroom. Definitely stopped people shitting in the corner.

My main problem are the cameras in the stalls.


[flagged]


In what way do Windows and Mac run Linux software better than Linux?


Windows lets you run Linux apps at the same speed as raw metal Linux, but with good drivers for things like video cards, wifi, etc. Windows also gives you access to a more diverse selection of its own apps so you can get your day job done. As for Macs, you get nearly the same benefits as that but now you also get access to the best hardware money can buy, from the cpu right up. I'm sure Linux will be ported to Apple Silicon eventually, but one look at the history of Linux even on x86 laptops shows how it will suck with half-finished drivers, shitty UI and terrible touchpad semantics, etc. Linux will always be a third rate OS for desktops.


Yikes, do you mean Windows Subsystem for Linux? I really appreciate MS folks putting in the effort to try something new, but WSL is close to worthless. I tried it a while back and could not get basic services to work. And why would you want Windows OS around if you just want to run Linux?


What? I smell bs.

How do they run em better?


Aside there being no truth to this assertion, last I looked even MS is publishing lots of open source software...


All significant open source development today is done by folks who are not "scratching an itch" but cashing a paycheck, and the projects they release are things that would not have made them money anyway. The actual valuable stuff the trillion-dollar companies of today do is still overwhelmingly closed because secrecy is still a better way to engineer products that sell.


First, I really do appreciate what you are trying to say - that proprietary software is where the money is. It also could be that most of the time, there really isn't a reason to share source code. I've built lots of software for companies large and small. Most of that software is for automating some very specific business process, or making some machine configuration work that no one else in the known universe would ever want anyway. The only developers who that code has value to will work at or for that company. It's not that it is secret, it's just a snowflake. In many cases the budget was so small, that the application wasn't tooled to run anywhere else but on that customer's existing infrastructure, so it would take more time to make that code open-source ready. BTW, open source code generally (but not always) is much higher quality than what I see in most proprietary software because it is going to be reviewed by lots of others and there is often an expectation that that code work on multiple platforms.

Also, when you use absolutes, like "All significant open source development is done by folks ... cashing a paycheck" you are guaranteed to be wrong. It is also disingenuous to people who actually are out there scratching an itch... and to all those developers who started by scratching and itch and finding customers or companies to pay them to keep scratching that itch.


Not yet, but they're getting there... Sad times.


Mac OS is the evolution of NeXTSTEP, so that is easily done anyway.

Windows, well Microsoft did a big mistake of never managing the POSIX subsystem in a proper way.

Linux took off thanks to GPL, BSD ongoing legal problems at the time, and Microsoft just doing the basic regarding POSIX support on Windows.


Linux took off because SCO was trying to get $500 per CPU for a Unix license on PCs that were selling for $1000 or in some cases less. Windows NT at the time was also priced similarly to SCO Unix. When Windows XP Pro came out at $250, commercial Unix was twice as expensive.


Commercial UNIX never had that problem, I was dual booting between Windows NT and Linux during my university degree.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: