Page 1 of 1

This might be a bit ambitious (Mac Host, Windows 7 Guest)

Posted: 13. Jul 2017, 02:04
by Spot On Dtan
Just got virtualbox and am loving it -- have already installed windows and can finally use excel without wanting to pull my hair out. My question is this -- I have a Lenovo monitor and mechanical keyboard that I like to plug into if I'm doing any heavy lifting; is it possible for me to set virtualbox so that 1) it opens to my last saved state upon (mac) boot, IF (and only if) my monitor is plugged in, 2) does so on the larger screen?

Thanks,
SOD

Re: This might be a bit ambitious (Mac Host, Windows 7 Guest)

Posted: 13. Jul 2017, 04:19
by socratis
Spot On Dtan wrote:1) it opens to my last saved state upon (mac) boot, IF (and only if) my monitor is plugged in
No. The conditions upon which a program opens depend on you, not on the physical setup. Is it so hard to double-click on an icon? And the save state is two-clicks, or a Cmd-Q, Enter.
Spot On Dtan wrote:2) does so on the larger screen?
VirtualBox opens (like any other application) in the screen where you were when you launched it. However, a VM (like your Win7) will open to your 2nd monitor if it was running to your 2nd monitor. But, you can also create a alias (shortcut) for the VM and launch that directly, without the need to launch the VirtualBox Manager first.

To sum: when you plug your 2nd monitor, click manually on the alias and you're done.

Re: This might be a bit ambitious (Mac Host, Windows 7 Guest)

Posted: 13. Jul 2017, 15:17
by scottgus1
Spot On Dtan wrote:1) it opens to my last saved state upon (mac) boot, IF (and only if) my monitor is plugged in
On a Windows host this sounds like something that a script could test for. WMI stuff. I don't know if Macs have such a thing or not. Virtualbox doesn't contain such a script, though, You'd have to roll your own. You'd have to learn how to script on a Mac and figure out if there's some list or database or other that your script could query for the presence of the second monitor. You would make a shortcut to open the script, which tests for the second monitor, then runs the command line to start your guest or put up a message box that tells you the monitor isn't present, do you want to start the guest anyway?

Re: This might be a bit ambitious (Mac Host, Windows 7 Guest)

Posted: 13. Jul 2017, 15:51
by socratis
scottgus1 wrote:On a Windows host this sounds like something that a script could test for. WMI stuff. I don't know if Macs have such a thing or not.
OSX does have something similar, it's called Automator, or AppleScript in older times. Quite user friendly language actually, but not that powerful. Maybe it's good enough for the OP's needs...

Re: This might be a bit ambitious (Mac Host, Windows 7 Guest)

Posted: 13. Jul 2017, 23:59
by Spot On Dtan
Thanks for the input, everyone. I'll play around with it and see what I can come up with.