Paint.NET 5.2 Alpha (build 9739) contains extremely experimental support for WINE (which means Linux).
To try this out, you need to:
- Use the portable version of the app. The installer will NOT work.
- You must be using at least WINE version 11.14. Seriously, just use whatever the latest version is.
-
You need add a registry key so that WINE doesn't try to override a DLL with its own version which does not work. Run this command to do so: (and if someone knows how to make it so that this step isn't needed, please tell me)
wine reg add "HKCU\Software\Wine\DllOverrides" /v d3dcompiler_47 /d native /f
- You should have DXVK installed.
- You must run the app with the /wine command-line parameter
Here is a screenshot of it running on .NET 10 win-x64, in WINE 11.14-dev, on Ubuntu, in WSL2, on Windows 11:
It also runs on real Linux, of course.
CAVEATS:
- It's slow. Sometimes very slow.
- It's definitely not stable. I like to say that it "doesn't not work".
- WINE still has big holes in some of the system components that Paint.NET requires. WIC's metadata support is quite lacking, etc.
- I have no idea when it will be not-slow and not-not-stable (there is no schedule or roadmap, in other words).
- This is "not supported", at least not yet ... and I don't know when or if it will be "supported". I don't even use Linux.
- Progress may be fast or slow, I don't know yet.
- Your Mileage May Vary
- Use At Your Own Risk
- Report bugs and crashes, and please try to figure out a reliable way to reproduce them
- etc. etc. etc.
- Have fun!
The way that this works is that Paint.NET, when given the /wine parameter, will disable the use of certain Windows components: UIAnimation, Composition, and the Windows 11 version of DisplayInformation.
Direct2D has always been the biggest hurdle for Paint.NET on WINE, and it's clear that it will never be completed enough for Paint.NET's use. And I can't just "disable" the use of Direct2D. So, instead, Paint.NET now has an internal, from-scratch, clean-room reverse-engineered rewrite of Direct2D that it uses on WINE (triggered by using /wine). It lives in PaintDotNet.Windows.Direct2D1.Managed.dll. This was written by our good friend Claude, without whom this would NOT have been possible and would NEVER have happened.
Quick Important Side Note: If you don't like AI, if you hate AI, if you refuse to run any software that AI touches, if your favorite pejorative is now "slop" ... fine. Whatever. I'm not going to try and convince you otherwise. You're entitled to your own opinion, I don't care. But keep that talk out of here. You don't have to use this. It's clearly not for you.
Most of this code is, as they say, "vibe coded." By that I mean that it has not been thoroughly reviewed, it's more "trust me bro" style. I cannot possibly review 180,000 lines of code, it's just way way way too much. For reference, the rest of Paint.NET is about 700,000 lines of code and I've been working on it for over 20 years. I did thoroughly review any code that had to be changed or added elsewhere in the Paint.NET code base (refactoring and integration points, etc.). Over time I do hope that more of this code will be vetted by real humans and also by more advanced AI models.
At times, Claude was working with the fury of 10 freshly unshackled Einstein genius-level 10x coders. And other times ... well, not so much. I had to babysit Claude quite a bit to make sure it did resource management correctly (for awhile it just wasn't doing the COM equivalent of AddRef() for reference counted objects, oops). I had to slap it a few times when I found some really bad design or architecture decisions. And I was also impressed at some rather clever and tireless reverse engineering work it did to figure out all the formulas needed for implementing Direct2D's built-in effects library. It never had to decompile/disassemble d2d1.dll, it figured it all out "clean room" style*. And it never got tired, it never got bored, and it never got annoyed when I changed my mind 10 times in a row.
Day and night, it just kept coding, and coding, and coding ... writing tests, comparing rendering output to the real Direct2D, making and updating hypotheses and formulas and shaders and error handling and everything until it got things just right ...
... And then it worked. It actually booted up. In WINE. Claude got this working in about 3 weeks. This involved a lot of Fable, a lot of Opus, and even some Sonnet (those are the 3 models in reverse order of intelligence/complexity). I finally managed to boot up Paint.NET in .NET 10 win-x64, in WINE, on Ubuntu, in WSL 2, on Windows 11. And then later that day some folks on Discord got it running on real Linux systems. There's been more work since then in order to further refine and fix up the code, but now it's at least kinda-sorta ready for others to try out.
It is NOT "production ready." I wouldn't even call it "alpha quality". It "doesn't not" work.
I'm not sure how this little project will proceed. I imagine that this gets Paint.NET far enough such that the remaining holes in WINE, especially in WIC and user32/comctl32, can now be tackled by folks on the WINE side of the fence. In other cases, it will be a better idea to implement more detours inside of Paint.NET so that WINE doesn't have to bother with implementing certain things (like, say, UIAnimation, or WIC metadata handling for images). Some crashes will be because of WINE, while others will be due to Claude's not-yet-fully-battle-tested Direct2D implementation. We'll figure it out eventually. Probably. But only if we're patient.
Also, this wasn't just a Claude effort. Credit must be given to folks like @Blue Beard who made a post last year and set up a GitHub repository for making patches to be upstreamed into WINE. We set up a channel on the Paint.NET Discord server for discussion, brainstorming, etc. That's how all of this got started at all. By humans.
(btw, yes, you can also technically use /wine even if you're on Windows and therefore not using WINE. In fact, I'll be doing that a lot myself once I get around to optimizing the dreadful performance side of things. Paint.NET only detects WINE for the purpose of printing information into the diagnostics information that you can see in Settings and in crash logs.)
* There was one case where it had to dig into d2d1.dll to figure out if Direct2D was using a public or a private/internal API for something that was proving a little tricky.