Live data from Hacker News

Convert Linux to Windows

philipbohun.com

371–380 of 459 posts

Re: Convert Linux to Windows

#371
post #191

I have points to burn, so I'll post, because I know this will scratch some folks the wrong way- apologies in advance. I use Windows. In fact, I like Windows. I know lots of (ok, more than 5) greybeards who feel exactly the same way. I don't want Linux to be Windows, but I also don't want Linux on my personal desktop either. I have a Mac Mini M1 on my desk, and I use that for the things it's good for, mainly videoconf…

> sub-par desktop experience. I strongly disagree. Linux (KDE) is a far superior desktop experience these days, compared to Windows 11. Have you even seen the new Win11 taskbar and the shitty Start Menu - they ruined something which they perfected in Win7. The overall UX has taken a deep dive - like with the unwanted removal of classic Control Panel applets like "Window Color and Appearance" (which doesn't have a rep…

> Have you even seen the new Win11 taskbar and the shitty Start Menu - they ruined something which they perfected in Win7.

Yes, one of the biggest visible downgrade of a core feature with W11! It's is awful and buggy, but then Windhawk mods and menu alternatives and app launchers exist, so it can tweaked to be good again (though they didn't perfect anything in any W7 or any other version, there is not a single perfect UI component)

> The overall UX has taken a deep dive - like with the unwanted removal of classic Control Panel applets like "Window Color and Appearance" (which doesn't have a replacement)

Again, bad stuff, though the classic control panel was also bad, the only consolation is that at the steady state you don't use those often

> CLOCK app requires you to sign-in (why?) [1]. There are even ads in MS PAINT [2]! Tell me if this is acceptable?

It isn't , but then why would you ever use these bad stock apps even if they had no ads??? Much better options exist!

But all of those mostly fixable annoyances pale in comparison with the inability to have a great file manager like Directory Opus or being able to find any file anywhere instantly with Everything or having a bunch of other apps (and then you'd have plenty of other issues tweaking OS UI or have sleep or hardware compatibility issues people keep complaining about)

Re: Convert Linux to Windows

#372
post #135
post #122

Earlier quoted context omitted.

This is great! Someone else mentioned binfmt_misc. I didn't know about that.

The next step is to isolate the Windows applications: you could use different WINEPREFIX, but I think the better way is to do it like android: one "user" per application. It's not just to prevent applications to read other applications files, but also to firewall each application individually For example, if you don't want the application you've mapped to user id 1001 to have any networking, use iptables with '-m own…

> The next step is to isolate the Windows applications: you could use different WINEPREFIX,

In case you're not aware, wine prefixes each use their own settings, but are not isolated from one another.

https://gitlab.winehq.org/wine/wine/-/wikis/FAQ#how-good-is-...

> but I think the better way is to do it like android: one "user" per application.

This would help somewhat, assuming you don't run them all in one user's X session. On Linux, some desktop environments have a "switch user" action to start a separate desktop session running as another user on another virtual console. You can switch between them with Control+Alt+F2, etc.

Re: Convert Linux to Windows

#373
> "In Windows, you do not make system calls directly. Instead, you dynamically link to libraries that make the system calls for you. This allows Microsoft to do all sorts of shenanigans at the kernal level while providing a stable API to userspace."

Or, in other words, "We can solve any problem by introducing an extra level of indirection."

Re: Convert Linux to Windows

#374
post #108

> The Linux Environment is Unstable How many missiles do you know that run Windows?

How many do you know running Linux? Most of them are either specialized bare-metal OS and the rest is VxWorks.

https://search.brave.com/search?q=missiles+running+Linux

Re: Convert Linux to Windows

#375

People always talk about this “I can run a 20 year .exe file” situation but when I tell you that I have never, in 30+ years, EVER had a need to run a 20+ year executable, it just makes me go… yeah, and? Sure I believe backwards compatibility is a nice to have feature, but I have never, nor do I think I will ever, have a need to run 20-year-old software.

Games

Re: Convert Linux to Windows

#376
post #320

Earlier quoted context omitted.

> It's not just about dynamically linked executables. The userland of Linux simply isn't as stable time-wise as Windows, especially when the timescale is measured in decades. That’s exactly what dynamically linked executables are: user land > As an example, the latest Atari Jaguar linker (aln) for Linux was released back in 1995. It's a proprietary, statically-linked 32-bit Linux a.out executable. That’s not a user l…

>> As an example, the latest Atari Jaguar linker (aln) for Linux was released back in 1995. It's a proprietary, statically-linked 32-bit Linux a.out executable. > That’s not a user land problem. That’s a CPU architecture problem. Windows solves this WOW64 which provides a compatibility layer for 32bit pointers et al. In this specific case, it really is a user-land problem. I've went to the trouble of converting that…

> In this specific case, it really is a user-land problem.

a.out isnt even supported in new Linux kernels so how is that a user land problem? And you then repeated my point about how it’s not a user land problem by describing how it works as an ELF. ;)

> These cases aren't equivalent. COM and MZ are 16-bit executables for MS-DOS [3], NE is for 16-bit Windows ; all can be officially run without workarounds on 32-bit x86 Windows systems (NTVDM has admittedly spotty compatibility, but the point stands). Here, we're talking about 32-bit x86 code, so COM/MZ/NE does not apply here (to my knowledge there never has been 16-bit Linux programs anyways).

You’re not listening to what I’m saying.

COM and a.out are equivalent because they’re raw formats. Even on 32 bit NT systems COM required emulation.

The problem is the file formats are more akin to raw machine code than they are a modern container format.

So yeah, one is 16 and the other 32bit but the problem you’re describing is related to the file format being unforgiving for different CPU architectures without emulation; and in many cases, disregarding the user land entirely.

By your own admission, 32bit PEs and 32bit ELFs work perfectly fine on their respective Windows and Linux systems without any hacks.

The difference here is that Windows ships WOW64 as part of the base install whereas mainstream Linux distributions doesn’t ship 32bit libraries as part of their base install. That doesn’t mean that you need hacks for 32bit though. For example on Arch it’s literally just one line in pacman.conf that you uncomment.

My point was, if you wanted to ship a Linux distribution that supported random ELF binaries then you could. And package managers like Nix prove this fact.

The reason it’s harder on Linux isn’t because it requires hacks. It’s because Linux has a completely different design for installing applications and thus backwards compatibility with random ELFs isn’t generally worth the effort.

Also it’s really not fair to argue that a.out, a format that’s defined in the 70s and looong since deprecated across all unix-like systems is proof that Linux isn’t backwards compatible. ELF has been the primary file format for nearly 30 years on Linux now and a.out was only relatively recently fully removed from the kernel.

Whereas COM has been problematic on Windows for the entirety of NT, including Windows 2000 and XP.

Re: Convert Linux to Windows

#377

> Try doing the same with a Linux binary that's just a year old. I do that all the time. Just link to a static glibc or musl.

I really want to statically link OpenGL and Vulkan for exactly this purpose, but neither use a wire protocol (unlike X11 or Wayland). The whole "loading library" scheme feels like hazing for any beginner graphics programmer on top of the already complex graphics APIs.

I know at least for OpenGL, not all graphics cards/drivers would implement the entire featureset. So there was a reasonable justification for the dynamic linking and bringing in functions one by one.

Re: Convert Linux to Windows

#378

> I can pull down a 20 year old exe and still run it today on Windows. Why, oh why, I have to deal with exe files that are not even 5 years old and don't work on my windows laptop after update... I wish I lived in Author's universe...

and you could! all if you could find the right DLLs

Re: Convert Linux to Windows

#379
post #366

Earlier quoted context omitted.

Aside from comparing two different things, as you correctly identify, I believe that even the author's original assertion just isn't true. Maybe for some exe files, but I doubt for all or even most. I was involved in replacing Windows systems with Linux + Wine, because (mission-critical industrial) legacy software stopped working. No amount of tweaking could get it to work on modern Windows system. With Wine without…

> I was involved in replacing Windows systems with Linux + Wine, because (mission-critical industrial) legacy software stopped working. No amount of tweaking could get it to work on modern Windows system. With Wine without a hitch, once all the required DLL files were tracked down. I moved from Windows 11 to Linux for the same reason: I was using an old version of Office because it was faster than the included apps:…

> I really loved Windows (and AutoHotKey and many other things)

oh, do you know - how can I configure e.g. Win+1, Win+2, etc to switch to related virtual desktops? And - how to disable this slow animation.. just switch instantly?

May be you have several ideas where I should search. I'm use Linux as my OS for a long time, but now I need to use Windows at my job. So, I'm trying to bring my Windows usage experience as close as possible to so familiar and common on Linux.

Re: Convert Linux to Windows

#380

> While the Linux syscalls themselves are very stable and reliable, the c library on top of them is not. Practically all of userland is based on libc, and therefore by proxy Linux itself has a binary compatibility problem. People who primarily use Linux often forget that Windows has the exact same problem. In the case of Windows libc is distributed as part of the Visual C++ runtime. Each version of Visual Studio has…

A big difference is that you can easily install an up-to-date MSVCRT. How do I upgrade glibc on RHEL 8? As far as I can tell you basically can't.

Linux is based around OSS, so the answer would be to recompile from source.

Falling that, run inside a container

Post reply on HN