Isolation?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Isolation?

Post by noahetrex »

Hello!

I want to run a program twice at one time but it detects that another instance is running and closes down... Is there any way that I can isolate the programs so they cannot detect each other?


~Noah Crocker
James Huk

Isolation?

Post by James Huk »

2009/6/20 noahetrex <[email protected]>
Hello!

I want to run a program twice at one time but it detects that another
instance is running and closes down... Is there any way that I can isolate
the programs so they cannot detect each other?


~Noah Crocker





I think running both from separated WINEPREFIX'es should do the trick.
Simply create new wineprefix (command: wineprefixcreate --prefix
/home/you/someprefix) and then, run first instance normally, and second
using this command:
WINEPREFIX=/home/you/someprefix wine yourapp.exe
That (I think) should do the trick.
That (I think) should do the trick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Post by noahetrex »

That did not work since they are detecting each other in ram...
fcmartins
Level 4
Level 4
Posts: 114
Joined: Sat Nov 01, 2008 5:48 pm

Post by fcmartins »

noahetrex wrote:That did not work since they are detecting each other in ram...
Wine runs as a single process, so running another Windows program will put it under the same "Windows" instance, thus your problem. I don't know if there is a way to force two Wine instances.
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

...

Post by noahetrex »

that's what i was afraid of... :(
User avatar
dimesio
Moderator
Moderator
Posts: 13369
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio »

fcmartins wrote:
noahetrex wrote:That did not work since they are detecting each other in ram...
Wine runs as a single process, so running another Windows program will put it under the same "Windows" instance, thus your problem. I don't know if there is a way to force two Wine instances.
Each wineprefix starts its own wineserver, and as far as the apps are concerned, apps in different wineprefixes think they are on different machines.

http://wiki.winehq.org/FAQ#head-f2f5f3b ... 15657ad552
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Post by noahetrex »

hmm... i will try again then...
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Still problem

Post by noahetrex »

Still problem... It does call Java if that makes a difference...

Image
Image
Image


I get the regular one started... but the prefix one encounters an error...
Cloudef
Level 4
Level 4
Posts: 138
Joined: Wed Mar 18, 2009 3:10 pm

Post by Cloudef »

You do it wrong, you should call different wineprefixes.
Eg.
WINEPREFIX="$HOME/.wine" wine GomezPEER2.exe
WINEPREFIX="$HOME/.wine-gomez2" wine GomezPEER2.exe

Where .wine is the default wineprefix and .wine-gomez2 is your second wineprefix. So ".wine" is computer 1 and .wine-gomez2 is computer 2
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

???

Post by noahetrex »

The first one was started without a prefix and the second was with a wine prefix... the line you see is an earlier attempt which had expired
Cloudef
Level 4
Level 4
Posts: 138
Joined: Wed Mar 18, 2009 3:10 pm

Post by Cloudef »

I see, sorry about that.
I have no clue then.
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Isolation?

Post by austin987 »

On Fri, Jul 10, 2009 at 6:25 PM, Cloudef<[email protected]> wrote:
I see, sorry about that.
I have no clue then.
Perhaps the program detects you logging in twice?

--
-Austin
Cloudef
Level 4
Level 4
Posts: 138
Joined: Wed Mar 18, 2009 3:10 pm

Post by Cloudef »

Seeing it is a "money making" program, it would be highly likely.
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Post by noahetrex »

It is designed to run on more than one computer... we do it all the time on multiple boxes some with and some without QEMU virtual machines... it COULD be a network address issue... they do use the same port i think...
User avatar
KenSharp
Level 4
Level 4
Posts: 175
Joined: Mon Jul 13, 2009 8:52 pm

Post by KenSharp »

Gomez Peer simply looks for the .exe in ram. It doesn't care how many wineservers are running, which user is logged in nor how many wineprefixes you are using. It is designed to run once on each computer, no more.

This is the correct behaviour under Windows, which does exactly the same thing.

Furthermore, by doing so you are violating the terms and conditions.
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

KenSharp wrote:Gomez Peer simply looks for the .exe in ram. It doesn't care how many wineservers are running, which user is logged in nor how many wineprefixes you are using. It is designed to run once on each computer, no more.
Are you sure about this? I thought programs needed root access to be able to access the full RAM range, something that's unattainable for an application running in Wine...
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

DaVince wrote:I thought programs needed root access to be able to access the full RAM range
Correct, you can't access RAM directly (via /dev/mem for example) unless you are super user or part of the group that have access to /dev/mem.

As far as Wine goes, applications can "see" each-other only within the same instance only (same wineserver == same wineprefix). If you have 2 wineprefixes, then the reason must be somewhere else.
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Post by noahetrex »

KenSharp wrote:Gomez Peer simply looks for the .exe in ram. It doesn't care how many wineservers are running, which user is logged in nor how many wineprefixes you are using. It is designed to run once on each computer, no more.

This is the correct behaviour under Windows, which does exactly the same thing.

Furthermore, by doing so you are violating the terms and conditions.

Actually... we talked with the Gomez peer people and they said it was fine...

As i said... it looks for the exe in ram! I am wondering if there is a was to redirect the address or something else...

It could be a network problem also (as i stated earlier)
Gert van den Berg

Isolation?

Post by Gert van den Berg »

On Wed, Jul 15, 2009 at 07:55, vitamin<[email protected]> wrote:
As far as Wine goes, applications can "see" each-other only within the same instance only (same wineserver == same wineprefix). If you have 2 wineprefixes, then the reason must be somewhere else.
Network seem like an obvious way to detect other instances, such as by
using a fixed listening port.
noahetrex
Level 2
Level 2
Posts: 10
Joined: Sat Jun 20, 2009 3:10 pm

Post by noahetrex »

so how does the virtual network adapter work on QEMU... I think a network bridge may solve the problem but i don't know how to get one working (have tried before)
DaVince
Level 8
Level 8
Posts: 1099
Joined: Wed Oct 29, 2008 4:53 pm

Post by DaVince »

As i said... it looks for the exe in ram!
Other suggestions have been made already, but I'd like to point out again that this is physically impossible in several ways. It's probably detection through some other means, like (as suggested) the network.
Gert van den Berg

Isolation?

Post by Gert van den Berg »

On Fri, Jul 17, 2009 at 02:31, DaVince<[email protected]> wrote:
As i said... it looks for the exe in ram!
Other suggestions have been made already, but I'd like to point out again that this is physically impossible in several ways. It's probably detection through some other means, like (as suggested) the network.
Except if he is running it as root.... But it is unlikely that it will
know how to directly read the memory on a Linux box. (Except if that
is emulated by Wine as well...)

The filesystem is a nother possible method.... (Although it would need
to find a writeable place shared by both WINEPREFIXes, which is quite
hard without writing a file in any folder where it has write access)
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

Maybe you could figure out what port it uses and create a simple app that binds to it. Then, if he reports the error, it means that it is related to the port.

Cheers,

Jorl17
User avatar
KenSharp
Level 4
Level 4
Posts: 175
Joined: Mon Jul 13, 2009 8:52 pm

Post by KenSharp »

It doesn't bind to any ports, it's little more than a HTTP/HTTPS client.

The app creates a mutex. It seems unlikely that Gomez have agreed to allow this given that the program has been designed to avoid this, and the T&C explicitly states not to do this or forfeit your account.

If Gomez wanted to increase the number of threads running in the background, they could do so very easily themselves.
Jim Hall

Isolation?

Post by Jim Hall »

On Fri, Jul 31, 2009 at 12:46 PM, KenSharp <[email protected]>wrote:
It doesn't bind to any ports, it's little more than a HTTP/HTTPS client.

The app creates a mutex. It seems unlikely that Gomez have agreed to allow
this given that the program has been designed to avoid this, and the T&C
explicitly states not to do this or forfeit your account.

If Gomez wanted to increase the number of threads running in the
background, they could do so very easily themselves.



QEMU was mentioned earlier (and there are others). If you can virtualize a
legal Win session could this solve enough of the situation to do what you
want to do?

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-us ... chment.htm>
Locked