Isolated per-user/local only Wine using wine-dummy and PoL

Here is the place were the team and the community projects meet together. Help us to develop SolydXK projects or contribute your ideas for future releases.
User avatar
cx405
Posts: 25
Joined: 20 Sep 2015 14:57

Isolated per-user/local only Wine using wine-dummy and PoL

Postby cx405 » 04 Dec 2015 01:51

RE (this discussion). I have no .deb making experience, yet here I am running wine application using locally installed wine binary. :lol:

Means, wine/libwine is not present in the system globally - only its dependencies. User starts PlayOnLinux, pulls his desired Wine version and plays wine game in PoL.

How it works: I just created a package that fetches ALL wine:i386 dependencies, at same time installing none of wine binaries or files. The actual wine binary is thought to be installed within PlayOnLinux and not to be present outside of it. This is done for security and comfort reasons.

The dummy package also lies to the system to provide "wine", "wine32", "libwine" at same time conflicting with them - acting as a replacer. The dependencies it requires are not version specific, so it should work for the long time as replacer, unless something changes in Debian. These were copy-pasted carefully into single deb control file from wine:i386, wine32:i386, libwine:i386.

Here is the proof:
http://imgur.com/j98LrP3

Image

The steps to build such package:
1) download wine:i386.deb, wine32:i386.deb, libwine:i386.deb
2) using Ark or similar archive walk each of files and grab their "control" files.
3) sudo apt-get install dh-make
4) cd /tmp; mkdir winedummy-999; cd winedummy-999
5) "dh_make --createorig". Answer with "s", hit enter. It will create basic subfolder structure.
6) rename "debian" to "DEBIAN", cd inside "DEBIAN", rm *.ex
7) edit the control file and carefully add fields from said three packages. You want to require all packages which they require and at same time conflict with them. Also the field "Provides: " and "Replaces: " is useful to make pkg manager believe you have wine installed.
This is an example of my wine-dummy control file:

Code: Select all

Package: wine-dummy
Version: 999.1
Architecture: i386
Maintainer: cx405 <cx405@yandex.com>
Installed-Size: 1
Depends: file, libasound2, libc6, x11-utils, libncurses5, libfreetype6, libgl1-mesa-glx | libgl1, libglib2.0-0, libglu1-mesa | libglu1, libgstreamer-plugins-base0.10-0, libgstreamer0.10-0, liblcms2-2, libldap-2.4-2, libmpg123-0, libopenal1, libx11-6, libxext6, libxml2, zlib1g
Suggests: binfmt-support, libgl1-mesa-dri, libasound2-plugins, libxcursor1
Breaks: wine, libwine, libwine-bin, libwine-dev, wine-bin, wine-utils, wine32, wine64, wine64-bin
Provides: wine, libwine, libwine-bin, libwine-dev, wine-bin, wine-utils, wine32, wine64, wine64-bin
Replaces: wine, libwine, libwine-bin, libwine-dev, wine-bin, wine-utils, wine32, wine64, wine64-bin, libwine-alsa, libwine-capi, libwine-cms, libwine-gl, libwine-gphoto2, libwine-ldap, libwine-openal, libwine-oss, libwine-sane
Section: otherosfs
Priority: optional
Homepage: http://www.winehq.org/
Description: Windows API implementation - standard suite
 Wine is a free MS-Windows API implementation.
 This is still a work in progress and many applications may still not work.
 .
 This meta-package is sought to provide wine dependencies WITHOUT wine.
 .
 It is intended to be used together with environiment, capable of
 installing own wine version (like PlayOnLinux).
save
8) cd /tmp; dpkg-deb -b winedummy-999
9) purge wine*, libwine* from your system completely. PlayOnLinux does not have wine in its dependencies - but will complain if it fails to detect it. But will still continue away.
10) install the package with sudo gdebi or sudo dpkg -i winedummy-999.deb. The later you want to run "sudo apt-get install -f" to reverse-pull all requirements of winedummy.
11) run PlayOnLinux, go to Tools->Manage Wine Versions and pull one version. Do not use "System" as its not present. Play your games using only PlayOnLinux per-user only Wine.
Attachments
winedummy-999.deb
999.1 initial version of "wine-dummy". Contains just text file to cause wine deps pulled. Works on current Debian stable, should actually work on any recent Debian.
(3.02 KiB) Downloaded 61 times
disclaimer: solydxk user and fan, I am *not* affilated with solydxk project. experienced in - ubuntu, debian, gentoo, calculate, archlinux, linux mint, rhel. my posts are mine. no guarantee for fitness to particular use case.

kurotsugi
Posts: 2236
Joined: 09 Jan 2014 00:17

Re: Isolated per-user/local only Wine using wine-dummy and P

Postby kurotsugi » 04 Dec 2015 06:29

never thought that someone really implement it :lol:

User avatar
ilu
Posts: 2528
Joined: 09 Oct 2013 12:45

Re: Isolated per-user/local only Wine using wine-dummy and P

Postby ilu » 05 Dec 2015 00:08

Ha, I have bookmarked this for further investigation!

User avatar
cx405
Posts: 25
Joined: 20 Sep 2015 14:57

Re: Isolated per-user/local only Wine using wine-dummy and P

Postby cx405 » 05 Dec 2015 11:11

Isn't it great when people don't understand the reason why you created something? :D

I So, you want to play your win32 games in Linux. Why do you use PlayOnLinux instead of global (system) wine?

Because with PoL you can:
1) isolate each game from other using PREFIX (referred as "bottles" in crossover) !
1.1) you can archive the whole prefix and extract it at any time on any machine. No re-installation needed. It will run!
1.2) apply individual changes to each game
2) you can use other wine version, because PoL allows to download and use it. Some wine version runs better with specific game than other! Some can use specific patch!
2.1) Your system wine version may be ages old, yet with PoL you can grab about any wine version.



II But why do you install system wine version, if you don't use it anyway?

::sarcasm mode on::

Because the system wine version:
1) is not used by anyone outside of PlayOnLinux. It is so good to have 300 MiB of HDD space wasted!
2) system wine version replaces menus (*.desktop files in ~/.local/share/applications). It gladly opens text documents with Wine Notepad instead of Kwrite or Gedit! Isn't it splendid?
3) system wine version will gladly execute windows viruses on your Linux machine! Any windows virus that uses WinAPI or even .Net can unpack itself into the system, delete or corrupt files - especially user documents, attempt to encrypt them. Perhaps even inject itself into other windows binaries, in case you have some in your archive files (rar, 7z, zip etc)!
4) If you offer user-friendly distribution with globally installed Wine to your friend, you can be assured that Wine will execute his Email attachments, just like Windows does. But because Linux never did this -> it does not have resident Windows Antivirus for Windows binaries! So the next email attachment with a windows virus your friend will execute by said mechanism, will do maximum infection damage until it possibly breaks somewhere, because Wine is still not perfect to mimic windows (infection of archived binary may fail - netherless it may corrupt the archive; also it may corrupt local (binaries which belong to user, not root) ELF or a.out attempting to infect it, but they will ofc fail,unless its a specifically written Wine-compatible virus).

::sarcasm mode off::

Of course, if you used just PoL to run windows software, you wouldn't be exposed to all this.
Your Linux machine would refuse to run any windows software, except via PlayOnLinux - and even then, only those you put in your prefix.


III But how can you use PlayOnLinux-only wine versions, without global wine present in your system?!

You just make package like this.
It will pull and secure all dependencies typically required to run Wine; without actually installing Wine globally.
So you can run PlayOnLinux, get any Wine version there, associate it to your profile and run it just locally. Nice and secure.

Of course the content you put and run in your profile should be not infected. So, get your games and software from official sources/publishers! As with any other platform.
disclaimer: solydxk user and fan, I am *not* affilated with solydxk project. experienced in - ubuntu, debian, gentoo, calculate, archlinux, linux mint, rhel. my posts are mine. no guarantee for fitness to particular use case.

User avatar
ilu
Posts: 2528
Joined: 09 Oct 2013 12:45

Re: Isolated per-user/local only Wine using wine-dummy and P

Postby ilu » 05 Dec 2015 20:50

cx405 wrote:Isn't it great when people don't understand the reason why you created something? :D
You did not mean kurotsugi and me, did you? We understand perfectly well why you did that and when I wrote "Ha" I meant "Ha, great". I'm going to try this.

User avatar
cx405
Posts: 25
Joined: 20 Sep 2015 14:57

Re: Isolated per-user/local only Wine using wine-dummy and P

Postby cx405 » 05 Dec 2015 21:23

ilu wrote: You did not mean kurotsugi and me, did you? We understand perfectly well why you did that and when I wrote "Ha" I meant "Ha, great". I'm going to try this.
No, I didn't mean you two. :) I meant those who read, but didn't ping back - hence I put up the faq as to why I did this ;)
disclaimer: solydxk user and fan, I am *not* affilated with solydxk project. experienced in - ubuntu, debian, gentoo, calculate, archlinux, linux mint, rhel. my posts are mine. no guarantee for fitness to particular use case.


Return to “Suggestions & ideas / Open Projects”

Who is online

Users browsing this forum: No registered users and 5 guests