Skip to content

Instantly share code, notes, and snippets.

@mafice
Created November 8, 2012 12:33
Show Gist options
  • Save mafice/4038530 to your computer and use it in GitHub Desktop.
Save mafice/4038530 to your computer and use it in GitHub Desktop.
launch a VM and Terminal in full-screen mode on Mac OS X
#
# save this code as a application in the AppleScript Editor.
#
set VMNAME to "############ VM NAME ############"
set SSH_PORT to "############ SSH_PORT ############"
tell application "Terminal"
do script "VBoxManage startvm '" & VMNAME & "'" in window 1
activate
end tell
delay 2.3
tell application "System Events"
set visible of process "VirtualBox VM" to false
keystroke "f" using {command down, option down}
end tell
tell application "Terminal"
do script "clear" in window 1
do script "ssh localhost -p " & SSH_PORT in window 1
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment