News for hackers. Stuff that matters.
Re:WSL Getting GUI Support by chrisan on Saturday September 26, 2020 @09:36AM (#24598734)
> but is also scared about Microsoft's strategy here?

Scared of what?

I have spent years either in Window's inferior environment for development or having to dual boot or running something like VMWare workstation. I do that because linux is inferior for gaming/entertainment. I have never "enjoyed" a single linux desktop environment, I spend the majority of my time coding or running stuff on terminal.

I'm in my 40s and tired of going back and forth between the two. WSL has been a godsend

Linux has as much to be scared about from Microsoft as Microsoft has to be scared of Linux gaming

Re:WSL Getting GUI Support by d3nj4l on Saturday September 26, 2020 @09:51AM (#24598856)
> I do that because linux is inferior for gaming/entertainment.

It really isn't any more. I play a lot of games and only one so far has refused to work well on Linux, and that's one which is emulated on Windows so I can't blame Linux too much for it. And that's on a laptop with nvidia's power-saving shit thrown into the mix. As for entertainment, aside from Firefox having issues with hardware acceleration, most of which have either been fixed or are being fixed, I haven't faced any in Linux that I haven't on Windows. That said, I don't use HDR, so I can't vouch for that.

On the other hand, I've had significant performance issues with WSL, especially on disk use, and I don't really care for windows update bugging me all the time and the telemetry. I jumped on board Linux with Pop!_OS and it's been a delight. I used to be just as negative on Linux, but I have been so, so happy I've been proven wrong.

Re:WSL Getting GUI Support by kyriakos on Saturday September 26, 2020 @10:01AM (#24598922)
No matter how you see it, games are primarily made to run on Windows and the other OS's are an after thought. I am not saying it didn't get better but gaming on windows is natural and requires no special configuration. A normal user who wants to play games if he's not already on a gaming console the next best option is Windows.
Re:WSL Getting GUI Support by sangnoir on Saturday September 26, 2020 @06:21PM (#24602633)
> No matter how you see it, games are primarily made to run on Windows and the other OS's are an after thought

I think this hasn't been true for some time for studio games. Most (big budget) games are ported to windows from consoles, except for indie titles

Re:WSL Getting GUI Support by a_t48 on Saturday September 26, 2020 @07:47PM (#24603057)
Most big budget games have a cross platform engine, at least for development purposes.
Re:WSL Getting GUI Support by elcomet on Thursday October 08, 2020 @06:11PM (#24724484)
And yet most big budgets games don't work on Linux, whereas most indie games, or from smaller companies do.
Re:WSL Getting GUI Support by littlestymaar on Saturday September 26, 2020 @10:40AM (#24599183)
While I agree with you on the fact that it's way easier to run games on Linux than ever (especially steam games thanks to proton and DXVK, but it trickled down to most games as well) and that Linux never had so many supported games, I still spent 3 hours to install torchligh 2 the last time I wanted to play with it, dispite it being sold as Linux-compatible! Oh, and I spent 4 days (not full time obviously) installing WoW Classic last year, and it involved manually installing a release-candidate of the latest kernel. So it's still definitely not for the faint of heart.

But at least now it works! (Unless it doesn't because some retarded anti-cheat software which doesn't actually prevents cheating, gets me banned after a few minutes. Looking at you Apex Legends)

Re:WSL Getting GUI Support by stjohnswarts on Saturday September 26, 2020 @11:35AM (#24599553)
Having worked at a few of "the big guys" on hardware, I can assure you linux is alive and well there on heavily customized linux versions for internal usages for developing driver code/OS interactivity for hardware because it is so superior to the hoops you have to jump through for Windows. Then most all of that experience can be brought over to Windows development with lessons learned.
Re:WSL Getting GUI Support by m463 on Saturday September 26, 2020 @09:52PM (#24603572)
I don't know, I thought I would be using a mac for the rest of my life because it interoperated so well. I could run windows, I could mostly treat macos like unix, and I could boot linux if I wanted to.

But they went down the navel-gazing path - everything pointing inwards to their ecosystem and picking off the useful interoperability stuff little by little until almost nothing is left.

Re:WSL Getting GUI Support by Daneel_ on Saturday September 26, 2020 @09:46PM (#24603549)
Bingo. The day I can put things in cron in WSL and have them run without needing a window open is the day I stop running a Linux VM.
Re:WSL Getting GUI Support by jasomill on Sunday September 27, 2020 @01:29AM (#24604435)
Have you tried installing a cron daemon in WSL using your distro's package manager and starting it with, e.g.,

  wsl -u root /usr/sbin/service <daemon-name> start
or, equivalently,

  wsl -u root /etc/init.d/<daemon-name> start
Because I've been starting Debian sshd this way using a Windows Task Scheduler "At startup" task for years, in both WSL 1 and WSL 2, and it "just works".

Note that, for my case, WSL 2 requires an additional command to map a TCP port from external adapters to the VM's "host-only" interface, e.g.,

  powershell.exe -NoProfile -NoLogo -Command
    netsh interface portproxy add v4tov4
      listenport=2022 listenaddress=0.0.0.0
      connectport=2022 "connectaddress=$(
        wsl -u root -e perl -e '
          print qq{$1}
            if qx{ip -br addr show eth0}
              =~ m{ ([0-9.]+)/}')"
as a single line, replacing "2022" with the TCP port you want available externally.
Re:WSL Getting GUI Support by nobody9999 on Saturday September 26, 2020 @11:05PM (#24603898)
>he day I can put things in cron in WSL and have them run without needing a window open is the day I stop running a Linux VM.

You could have already been doing that for years[0].

[0] https://cygwin.com

Re:WSL Getting GUI Support by netsec_burn on Saturday September 26, 2020 @10:27PM (#24603729)
With Steam's Proton, I haven't noticed a difference with Linux gaming. It works out of the box and has no significant issues.
Re:WSL Getting GUI Support by thayne on Sunday September 27, 2020 @12:31AM (#24604236)
> I have never "enjoyed" a single linux desktop environment

Just because you don't like linux desktop environments, doesn't mean everyone doesn't. I've used several linux desktop environments, and I prefer all of them to Windows (my current favorite is i3/sway). Of course that is a personal preference. I know some people prefer the windows (or mac) desktop experience to linux's, and that's fine. Just don't say that my preference is invalid.

> Scared of what?

That they will try to pull off the "Extinguish" phase of their infamous "Embrace, Extend, Extinguish". I am doubtful that they would be successful extinguish linux at this point, but whatever they do to attempt such a feat could very well cause some pain for desktop linux users.

Re:WSL Getting GUI Support by nendroid on Saturday September 26, 2020 @09:03PM (#24603386)
I wouldn't call windows development inferior. Just different and narrow.

For C++ and C# windows has the best IDE for it. For C++ CLion is the next best IDE but it's nowhere near as fast or snappy as windows visual studio IDE.

Also keep in mind most developers use visual studio code nowadays which is a microsoft creation.

Re:WSL Getting GUI Support by lasagnaphil on Sunday September 27, 2020 @12:41AM (#24604269)
It’s weird that you call Visual Studio snappier/faster than CLion. From my experience VS 2019 was extremely laggy even on small-size projects. I’ve heard from some gamedev veterans that VC 6 was the last “usable” version and performance/usability/responsiveness went downhill after that. (Here’s a famous rant by Casey Muratori who later compares the load times of VC 2019 and VC 6: https://youtu.be/GC-0tCy4P1U)

To admit, it has one of the best debuggers though. But CLion seems to have catched up in that department, and seems to have way better CMake integration than VS does. CLion still needs more work on performance (as well as support for other build systems), but it’s still the editor that I’m optimistic about.

Re:WSL Getting GUI Support by bsoft16385 on Sunday September 27, 2020 @04:59PM (#24610091)
I write C# code on a medium-large solution (ASP.net, 60 or so projects, ~1M LOC) and to be honest I don't know why everyone thinks that VS2019 is so great.

VS2019 frequently freezes for multiple seconds. When project files change (e.g. because you check out a different branch) VS often fails to load the modified projects and I need to restart the IDE.

Then there's the fact that the refactoring tools in VS2019, despite improving significantly since older versions, are still way behind ReSharper or IntelliJ.

I also generally dislike the UI I'm VS2019. The Git integration works, but it's cumbersome to use. You can't easily have multiple run configurations. The error/warning list pops up seemingly at random.

I use Rider now. It's not perfect, but I am just much more productive in that environment.

Re:WSL Getting GUI Support by ncmncm on Sunday September 27, 2020 @01:14AM (#24604389)
The MSVC debugger won't do any of the things I need a debugger to do, besides your basic stepping and breakpoints.
Re:WSL Getting GUI Support by IdiocyInAction on Sunday September 27, 2020 @01:50PM (#24608559)
After trying both, I vastly prefer the workflow that CLion offers. Both are slow, heavy programs though.
Re:WSL Getting GUI Support by monadic2 on Saturday September 26, 2020 @10:28AM (#24599098)
Why are you coding on a gaming/entertainment machine?
Re:WSL Getting GUI Support by throwaway8941 on Saturday September 26, 2020 @10:33AM (#24599133)
Why would you have a separate machine just for that? I thought one of the strongest points of PCs (as opposed to phones/game consoles) was their wide applicability to pretty much every task?
Re:WSL Getting GUI Support by dasyatidprime on Saturday September 26, 2020 @10:26PM (#24603727)
In my case, mainly to lower the risk of supply chain attacks. Windows gaming and other such activity still includes a lot of “must run as administrator and does unclear things with this”, especially in anything with anti-cheat mechanisms as mentioned elsewhere, and there are environments (especially when dealing with mods) where you can wind up running code from dozens of randoms across the Internet in nothing approaching a meaningful sandbox. Popular messengers, video apps, etc. don't exactly seem trustworthy nowadays either.

I wouldn't want to try to directly deliver anything from such an environment that I would ask other people to run. Even my more-trusted development laptop feels scary at times, especially when I'm operating in environments where I have to do about the same thing as above with installing a dozen dependencies from who-knows-whom. I generally use separate build UIDs for some measure of separation in these cases, but we still have Linux and X being potential emmentaler attack surfaces, and I haven't yet arranged my workflow to the point that spinning up new virtual machines is trivial, especially because then you have a lot more friction with testing GUI software, sharing existing files, etc. etc.—most of the easier solutions to which seem to be very cloud-oriented and “when your Internet connection goes down, so does everything else”, which is something I insist on pushing back against in this context, including because “someone upstream did something unexpected and now everything is instantly broken in a way I have no real leverage over” is its own massive trust hazard.

My dedicated low-sensitivity machine isn't very powerful, so the cost wasn't as much of an issue as it could have been; it was a midrange laptop several years ago which I'm still using. If your workplace environment comes with its own hardware, then that's a thing too.

It would certainly be nice to have better, though, and the desire for less redundancy of costly hardware is legitimate. My desired setup from a while ago, which I never managed thus far, is to have more powerful hardware with multiple boot configurations, but not all of them persistently present like most multi-boot machines: instead, I would physically attach and detach system and user disks, assuming that firmware-level attack persistence is rare, and then rely on power-down flushing any lower-trust code before attaching a higher-trust disk. It'd be hard to ask most people to do this, though.

Re:WSL Getting GUI Support by monadic2 on Saturday September 26, 2020 @03:25PM (#24601465)
Obviously not if they're having to shoehorn Linux in there just to attract developers!
Re:WSL Getting GUI Support by recursive on Saturday September 26, 2020 @07:59PM (#24603120)
They don't have to do that. But it's yet another thing that can be done.
Re:WSL Getting GUI Support by monadic2 on Saturday September 26, 2020 @08:54PM (#24603359)
Sure, but it rather pokes a hole in the concept of general computing, does it not? If windows were an acceptable general purpose OS people here would be mad they were wasting their time on this.

Somehow I just don't see the same demand for people on macs/linux and WINE. It seems like a niche interest to actively want to combine the two worlds and I am VERY interested if any significant number of people use this who are not driven by gaming needs.

Re:WSL Getting GUI Support by recursive on Saturday September 26, 2020 @09:40PM (#24603524)
Sure, but it rather pokes a hole in the concept of general computing, does it not?

I don't see how. I pretty much think anyone should do whatever they want with their computers. Windows is acceptable for some, and not for others. I can't see the point of getting mad about what software other people are running.

I have never used WSL, but if I ever do, it definitely won't be for gaming.

Re:WSL Getting GUI Support by ThrowawayR2 on Saturday September 26, 2020 @10:59AM (#24599313)
Outside of the HN crowd, it's unaffordable to maintain two separate, fairly powerful computers for work and gaming.
Re:WSL Getting GUI Support by monadic2 on Saturday September 26, 2020 @08:56PM (#24603363)
Like, game consoles? That seems to be the way the average person games. It's also far cheaper than pimping out a PC.
Re:WSL Getting GUI Support by arvinsim on Saturday September 26, 2020 @09:08PM (#24603403)
Not all game genres are optimized for console. First person shooters come to mind.
Re:WSL Getting GUI Support by manigandham on Saturday September 26, 2020 @11:29PM (#24604012)
Why not? It's great having a single machine that can do everything.
Re:WSL Getting GUI Support by recursive on Saturday September 26, 2020 @10:32AM (#24599128)
Computers are multi-function, and often general purpose.
Re:WSL Getting GUI Support by ubercow13 on Saturday September 26, 2020 @11:02AM (#24599334)
Why do you have a single gaming/entertainment machine? Shouldn't those functions also use separate PCs?
Re:WSL Getting GUI Support by wtetzner on Sunday September 27, 2020 @11:47AM (#24607494)
Why? They can both be done on the same hardware. Why buy more hardware when it can be fixed in software?
Re:WSL Getting GUI Support by FpUser on Saturday September 26, 2020 @07:39PM (#24603028)
I think it is up to the owner to decide and not for you to tell the others how to do the things they do.
Re:WSL Getting GUI Support by 0-_-0 on Sunday September 27, 2020 @05:46AM (#24605461)
It was a reductio ad absurdum argument
Re:WSL Getting GUI Support by wayneftw on Saturday September 26, 2020 @12:44PM (#24600139)
Running a gaming/entertainment system on your workstation irresponsible. Even before I switched to Manjaro Linux for my daily driver workstation, I had separate machines for gaming and working.

First of all, because I've seen many a PC game anti-cheat software cause system-wide issues.

Second, because I don't even do those things in the same room.

Third, because for your common web developer a 2nd PC is cheap. You can get a refurbished i5/i7 machine, add a new 32GB of RAM and a 512GB SSD for less than $500. [0] This will last you for 5 years, easy.

I'm also in my 40s and I like things simple, clear-cut and easy. Mixing Windows with Linux is none of those. Dealing with one work OS is by far easier than dealing with two of them. Also, XFCE runs circles around the Windows GUI while providing better features liked a tabbed file browser and a taskbar that natively supports all the features that I used to have to hack into Windows with 7+ taskbar tweaker.

[0] https://www.amazon.com/s?k=HP+elite+renewed

Re:WSL Getting GUI Support by mastazi on Saturday September 26, 2020 @07:00PM (#24602822)
I used to have a MacBook for work (sw dev) and a gaming desktop PC for entertainment and hobbies (games, music production, photo editing and graphic design).

Until one day, this part wasn’t true any more:

> Third, because for your common web developer a 2nd PC is cheap. You can get a refurbished i5/i7 machine, add a new 32GB of RAM and a 512GB SSD for less than $500. [0] This will last you for 5 years, easy.

Unfortunately not all types of dev work can be done on a middle-of-the-road machine.