Results 1 to 6 of 6

Thread: Start and Stop VirtualBox Applications and Save State

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Location
    NY
    Beans
    476
    Distro
    Ubuntu 16.04 Xenial Xerus

    Start and Stop VirtualBox Applications and Save State

    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
    Last edited by dannymichel; April 28th, 2016 at 12:10 PM.

  2. #2
    Join Date
    Mar 2007
    Location
    NY
    Beans
    476
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Start and Stop VirtualBox Applications and Save State

    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

  3. #3
    Join Date
    Mar 2007
    Location
    NY
    Beans
    476
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Start and Stop VirtualBox Applications and Save State

    Bump?

  4. #4
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Start and Stop VirtualBox Applications and Save State

    Thread moved to Virtualisation.

  5. #5
    Join Date
    Mar 2007
    Location
    NY
    Beans
    476
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Start and Stop VirtualBox Applications and Save State

    Quote Originally Posted by slickymaster View Post
    Thread moved to Virtualisation.
    This is not solved, which is why i bumped it.
    [edit]
    Sorry, I read your signature as a response.

  6. #6
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Start and Stop VirtualBox Applications and Save State

    It was a question concerning Virtualization so he knew you might get help here... and with that--

    That would start your VM session, start your app, then once it stated, close and save state... wittout you having a chance to do anything. (You could confirm that by running it once.)

    I think what you want is for your script to "wait" for something before it shuts down right? Some interaction by you, or for something to actually indicate that you want it to shut down?
    Concurrent coexistance of Windows, Linux and Unix...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •