I'd seen an article before about using VMWare to run Windows programs "seamlessly"--as though they were being run from the user's own desktop. I say sorta because you can try to make the themes and widgets match up, but it just won't always work. Anyway, today I stumbled across another article and so, with little else to do, took the plunge. I won't regurgitate the article. This is the link:
Though the one comment I will make is make absolutely sure that you are logged out before trying to launch your app of choice--if you don't, you will get the whole Windows desktop.
If I won't regurgitate, then what am I writing about? Well, after the whole thing worked I got to thinking: normally, if I am not using a VM in any way shape or form, I shut it down. I don't have limitless resources on this Dell laptop and those CPU cycles are precious. Wouldn't it be nice if we could boot the VM whenever it is not running but we try to run the program? Why yes, it would and we can do make it happen with VMWare Server's command line tools. I wrote this in Python, as bash does not have a sleep function (which is needed if the VM boots up so that it will wait until the boot process is finished before trying to connect). In all its glory, with some machine-specific redactions, is the nifty little script I wrote:
#!/usr/bin/python import os import time onoffStream = os.popen('vmware-cmd / [pathto]/Windows XP Professional.vmx getstate | cut -d " " -f 3') onOff = onoffStream.read().strip() if onOff == 'off': os.popen('vmware-cmd / [pathto]/Windows XP Professional.vmx start') time.sleep(60) # wait 1 minutes os.system('rdesktop -A -s "c:seamlessrdpseamlessrdpshell.exe C: [path]MyExe.exe" [privateIP]:3389 -u iuser -p ipass')