There are some limitation from the Windows guests but to run a guest application in seamless mode from a script that can be put in a launcher we tested the following procedure:
- Start Virtual Box Manager
- Log in to windows with you user and password
- Switch to seamless mode Host + L
- In seamless mode save the machine's state
Now we can get full command line control over the virtual machine with the following commands:
Start the virtual machine from seamless save state
VBoxManage startvm "<Name_of_VM>"
Run an application in the VM
VBoxManage --nologo guestcontrol "<Name_of_VM>" execute --image "C:\\full\\path\\to\\program.exe" --username windowsuser --password password --wait-exit --wait-stdout
Terminate VM in save state
VBoxManage controlvm "Name_of_VM" savestate
Put these in a script to enjoy seamless Windows application windows on your Ubuntu desktop.
In case you have set up a passwordless Windows logon this will not work. See in the Virtual Box Manual for limitations and how to configure Windows to get it working.
"Also, to use accounts without or with an empty password, the guest's group policy must be changed. To do so, open the group policy editor on the command line by typing gpedit.msc, open the key Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options and change the value of Accounts: Limit local account use of blank passwords to console logon only to Disabled."