Hello all, Is there a way to instruct wine to stick around after a program has run? Alternatively, is there a way to ?boot? a wine prefix and keep it running? As part of a project to port some windows software to linux, I am using wine to run a windows-only command line utility in a loop. Running it via wine it works just fine, however, calling it in a loop is extremely slow. It seems that the wine ?boots? when the program is called, then shuts down immediately after. This takes a few seconds every time the program is called. Unfortunately I need to call this program many thousands of times, so those extra seconds add up to hours. I?ve discovered that if I run a wine GUI application before running the program (such as winecfg, notepad, etc.) beforehand, the startup time is eliminated. That solution is a bit awkward, as this program is being run in a cluster computing environment (on dozens of headless nodes). The ideal solution would be a command line switch to wine or a service that could be run when the node boots. I did try wineserver -p, but that had no effect on startup time (I?m not sure what wine server does). Any thoughts? Thanks, Seth
On 28 February 2016 at 21:01, Seth Hill <sethrh at gmail.com> wrote:> Hello all, > > Is there a way to instruct wine to stick around after a program has run? Alternatively, is there a way to ?boot? a wine prefix and keep it running? > > As part of a project to port some windows software to linux, I am using wine to run a windows-only command line utility in a loop. Running it via wine it works just fine, however, calling it in a loop is extremely slow. > > It seems that the wine ?boots? when the program is called, then shuts down immediately after. This takes a few seconds every time the program is called. Unfortunately I need to call this program many thousands of times, so those extra seconds add up to hours. > > I?ve discovered that if I run a wine GUI application before running the program (such as winecfg, notepad, etc.) beforehand, the startup time is eliminated. That solution is a bit awkward, as this program is being run in a cluster computing environment (on dozens of headless nodes). > > The ideal solution would be a command line switch to wine or a service that could be run when the node boots. I did try wineserver -p, but that had no effect on startup time (I?m not sure what wine server does). > > Any thoughts?WINE is not a VM. It doesn't boot as such. It's an API translator. But yes, it has to load. All programs do. Multiple apps can share a single instance, though. Perhaps a background command-line task doing nothing very important -- such as a heartbeat indicator of some form, such as a task that periodically adds a line to a logfile -- might achieve what you want. -- Liam Proven ? Profile: http://lproven.livejournal.com/profile Email: lproven at cix.co.uk ? GMail/G+/Twitter/Flickr/Facebook: lproven MSN: lproven at hotmail.com ? Skype/AIM/Yahoo/LinkedIn: liamproven Cell/Mobiles: +44 7939-087884 (UK) ? +420 702 829 053 (?R)
On 28/02/16 12:01, Seth Hill wrote:> Hello all, > > Is there a way to instruct wine to stick around after a program has run? Alternatively, is there a way to ?boot? a wine prefix and keep it running?No booting, but why not just fork a background task that does not use a GUI to keep Wine going forever? As long as they are using the same prefix, the prefix will be 'up' for that time. winegcc something simple, like a task that just loops forever and calls Sleep(). wine sleeper.exe.so & sleeper_pid=$! # Alternative have the sleeper write its PID to a file Once the script is done, kill the sleeping task. (There might be a more efficient way to write a 'daemon' for Windows than calling Sleep() in a never-ending loop.) Andrew
On 2/28/16, Seth Hill <sethrh at gmail.com> wrote:> The ideal solution would be a command line switch to wine or a service that > could be run when the node boots. I did try wineserver -p, but that had no > effect on startup time (I?m not sure what wine server does). > > Any thoughts? > > Thanks, > > SethYou could try using Wine to run Powershell and start a detached session. https://blogs.technet.microsoft.com/heyscriptingguy/2013/10/12/powertip-run-remote-command-in-disconnected-session/ Then reconnect to it at will and make it launch processes... Not sure how well that'd work, or if you need redirection etc. It's worth a shot... FC