Better HN
topnewbestaskshowjobs

Win4wine – Run Windows Shell as the Linux Desktop on Wine(github.com)

248 points · by hard_times · 1d ago · 129 comments

Comments
londons_explore1d ago
The good thing about windows is the windows NT kernel with very good performance, huge array of drivers, NTAPI and good security model. Win32 and the UI layer above is just mediocre.

The good thing about linux is the large suite of opensource tools, "everything is a file" and huge array of composable commandline tools.

Therefore, I think the reverse of this project might be the best outcome...

nialv71d ago
NT kernel in fact doesn't have good performance. process creation is especially slow (many orders of magnitude compared to linux) until very recently. IIRC windows' file system operations are also a lot slower than linux.
okanat1d ago
The performance of the process creation isn't a bug but an intended tradeoff. NT is slower because its process creation does more (checks for permissions, reloads binary, does relocation from scratch for DLLs, basically what fork + exec does but a bit more).

Many Unix systems didn't have threads but relied purely on multiprocessing. Threads on Linux is still a hack on top of the process API: clone.

On the other hand NT came with threads from the first release to do multitasking. It doesn't have fork because NT developers didn't want to add the hacky fork syscall for cloning the process / its memory area.

temac1d ago
NT has fork (not used often though, and not usually for creating child processes although maybe posix subsystems did it). Win32 doesn’t. Clone is fine. Spawning under Linux is way faster than spawning under NT, there is no tradeoff.
toast01d ago
My understanding is most of the windows file system suck is from the ever present synchronous anti-virus hooks on every read and write. If you disable that, it gets a lot better: I don't know how competitive it is, but it's decent. Unix/Linux file perf would suck if you forced synchronous anti-virus hooks as well.

Procees creation in NT is slow, but many applications can be designed to avoid it. Process creation is a bottleneck on Unix/Linux as well, the bottleneck is just usually not a big deal until you're trying to fork thousands of times per second... Then you have to do the same work you'd have done on NT to avoid forking.

asveikau21h ago
I think the most painful operation in NT filesystem apis are those dealing with filenames. Once you have a handle and only deal in handles, it does better.

This is also complicated by the fact that NT tends to orient operations around handles, but win32 deals in names. So the win32 to NT translation step often has an extra CreateFile or two.

Also filesystem drivers are kind of heavy on windows, and compared to Linux VFS they have more caching and stuff that gets applied globally. I believe, for example, that on Linux you get the name to inode caching from the VFS layer, and in windows it lives in ntfs.sys. You can read that contrast as Linux allowing performance focus in the right layer and Microsoft bolting on non-essential bloat and complexity in the FS driver.

(Also, hello.)

cyberax1d ago
No. The file system layer in NT sucks because it sucks.

File operations in NT are implemented using a very generalized model of IRPs (IO Request Packets) that are routed through (possibly) multiple layers of filters. It's very generic and extensible, but not fast.

They actually had to add a layer of shortcuts ("Fast IO") that bypasses this for a limited set of data operations, but not for metadata. This layer just uses classic tables of function pointers instead of IRPs, just like in Linux.

regularfry1d ago
Wasn't process creation being slow an explicit design choice? I seem to recall that it was a tradeoff for better in-process threads but I might well be misremembering.
sysmax23h ago
IIRC, the slow NTFS operations on small files is a safety trade-off. If you read 1000 small files using the NTFS driver, it will re-read all the associated control structures 1000 times, instead of caching and assuming no change. So, if anything else corrupts those structures on a mounted volume, it will get discovered earlier.

It is possibly related to the fact that mounting an NTFS volume doesn't prevent other software from writing to it via \\.\PHYSICALDRIVEn. With Windows effectively being a legacy OS for running legacy software, it's totally understandable why they would not change it.

dblohm71d ago
> process creation is especially slow

Again, that's not an issue with the NT kernel itself; most of that time is due to the Win32 layer which jumps through extraordinary hoops to support its app model, which essentially is an emulation of 16-bit Windows.

okanat1d ago
I wouldn't call core Win32 (ntdll, kernel32, user32, wsock32) mediocre. Windows NT userspace always had full async IO support. It is quite fast and really robust under load. If you used pure Win32 apps like Rufus, you'd see that it actually flies. Games also use pure Win32 and DirectX. They are quite good in performance as well.

Win32 is basically too big to have a global opinion. There are good parts and then there is event tracing API :)

It is still well-designed for its purpose and there is a lot of thought put for future compatibility, most changes do not affect the API but adds another bit field or puts some fields in a struct which has pre-reserved fields.

Now, Microsoft has largely abondonned Win32 and kept reinventing UI framework on top of UI framework. WPF was actually good. It is like QtQuick: declarative and GPU accelerated.

WinUI that came with Windows 8, however, is crap. Moreover Microsoft made 3 incompatible versions of it and didn't fix the bugs in the earlier versions and WinUI 3 is still accreting more. They also ported system utilities like Explorer to WinUI 3 inheriting all the bugs. You can still launch old Control Panel (pure Win32) and its performance compared to Settings (WinUI 3) is day and night. Moreover they do crazy stuff like using React Native to generate WinUI because they fired their capable devs and now left with full stack JS ones.

Add all the overhead of adware and extra telemetry and the AI bullshit, Windows 11 became a sluggish mess that requires a deep cleaning script after install to get the actual performance out. Win32 is still there, it is still fast. Whatever diff they have with Windows 7 isn't

jasomill21h ago
Windows 11 isn't a sluggish mess in my experience, no cleaning required beyond Group Policy options to disable a few things like widgets and Start menu Internet search and ticking the accessibility checkbox to disable UI animations, and I'm running it on hardware ranging from current to Ivy Bridge, with both Microsoft Endpoint and SentinelOne for corporate crapware (not on the same machine!).

Telemetry, however, is unfortunate in that it the only official way to fully disable it is limited to Windows Enterprise.

As others have noted, certain things like metadata-heavy filesystem operations and process creation are much faster on Linux: running a quick test just now, on broadly similar hardware (and the Windows box has a slightly faster CPU and SSD), Windows takes around 90 ms to run a trivial C program that Fedora 45 runs in less than 2 ms; some of this may be PowerShell vs bash overhead, though cygwin/msys2 bash is even slower).

What I haven't noticed, though, is a noticeable difference running heavy cross-platform GUI applications like Firefox and Rider on Windows vs Linux, or Windows Terminal being noticeably less responsive than Konsole (though PowerShell certainly isn't winning any awards for speed).

andai1d ago
> Windows 11 became a sluggish mess that requires a deep cleaning script after install to get the actual performance out.

Is there still a LTSC version? Or does that need "cleaning" too?

I don't use Windows, except once or twice per decade for nostalgic reasons, like visiting an old favorite prostitute for old times sake, to see how she is holding up.

okanat1d ago
> Is there still a LTSC version? Or does that need "cleaning" too?

There is. It requires significantly less "cleaning", almost none, but still a couple of annoying defaults. If you can live with the missing stuff, it is good.

Compared to consumer edition, it lacks the codecs and they are delivered through Microsoft Store unless you deploy it properly with the Enterprise tooling ($$$$). I don't want to deal with that so I use consumer edition Pro (which I have a legal license for with my XPS 15 and Thinkpad P1 Gen 5).

If you set up the consumer version with an EU locale, Windows also lets you remove almost anything, permanently. Anywhere else, tough luck. I think many problems with bundling and adware are not technical but social / legal problems. Push your governments to regulate big tech!

> I don't use Windows, except once or twice per decade for nostalgic reasons, like visiting an old favorite prostitute for old times sake, to see how she is holding up.

I was a full-time Linux user until 2020. I bought a Thinkpad for it. But I encountered so many driver issues with the new laptop that didn't get solved for a year or even more. Compounded with the studies, the stress of job search and the need of having something up-to-date (i.e. no "stable" distros) that works after the setup, I moved away. I knew and I know Linux desktop is still decades behind in many areas, I used to use it despite the fact.

After taking a microkernel course at the university and exploring L4 stuff, I definitely prefer NT's design over Linux. Dealing with real C / C++ deployments in a few jobs also made me appreciate Win32 more.

However, I just don't want to bother maintaining an OS unless someone pays me (which my employer does for a custom distro, that we have to patch kernel and other system bugs constantly).

IshKebab1d ago
Yes there is and it's very clean and fast. The only two problems I had with it were: 1. you can only buy it for a sane price on the grey market, fine for personal use. 2. it has some app store/gaming component that isn't installed by default, which isn't an issue for 99.9% of things (including Steam) but there was some random piece of software I wanted that was only distributed via NuGet and that was an insane mission to get working. I did manage it in the end but only by copying random DLLs from third party websites, which sucks balls.

Even so, it's easily the best OS option for PC at the moment. Linux/KDE is ok but Windows 11 is just more rock solid. I wish they would fix their schizo settings apps though. How are so many settings still only in the Windows NT era Control Panel?

ghm21801d ago
I recall that Musk got fired from paypal for proposing the use if Windows NT instead of linux/unix kernels for paypal way back. I recall that the reasoning of the engineers was security risk that this might have posed. My engineering brain tells me that the kind of risk wasn't likely poor engineering of NT vs unix/linux kernels, but possibly to do with the proprietary nature of the kernel, i.e. systems engineers in paypal can't really tinker and explore the kernel itself or debug issues in it easily. Was that the security angle paypal engineers were thinking of?
giancarlostoro1d ago
NT used to be notoriously bad at security, before UAC (which everyone hated, and came out in Vista) everything ran as admin. Hell, I remember exploits where just visiting a web page would load an EXE into your system.
ryanschneider1d ago
It didn’t even requiring visiting anything. At one of my first jobs I reformatted my machine to base windows 2000 and it was compromised before I could download the service packs.

IIRC the issue was that our ISP gave everyone a public IP and allowed NetBIOS traffic from the outside world and there were so many attackers port scanning IIRC port 139 you were found and compromised within a couple minutes of booting up.

IIRC the work around was to boot into safe mode and disable SMB and NetBIOS then reboot and download the service packs (or get an image with the service packs already baked in).

nine_k1d ago
WinNT the OS ≠ NT the kernel. It's like e.g. Red Hat the OS vs Linux the kernel.

And yes, the stuff above the NT API is... not nearly as good.

gpvos1d ago
Those problems weren't in the kernel, but in the layers above it, mostly the UI.
efdee1d ago
I think you are confusing NT with 95/98/ME/XP ?
noir_lord1d ago
XP SP2 was about where things really changed.

Gates realised that been not just insecure but publicly seen as insecure at the level they where trending towards was going to be an existential problem.

> So now, when we face a choice between adding features and resolving security issues, we need to choose security. Our products should emphasize security right out of the box, and we must constantly refine and improve that security as threats evolve. A good example of this is the changes we made in Outlook to avoid e-mail-borne viruses. If we discover a risk that a feature could compromise someone's privacy, that problem gets solved first. If there is any way we can better protect important data and minimize downtime, we should focus on this. These principles should apply at every stage of the development cycle of every kind of software we create, from operating systems and desktop applications to global Web services.

Though in hindsight given what Windows 11 has become this :-

> If we discover a risk that a feature could compromise someone's privacy, that problem gets solved first.

Is pretty funny (in a black humour sort of way).

[1] https://www.wired.com/2002/01/bill-gates-trustworthy-computi...

hparadiz1d ago
I have no idea why there's suddenly so much NT kernel glazing on the internets. Like Crowdstrike didn't just happen.
ok1234561d ago
Musk was just thinking: CGI slow, isapi fast.
gpvos1d ago
This is actually the most likely explanation. Even in the tiny number of cases that he's right, it's for the wrong reasons.
dizzant1d ago
Wasn't WSL1 an attempt at your "reverse of this project"? It didn't work out too well, the compatibility layer had too much overhead and WSL2 just went back to a standard VM setup.
xanathar1d ago
coLinux well before Microsoft did WSL1. It even had a distribution for it, andLinux.

At some point in time it was possible to install KDE natively on win32 too, but I never got to replace the win32 shell entirely with KDE.

171862744023h ago
WSL2 is not supposed to be a replacing version to WSL1, just a different variant. But yeah I think they do not invest much resources into WSL1. But did they ever? I thought it was just the repackaged Android implementation.
gmmachine1d ago
Yeah, I thought the same thing -- I like this better.

However this project is hosted on GitHub so now Microsoft owns this opposite codebase too.

_blk1d ago
MS "Hosts" not "owns" it. It's still LGPL
MrDrMcCoy1d ago
I vaguely recall trying a few of these back in the day: https://en.wikipedia.org/wiki/List_of_alternative_shells_for...
Fnoord1d ago
LiteStep or a successor, running Windows 98SE on a 80486, with MSIE removed from Windows, using ehhh.. I don't remember which browser I did end up using TBH. The main program which ran was 'PuTTy'.
eikenberry22h ago
I don't see MS releasing the NT kernel under a free software license anytime soon.
andai1d ago
Not sure what specifically you're referring to with performance? In my experience the main bottleneck is io, and in my tests, even Linux in VM on Windows was 6-7x taste than the Windows host on that front.

Not sure if that's the kernel's fault though. (Maybe it's due to ntfs, and it would be faster with a different fs?) Also I noticed over 100 reads to the registry when in a system monitor when I ran hello world in C (win10), which I found amusing and a little depressing.

VorpalWay1d ago
I'm no fan of windows (haven't used it for years), but I should point out that strace will show a lot of file system accesses on Linux that appear pointless too. For example trying to open libc.so in various paths other than where it is.

However, on Linux that still tends to be really fast, in part thanks to the negative dentry cache in the kernel (a cache of failed path lookups, there is a positive dentry cache too iirc).

I don't know if this in particular is a bottleneck on Windows though. I just know the end result of the combined engineering decisions is slow.

jeroenhd1d ago
"everything is a file" also applies to Windows where it makes sense. Composable command line tools have been solved since the first release of Powershell (which beats Linux' scripting tools by variables that are more than a string or maybe a number, and an array of those).

Hosting win32 without patches is a recipe for disaster in the image handling libraries and file previews, but it's a pretty neat way of working for the people would would've used Windows XP if they hadn't been forced off away from that.

The closed source nature gets in the way of enjoying Windows (maybe some native components can be replaced with their ReactOS equivalents?) but many of the POSIXisms are just suboptimal designs lauded purely because they're different from what Windows is doing.

pitched1d ago
The boilerplate overhead of writing Powershell vs Bash makes it unusable for humans. The worst gotcha for me was when it posts warning about the method names being unapproved verbs? I feel like, if you ever reach for Powershell, you’re already so deep into _Enterprise_ that the issues might not connect.
jeroenhd14h ago
I'm not the biggest fan of PowerShell but in the age of tab-autocompletion, I find the syntax more readable than the mess of `$(cat /dev/qiw/erp | tic -qtr) | ter -PaT` that you get in Bash scripts.

You can disable the linter if you want to use custom verbs, but I find their focus on consistency refreshing. There's no Bash version of https://learn.microsoft.com/en-us/powershell/scripting/devel... and the end result is that everybody just sort of does something and the most common behaviour is what sticks (most of the time).

cmovq1d ago
Isn’t the reverse of this project a Linux shell / desktop environment (which is famously not very good) on Windows?
antiframe1d ago
The Linux desktop environment is better than the Windows one. More configurable. No ads in the start menu. Respects your default browser setting. Isn't slow as molasses at browsing files. Easy tiling window manager. No copilot key that constantly throws AI at you. A file/program search that works and is fast. Easier to tell which window has focus. That's just off the top of my head.

I use Windows at work and the UX is godawful.

masfuerte1d ago
> Isn't slow as molasses at browsing files.

What are you using on Linux? I tried a few Linux desktops, all of which had different Nautilus-based file browsers. They were all much slower than Windows Explorer. Just opening a folder was slow and big folders were really slow.

jzemeocala1d ago
very true, especially now.

but, IMHO, XP and & were peak Windows OSes. Vista and then later 8 were the reason i switched to linux to begin with

Hugsbox1d ago
The desktop experience is one of the biggest draws for Linux, it's incredible. I'm forced to use Windows for work (which is the only time I'll tolerate using it), and when I go home to my lovely Linux machines it's like a breath of fresh air every evening.
d3Xt3r1d ago
That was exactly how I drove my Windows XP machine back in the day - I replaced Explorer with Blackbox (bb4win and later xoblite), patched the shell32.dll icons with one of the Linux icon packs (I believe I used Crystal XP at the time), most of my apps were FOSS (Firefox, OpenOffice etc) and my terminal was bash running under cygwin. Everyone who used my computer at the time thought that I was running Linux. :-)
0xbadcafebee1d ago
The good thing about Windows is support. You can call someone if it breaks, and the drivers are made (and supported) by the manufacturers so when you buy some hardware it will actually work. Linux doesn't provide that so it's perpetually difficult to get working. The Linux UX is also painful to troubleshoot/fix, but that's solvable.

Random case in point from this week: fingerprint readers. Did you know fingerprint reader support in Linux is garbage? I didn't, until the one in my laptop started freaking out in a recent kernel upgrade. I bought a few USB ones from Amazon to test them, and they're either totally unsupported on Linux or someone made a fork of a GitLab repo and (thanks to AI) has got the device halfway working, I just have to have my own AI agent develop/compile/install the fork. But there is of course working Windows drivers for all these fingerprint readers, and I can contact the manufacturer's support if I have an issue in Windows.

protocolture19h ago
Win4Wine4Windows
charcircuit1d ago
Why do you consider everything is a file is better than NT's everything is a object?
gwbas1c1d ago
English link: https://github.com/mikuta0407/win4wine/blob/master/.github/r...

(FYI: I suggest updating the link in this article.)

grg01d ago
Nah, I enjoyed every minute of the kanji. That's how you know the project is legit.
bluedragon122151m ago
There's vibecoders in Japan too, ya know
d3Xt3r1d ago
And for those of you who want the XP looks without Wine, there's the XPTC theme for XFCE: https://github.com/rozniak/xfce-winxp-tc
mminer23722h ago
There's also Chicago95 if you want to go further back: https://github.com/grassmunk/Chicago95
spider-mario1d ago
There also used to be CinnXP for Cinnamon, but it’s been unmaintained for a while and seems to have fallen behind updates. Maybe an LLM could revive it.
OsrsNeedsf2P1d ago
I've used winxp-tc before and it's a great project. I wish there was one for Windows 7
mminer23722h ago
Aerobird is pretty close: https://www.xfce-look.org/p/2343514/
haolez1d ago
Cool! This one also looks really interesting, although it is not released yet: https://loss32.org/

Might be an interesting alternative shell with decades of applications supported, although pure modern Linux is now a tough to beat contender.

drnick11d ago
I very much agree with this:

> The late-90's-to-early-2010's PC desktop experience was great for power users, especially creative users.

layer81d ago
Nice, this should be able to run things like AutoHotkey.

The drawback is, since it runs Windows XP (or Windows 7) explorer.exe, that it also comes with their vulnerabilities.

toast01d ago
> since it runs Windows XP (or Windows 7) explorer.exe, that it also comes with their vulnerabilities.

How many vulernabilities are in the desktop shell rather than the kernel and services (and html renderer, but don't expose your desktop shell to untrusted html)

nubinetwork18h ago
Wine has a Chicago styled desktop built in, but its barebones... most people never see it though because wine doesn't use desktop mode by default.
jorl171d ago
I love this! A classical "because I can project". Love the ingenuity around it.
OsrsNeedsf2P1d ago
That is an incredibly smart approach to it. I've recently been using leftover Claude tokens to transform KDE into Windows 7, but just running it via Wine is genius.
rnd01d ago
Linux has been around for something like 35, 36 years now, and it has a healthy infrastructure of it's own apps. I don't think we need to worry about this program making it go the way of OS/2 (which only lasted 15 years, total)

https://www.os2museum.com/wp/os2-history/os2-timeline/

jstanley1d ago
Is anyone worried that this will make Linux go the way of OS/2?
jamesnorden1d ago
If I could run the Vista shell it'd be sick. Wonder if there's any project to replicate it somewhat faithfully in the existing DEs.
dijit1d ago
I ran this: https://github.com/aeroshell-desktop/aerothemeplasma

Looks actively maintained, might give it a shot again.. I do miss Vista somehow.

regularfry1d ago
This is both:

a) Perverse

b) Wonderful

relistan1d ago
The best kind of thing :)
andrea761d ago
It reminds me the famous Windows 3.1 seamless integration into OS/2 environment
nxobject1d ago
This is amazing, and I'd be worried about running a decades-old Internet Explorer rendering engine as my daily-driver on anything security critical.
mghackerlady1d ago
Was this not already a thing? I can't remember if it was running the actual windows shell or a clone, but regardless I don't see much of a difference
d3Xt3r1d ago
You're probably thinking of the XPTC theme for XFCE: https://github.com/rozniak/xfce-winxp-tc
mghackerlady1d ago
No, It wasn't that since I remember it being wine related specifically
estebank1d ago
You're likely thinking of https://loss32.org/, which was also mentioned in another sub thread. I know it's the first thing I thought of too.
trashb1d ago
NT kernel has pretty cool heritage (VMS) and is one of the few "hybrid" kernels widely used. I don't know why anyone would want to put windows explorer.exe on top of linux if we have wine and custom window managers... but what do I know.

Still this project has a nice nostalgia appeal.

pmkary1d ago
So it took less than a day for XNU on Linux to get Windows on Linux. Lets call Linux the universal OS and forget the rest, will ya?
ctmlr1d ago
Soon all operating systems will be one and there will be no such thing as closed source.
ryankung1d ago
So it builds a fake win32 window just to trick explorer.exe into drawing luna borders?
pcwalton1d ago
Building hidden windows is a common Win32 idiom (because, among other reasons, that's the typical way you make a thing that can receive messages).
segararai1d ago
This brings back memories.
varispeed1d ago
This is great!
functionmouse1d ago
It's the most beautiful thing I've ever seen. I wonder if Aero is possible.
layer81d ago
The readme says it’s not supported yet.
RockRobotRock1d ago
This is a great idea
gigel821d ago
What I would love more would be a supported way to replace the Windows 11 Shell with something from the Windows 7 era, but keep the kernel, drivers, etc.
hard_times
OP
1d ago
this project supports Windows 7 shell, see: https://github.com/mikuta0407/win4wine/blob/master/.github/r...
qalmakka1d ago
I have mixed feelings about this. This is both incredible and utterly stupid at the same time. I love it.
funkytownjoe1d ago
I just love Chinese ai slop
layer81d ago
It’s Japanese.
Warudo1d ago
I always wondered about that. All it took for me was seeing Chinese, Japanese and Korean text side by side, one time. I can reliably tell them apart ever since because they just look so different. Do people really not have that experience? And does it also extend to other writting systems, for example are there people that confuse Greek with Cyrillic?
jandrese1d ago
Once you know what to look for the differences are easy to spot, but if you don't they all just look like boxes full of squiggles.

This page stood out because it's chock full of foreign words written in Katakana, a dead giveaway that it is Japanese. Also, my browser helpfully asked to translate from Japanese to English for me.

Korean is also easy to spot: If you see circles in the characters then you know it is Korean.

mathfailure1d ago
That's just a sort of chinese, like mandarin or vietnamese.
mghackerlady1d ago
This better be satire because as an amateur linguist I so want to punch you right now
scaramanga6h ago
China is about as likely to adopt hiragana as the Linux community is to adopt the windows XP shell.
snipedbywifi1d ago
we're better off having fun implementations that actually showcase pure AI code over gameslop. Almost zero people care about GPT [x].[y]'s or Fable [x].[y]'s Call of Duty recreations that "cost just $150". That used to be fun for novelty, but games as benchmarks dies down FAST
sorrywhat1d ago
I love it too, we could learn a thing or two and stop spamming shitty one-shotted "games" and "tech demos"
keithnz1d ago
maybe read the guidelines for HackerNews? You seem to be struggling with fitting in with HN culture.

GitHub - mikuta0407/win4wine: Windows XP の Explorer を Wine 上で Linux のデスクトップシェルとして動かす / Run Windows XP's shell as the Linux desktop on Wine

Windows XP の Explorer を Wine 上で Linux のデスクトップシェルとして動かす / Run Windows XP's shell as the Linux desktop on Wine - mikuta0407/win4wine

GitHub