how to remap serial port numbers?

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
cnbiz850
Level 3
Level 3
Posts: 65
Joined: Sun Nov 08, 2009 9:54 pm

how to remap serial port numbers?

Post by cnbiz850 »

I want to run the same application installed in 2 Wine bottles (using Wibom) at the same time. Only one can run, not both. Because the app needs to access port numbers 10205,10206, etc., I suspect that running 2 of it (even from separate bottles) causes conflicts at the ports. I wonder if there is a way to remap the port numbers through Wine to different Linux port numbers?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: how to remap serial port numbers?

Post by vitamin »

cnbiz850 wrote:I want to run the same application installed in 2 Wine bottles (using Wibom) at the same time. Only one can run, not both. Because the app needs to access port numbers 10205,10206, etc.
First of all those are not serial ports, but a network port (most likely TCP). Second, Wine can't "remap" them if you application opens those ports to listen for incoming connections.
cnbiz850
Level 3
Level 3
Posts: 65
Joined: Sun Nov 08, 2009 9:54 pm

Post by cnbiz850 »

OK. Thanks.

In order to run independent sessions of Wine, either Wine or the bottle management should have mechanisms to remap the ports. Since Wine already provide some independent mechanisms using the prefixes, and Wibom is just simple wrappers using the prefixes, Wine should consider handling the port remap issue.

Anyone agree, disagree?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

cnbiz850 wrote:Wine should consider handling the port remap issue.
There is nothing to fix here. You simply not allowed to open the same port for listening by multiple applications. This holds true on any *NIX system as well as Windows. And Wine is not a VM to sandbox everything.
cnbiz850
Level 3
Level 3
Posts: 65
Joined: Sun Nov 08, 2009 9:54 pm

Post by cnbiz850 »

vitamin wrote: You simply not allowed to open the same port for listening by multiple applications. This holds true on any *NIX system as well as Windows.
Agree on this part.

However, Wine is not on the same line as the *NIX systems or Windows - it doesn't run by itself like the others. It runs on top of an OS and tries to mimic another OS - a wonderful thing. Since it runs on an OS, it is supposed to handle and avoid any potential conflicts with the underlying OS, right? Port conflict (though perhaps rare) is one such things that need to be handled. What if an app run on Wine somehow uses the same port already in use by an app run in the underlying OS? In those cases, Wine should provide a mechanism (though Wincfg perhaps) for the user to remap those few ports in conflicts.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

cnbiz850 wrote:What if an app run on Wine somehow uses the same port already in use by an app run in the underlying OS?
Then you either can't run this app, or shutdown whatever native app uses this port. You wouldn't be able to run this app on Windows if another app opened the same port.

Again, Wine is not a sandbox. It does not emulate anything other then win32api. In case you still have questions: http://wiki.winehq.org/FAQ#head-f566a12 ... 13a773c571
Locked