Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] Start and Stop VirtualBox Applications and Save State

$
0
0
Right now I have a .sh file to start Photoshop seamlessly and a .sh file to shut down the VM and save the state.

What I would love to do ultimately if possible at all is have one script(launcher if possible, so it can be found when searching apps) that will start Photoshop and when it's detected that I've exited out of Photoshop in the VM, it does a shutdown and save state for the VM

Is this possible? If so, would someone be so kind as to help me do that?
Would I be creating a photoshop.desktop file in /usr/share/applications with whatever in it(what would be the whatever?)?
Would I be modifying the current photoshop.sh and moving it into /usr/bin THEN creating a photoshop.desktop in /usr/share/applications that somehow points to that?
Or maybe somehow creating some file in /usr/bin?

Any help would be greatly appreciated. Thanks in advance

Photoshop:
Code:

#!/bin/sh
VBoxManage startvm "Windows"
VBoxManage --nologo guestcontrol "Windows" run --exe "C:\\Program Files\Adobe\Adobe Photoshop CC 2015\\Photoshop.exe" --username danny --password xxxx --wait-stdout

Shutdown:
Code:

#!/bin/sh
VBoxManage controlvm "Windows" savestate

Would this be how to do it?
Code:

#!/bin/sh
VBoxManage startvm "Windows"
VBoxManage --nologo guestcontrol "Windows" run --exe "C:\\Program Files\Adobe\Adobe Photoshop CC 2015\\Photoshop.exe" --username danny --password xxx --wait-stdout && echo OK
VBoxManage controlvm "Windows" savestate


Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>