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:

#!/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:

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

If I did something like this...

#!/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

the only problem i see with the above is the VM shutting down and/or trying to restart if i forget i had photoshop open and i made another .sh for Illustrator the same way. Closing either app would shut the VM down and they'd both have commands to start the VM as well

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.