[Wine] Can Wine be installed in a web server to run a Windows appl?

Martin Gregorie martin at gregorie.org
Wed Nov 11 15:21:51 CST 2009


On Wed, 2009-11-11 at 14:23 -0600, jpsotta wrote:
> Thank you, Martin, to give me some hope !
> 
> ""
> Alternatively, run one or more copies of Windows in virtual machines on 
> a *nix system and access them remotely via VNC or ssh with X.11 
> forwarding. 
> ""
> 
> 
> - What are those virtual machines used to run copies of Windows? 
>   Something similar to Wine ? Specific SW packages simulating PC HW ?
> 
No, nothing like WINE. WINE is not a virtual machine. Its a service call
translator that converts the Windows service calls made by your program
into Linux service calls. Its complex because there isn't always a 1:1
mapping between the two.

I meant something like Xen or VMware's products, or even the Windows
Virtual PC. This is a software emulation of PC hardware - you run a copy
of Windows inside it. The point is that a server can run multiple VMs
and control access to them.

> - copies of Windows : as standard Home XP for instance ?
> 
Yes all these VMs can run XP.

> - could this *nix system be the host of my website ?
> 
I don't see why you couldn't run Apache and have it use programs in a VM
to manage a set of pages, just as it might use an Application Server,
e.g. Tomcat, to manage a different set of pages.

> - my Joomla-based website offers "wrapping" of an iFrame to another
> application : could this application be the one running on the copie
> of Windows ? thus forming a bridge for selected users to access this
> Windows application ?
> 
Well, not really. I don't know Joomla, but from a quick look at its
website it sits behind a web server such as Apache. Apache serves web
pages to web browsers while Joomla is a content management system that
handles the maintenance and storage of those pages. I think VMs would
sit alongside Joomla rather than being managed by it.

> Is all that too much speculative ?
> 
In the following I have assumed that you're trying to provide remote
access to a standard desktop application. If this is the case, you still
need a locking mechanism, as described below, to stop multiple logins
even if there's only one copy of the application in one VM or on one PC.

Accessing the application via a web server sounds complex to set up and
manage and could be costly too. Bear in mind that, apart from Xen and
KVM, which are Open Source, the other VMs are commercial products and
you'll need to install and manage at least one copy of Windows in the
VM. In addition, you'll probably have to write or configure a locking
system that prevents two web users from trying to use the same VM at the
same time.

This is why I was suggesting that you use ssh or VNC. Both require the
user to login to a specific user, so this goes quite a long way to
stopping users from interfering with each other. You'd still need to set
up a locking system that prevents a second user from connecting to a
login which is already in use, but that's bound to be easier than
stopping two web users from accessing the same VM.

Don't forget that as far as the web server is concerned, *THERE IS NO
CONNECTION* between successive page requests from a user and that
application servers are designed to stop multiple users from interfering
with each other by creating a session for each user, often by using
cookies. 

At the other end of the scale we find your Windows application in a VM:
the VM doesn't care whether one or several users are sending it
requests, but Windows and the application are both designed to handle
requests from one user in front of one screen, so all the separation of
users MUST be handled by something that sits between the web server and
the array of VMs.


Martin





More information about the wine-users mailing list