Is it possible to build Wine with Snappy?

As I know Wine need root privilegies to work properly, or I misunderstanding it?

It would be great if some one snap Steam :smiley:

1 Like

AFAIK Wine itself doesn’t need any extra privileges however the Windows apps are then limited by the privileges of the user that runs them. Wine IMO is a prime candidate for a Classic snap.

1 Like

If you think of wine as snapped standalone “interpreter” this might be true…

But i’d also like to think of wine as a snapcraft part that you can use to ship standalone apps (simply by bundling and configuring wine for that one app at snap build time).

After all wine is opensource so worst case you can adjust everything needed and re-build it to match all requirements to have the app run as a fully confined app…

The more interesting question is what you actually want to ship as a wine app, there the licensing and redistributability (specifically the latter) of the particular windows app you snap comes into play …

1 Like

I agree, wine is just like Python or Perl in this regard. It can be packaged as a snap or as a part equally well. I think that it should start as a part, as this gives people more stability for particular applications. Over time specific snaps may opt-into content-share from a shared wine snap.

Ohhhh that’s cool, then we don’t need apps like PlayOnLinux at all (though I was helping upstream snap POL 5 and I guess that can be an option too). Then all people have to do is e.g. sudo snap install ageofempiresiihd to get Steam installed with a Wine configuration appropriate for the app. Some custom stuff needs to be done after AoE is installed though, maybe POL scripts are still the most user-friendly way of doing this (idk if it’s possible to make scriptlets that only run after the user does something with the installed snap).

i couldnt resist and played with it on the weekend …

sudo snap install --devmode --edge wine2-15

ogra@styx:~/wine-2.15$ ls /snap/bin/wine2-15.*
/snap/bin/wine2-15.notepad  /snap/bin/wine2-15.winecfg      /snap/bin/wine2-15.wineserver
/snap/bin/wine2-15.regedit  /snap/bin/wine2-15.wineconsole
/snap/bin/     /snap/bin/wine2-15.winefile

note that this is indeed highly experimental …

the source can be found at and needs an i386 lxd container or chroot to do the build in …

i hope that can serve as inspiration for someone to improve it :wink:

oh, and here is a screenshot running internet explorer using this snap (via wine2-15.winefile, navigating to C:\Program Files\Internet Explorer\ and double clicking iexplore.exe)


Does this provide a wine interface for other snaps to use? :stuck_out_tongue: Or, if not, how would we go about getting it to provide that interface?

Yeah, a content-sharing Wine platform snap, or at least a snapcraft part for Wine, would be a lot more interesting than a standalone Wine app snap


no, it is simply a snap of the latest wine development release, you can either just grab the source and add another part in the snapcraft.yaml (i.e. steam) that installs a windows app and modify it in a way that the app gets started directly … or you could turn it into a classic snap to provide wine system-wide through it …

i dont think a “wine” interface per-se makes much sense …

you could have a wine-shared snap (like @mhall119 suggests) that shares its libs via the content interface too i guess (if you manage to make it run in strict mode at all, there are some issues)

feel free to experiment with it … thats the reason why i published it … so people have a base to hack on :wink:

I’m curious why you did the git clone in imperative form via the prepare: script rather than as a declaration using source:

prepare: |
  set -e
  git clone --depth=1 -b wine-2.15 git:// wine
  mv wine/* .
  rm -rf wine

because of the --depth=1 … checking out without it takes ages :slight_smile: while dropping all history (after all i just want to build the latest) makes it a breeze to check out …

maybe that should be default in snapcraft builds then? Or would that cause issues?

dunno, i was to lazy to ask :slight_smile: but perhaps @sergiusens can tell us if there is an actual reason … to not use it

1 Like

Shallow depth used to be the default, and it was changed because it broke other things.

You can now however specify source-depth so no need to hard wire your git clone command in prepare


What do you mean be ‘flagged’?

That’s just Discourse’s housecleaning stuff, you can ignore it. I deleted my comment because I didn’t read the one I was responding to fully before I commented, and what I was asking was already answered.