223 points · by magnio · 5y ago · 129 comments
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.
https://devblogs.microsoft.com/commandline/whats-new-in-the-...
Windows Terminal + Visual Studio Code + WSL2 is the bee's knees.
It's getting better all the time though - they tease usb passthrough might be doable as it's already supported with remote desktop
I can do it fine in WSL1.
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.
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.
> 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.
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.
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.
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."It used to be possible to easily scan what sites are running locally, even if js code was from a public website. [0]
Btw there is a typo, you need to use "nextract", it's too late to edit it now
(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.
PS C:\Users\user> _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...
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.
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 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.
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.
Also the value of Intel is all that legacy software. Without the legacy software, Intel could be just another ARM or RISC V competitor.
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...
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.
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.
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).
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.
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-...
https://woafre.tk/2017/02/08/wsl-wine-runs-on-it/
This is the (still working) Hacker News story:
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.
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.
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 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 ```
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.
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.
Check this comment for more details: https://news.ycombinator.com/item?id=25455503
next task would be to support some kind of synaptic that would update windows's menu with linux apps...
My main problem are the cameras in the stalls.