Winepak – Abstraction done (almost) right

The concept of running Windows software on top of Linux is a tricky one. First, it defies the intended usage. Second, it requires some significant digital acrobatics in order to marry two incompatible layers, the Linux system and Windows applications.

Over the years, the primary effort trying to reconcile the almost impossible yet tantalizing wedlock has been through WINE, a compatibility framework that translates Windows API into POSIX calls. Easier said than done, and if you’ve read my reviews on this topic, you will have noticed that: 1) not too many programs can run well in this fashion 2) few common, popular programs that Windows folks use fall into the previous category 3) the quality of abstraction has been going down over the years. Top that with the inherent nerdy nature of WINE, which requires a fair deal of manual labor, and the end result is not a satisfactory one. But now, a new challenger has appeared. It’s called Winepak.

Flat, flat wine

If you search for Winepak, don’t be surprised if the first few search engine hits turn out to be entirely related to consuming alcohol with style. Winepak is a new project, and it tries to blend several ideas in a clever combo. You have WINE – but you don’t give it to users directly. Nope. Instead, you wrap WINE and associated Windows programs (already wrapped in WINE) in Flatpaks! Hence the name.

Now, you may be wondering, flatpaks? Ah, well.

The world of Linux is undergoing an abstraction journey – for better and worse, usually the latter. Software is becoming exceedingly complex (for no good reason), and so simplified management mechanisms are created to manage complex software. For example, systemd. Or any cloud platform.

But … when done right, abstraction can be good. You do not want people to see the gory details. Actually, you do, provided they are professionals and experts who MAINTAIN the infrastructure. But if they are only ordinary USERS, you want to hide the difficult pieces behind an elegant and transparent framework with a minimal set of functions that users see and interact with.

The excessive multitude of package manager in Linux – and the growing complexity of how applications and their dependencies are managed in Linux – led to the birth of several package management abstraction layers. We’ve all of them on OCS-Mag before – Snapd, Appimage and Flatpak. They are trying to bring the simple click-and-play simplicity (that people normally associate with Windows) into Linux, so that common users need not worry about dependencies, broken shared libraries or anything alike.

Flatpak is indeed the chosen one (not Neo) that the Winepak people selected for their project. They decided to use the Flatpak mechanism to bundle Windows applications – through Wine – into simple standalone packages that you install without any great fuss.

In other words, you do not need to worry about manually satisfying confusing WINE dependencies like mono, gecko, various Windows runtime libraries, or alike. You let Winepak install programs, and the ugly bits and pieces are auto-magically sorted. This is a great concept – if not 100% original. There was Winetricks, which should have helped you install various dependencies. PlayOnLinux also tried this before, and it had a very fancy frontend, nice pictures and descriptions, but ultimately, it did not lead to any great adoption or increased success in how Linux folks consume Windows apps. I believe the main reason is because PlayOnLinux did not fully manage to abstractize the WINE backend.

So the big question is, does Winepack actually work? Well, let’s check.

Winepak setup

To get this working, you need Flatpak installed. In most distros, the setup is a one-liner from the official repos. Once you have flatpak in place, you can use it to install/configure the Winepak repo, and then pull software from it.

flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remote-add --if-not-exists winepak https://dl.winepak.org/repo/winepak.flatpakrepo

Once this is done, the next step is to install some Winepaks. And here you hit a snag.

The weakest hyperlink

At the moment, all abstraction package managers have the same problem – weak integration with the native system package management tools. If you want to install snaps or flatpaks, you will usually have to resort to doing it from the command line. You can’t reliably use frontends like Gnome Software or Discover, for instance. Many other package managers do not support these frameworks yet. Moreover, flatpak installations are somewhat interactive, i.e. they will ask questions, so this is best done on the command line, otherwise, even if the package manager frontend supposedly support these frameworks, installations will often fail.

Then, you don’t really have any truly official repos for snaps or flatpaks. In time, the current online stores may attain such status, but we’re not there yet. Finally, the command line interface that these abstraction tools utilize is not very friendly – the result of the modern, trendy development that has taken much away from the UNIX/Linux simplicity. This is not a Winepak problem per se, but it manifests here.

So how do you grab Winepaks? How does one even find them?

You can search online – the GitHub project page has the list of supported applications, or use the command line to query the global repo space or the specific (Winepak) repo. For instance, if you search using the string internet, you will get:

flatpak search internet
Application ID                     Version Branch Remotes Description                                                  
org.gnome.Polari                   3.28.0  stable flathub An Internet Relay Chat Client for GNOME                      
de.haeckerfelix.gradio             7.1     stable flathub Find and listen to internet radio stations                   
org.gnome.Epiphany                         stable flathub Web browser for GNOME                                        
com.github.muriloventuroso.easyssh 1.2.1   stable flathub SSH Connection Manager                                       
org.tuxfamily.XMoto                        stable flathub 2D motocross platform game                                   
org.megaglest.MegaGlest                    stable flathub Real time strategy game (RTS)                                
org.gnome.Weather.Application              stable flathub Show weather conditions and forecast                         
org.gnome.Rhythmbox3                       stable flathub Play and organize your music collection                      
org.gnome.Devhelp                          stable flathub A developer tool for browsing and searching API documentation
org.frozen_bubble.frozen-bubble    2.213   stable flathub An addictive game about frozen bubbles                       
io.github.quodlibet.QuodLibet      4.1.0   stable flathub Listen to, browse, or edit your audio collection             
io.github.jkozera.ZevDocs          0.1.0   stable flathub A developer tool for browsing and searching API documentation

Why and how is XMoto related in any way to the search phrase? Or MegaGlest? Then, if you just check what the Winepak repo has (the list slightly differs from the GitHub information), you get different information still.

flatpak remote-ls winepak
Ref 
com.blizzard.BattleNet.BaseApp 
com.blizzard.Overwatch 
com.blizzard.StarCraft2 
com.blizzard.WoW 
com.leagueoflegends.Client 
com.oskarstalberg.Planet 
com.pathofexile.Client 
com.worldoftanks.Client 
info.cemu.Cemu 
org.notepad_plus_plus.Notepad-plus-plus 
org.winepak.Platform 
org.winepak.Platform.Compat32 
org.winepak.Platform.Extension.corefonts
org.winepak.Platform.Extension.d3dx9 
org.winepak.Platform.Extension.msls31 
org.winepak.Platform.Extension.vcrun2010
org.winepak.Platform.Extension.vcrun2012
org.winepak.Platform.Extension.vcrun2013
org.winepak.Platform.Extension.vcrun2015
org.winepak.Platform.Wine 
org.winepak.Platform.Wine.Compat32 
org.winepak.Sdk

And now, we need to actually install software. Pay attention to the flatpak syntax – hopefully, one day, none of this will be necessary, and ordinary users will be able to install software completely seamlessly, using a frontend and never worrying about any command line.

flatpak install winepak com.worldoftanks.Client
Installing: com.worldoftanks.Client/x86_64/stable from winepak
[####################] 1 delta parts, 1 loose fetched; 435 KiB transferred in 2 seconds
Installing: org.winepak.Platform.Extension.d3dx9/x86_64/3.0 from winepak
[####################] Downloading: 100.3 MB/100.3 MB (1.9 MB/s) 
Installing: org.winepak.Platform.Wine/x86_64/3.9-staging from winepak
[####################] 7 delta parts, 121 loose fetched; 121342 KiB transferred in 34 seconds
Installing: org.winepak.Platform.Wine.Compat32/x86_64/3.9-staging from winepak
[####################] 6 delta parts, 106 loose fetched; 110135 KiB transferred in 34 seconds

I decided to try Notepad++ (which I already use and I know runs well under WINE) and a second, more complicated usecase, a 20-30GB game called World of Tanks. Indeed, Steam notwithstanding, games are one of the major reasons that stops Windows people from moving to Linux. If Winepak can fix that, then we have a powerful market force at play.

Test results!

Notepad++ was an easy one. The program runs well. You can’t pin a WINE icon in Plasma, but there’s a neat workaround for that, of course. The program also runs with admin privileges by default. But overall, there were no issues. The text editor installed just fine, with Flatpak installing various dependencies and packages it needs. As you would expect. Let the software – and the professionals making it – do all the hard work. At the moment, the one snag still remaining is that running flatpaks takes the non-intuitive form of:

flatpak run org.notepad_plus_plus.Notepad-plus-plus

Notepad++, install

Notepad++ running

World of Tanks was a more complex test case – but it worked just fine. The game does eat bandwidth like crazy, and setting it up took a good hour or so what with all the downloads, but it does not matter. The whole point is that it works! Ignoring the command line, ordinary people just execute a command or double-click something, and it installs and runs.

WoT updates

WoT firewall

It’s the real deal – this is a Windows game, and it has an option to configure the Windows firewall and all.

The other interesting observations here are – flatpaks are apps, like any other, so they also show in the system menu. Very neat and useful. The downside of this method – this also affects the other abstraction tools – is that the downloads tend to be quite large. Notepad++ setup took about 700MB worth of data, which is understandable in a way, because you need a lot of Windows-Linux stuff to make it all work. But if you’re installing lots of small programs, the disk cost can be significant. With the other test case, the WINE side of things was a non-issue, being dwarfed by the actual game data.

Notepad++, system menu

But other than the disk gluttony and the cumbersome hax0r way of doing flatpaks, there were no issues really. Things were running fairly smoothly, and even though the current collection seems small, it works. And I find this is a better approach than advertising 10,000 apps, most of which fail miserably. The one thing I was missing is Internet Explorer 8. It shows in the GitHub list, but it’s not in the repo for some reason. I was looking forward to this test.

flatpak install winepak com.microsoft.InternetExplorer8
error: Error searching remote winepak: Can't find ref com.microsoft.InternetExplorer8

Conclusion

Winepak is an excellent idea. It blends some clever technology and pulls off a decent demonstration. These early results are very promising. I know that software bundling and re-distribution will always be a big problem when it comes to proprietary software, but if the framework proves robust enough, it might make a big difference. Hopefully, this won’t be a one-hit wonder that quietly disappears after a while. After all, I have every reason to be skeptic. Virtually every single fork, spoon and derivative of WINE, except an odd commercial project, has withered away.

But we’re not there. We’re here, in the happy zone. Winepak hides the nerdy stuff from the user, and that’s a great thing, and it’s the right approach to winning converts. The bigger issue remains around how Flatpak works. There must be a GUI way of doing it, and one should never need to use the command line to query repos, list software or anything like that. I believe this ought to be the easy part in this equation. Anyway, I am quite pleased with this project, and I’ll be watching it. Meanwhile, I have some games to play, right. Take care.

Cheers.

  • jawnhenry

    “…so simplified management mechanisms are created…For example, systemd…”

    Did you really intend to write that?

    • ivanhoe1024

      Actually, to follow your totally-off-topic comment, I would really love to read a review on macOS, since I saw some Windows 10 reviewing on your website… just to know how it would perform according to your standards! It could be really amazing!

      • Dedoimedo

        Well, that would require that I be furnished with a nice, expensive device with macOS on it. Unless that arrives miraculously by postal mail as a gift, that sort of review is unlikely to happen soon.
        Dedoimedo

        • ivanhoe1024

          Who knows, never say never! Anyway, I really enjoy your posts, nicely done!

    • Dedoimedo

      Sarcasm is a dish best served cold.
      Dedoimedo

      • jawnhenry

        In this case, immersion in liquid helium would be insufficient…

    • Dedoimedo

      I did try a few of those in the past – check my unix section – and the results weren’t too promising.
      Dedoimedo

  • Bradford J. Hamilton

    “[Flatpak] – They are trying to bring the simple click-and-play simplicity (that people normally associate with Windows) into Linux.”

    “If you want to install snaps or flatpaks, you will usually have to resort to doing it from the command line.”

    Umm…never mind having to install Flatpak itself from the command line.

    To the developers of Flatpak, et.al. – nice try, but failure, so far.

    • mchlbk

      Not failure. A work in progress. First step is to see if it works. This seems to be the case – for now. Next step is to write a decent gui.

  • Ashberian

    If you want to install snaps or flatpaks, you will usually have to resort to doing it from the command line. You can’t reliably use frontends like Gnome Software or Discover, for instance.

    I’m anticipating one of your digital fingers pointing towards —> “reliably” … however, right now can’t remember if you already tried this :

    https://pointieststick.wordpress.com/2018/01/13/flatpak-support-in-discover/

    Must confess i didn’t experiment much so far, but did install “Spotify” and “Peek” from flathub through Discover, the process was as simple as expected ( search, expand info, click to install, enter password ) , but more importantly … both work just fine ( using KDE Neon up to date ) .

    If you already tried other apps and it was a total failure… sorry for wasting your time ( even checked your latests plasma-distros review again, searching for any Discover test ) … in case not… will be waiting to know the results in the near future.

    Thanks for this article.

  • Syfer Polski

    I’ve read about sompe problems launching games from winepack with an Nvidia GPU – did you play at least the tutorial, or did you stop at verifying the launcher worked?

    • Dedoimedo

      This wasn’t tested on a laptop with Nvidia gpu – only Intel graphics.
      It won’t work on the my old test laptop – it’s too old for that.
      Dedoimedo

  • Deckard_Cain

    They should make Winepaks for Microsoft Office actually. Not just for games.
    By the way, I read your experience with Flatpaks in CentOS, but in Mint 19 flatpaks are working wonderfully well, and integrated into the Software Center by default.

    • Dedoimedo

      Not sure if this can be done easily – they probably can’t bundle anything, but live downloads should work fine.
      Dedoimedo

      • Deckard_Cain

        Maybe… If they could though. This would solve the lack of Microsoft Office in Linux. They could offer Winepaks of it. I have a key for Office 2016 so if I could have a packaged app with the correct Wine configuration working out of the box it would be awesome. I don’t want to waste my time fiddling with Wine to get MSOffice to work though.

        I tried Manjaro because of the online version that you showed in your review, but it wasn’t working well when I tried it. Moved to Mint 19 since it’s the only other Linux distro (well maybe MX linux, haven’t tried taht one) with sane defaults and end user friendly.