Yesterday my boss purchased VIRL for me. I run it on one of my ESXi servers and wanted to be able to maintain the environment I have gotten used to running, namely tabbed terminals in iTerm2. Easier said than done.
I used a couple of blogs to help get me going, but their scripts did not work for me, leading to this post. I hope it will help others.
These are my settings under the Preferences pane of VM Maestro.
Below is the script that finally worked for me. Please note, the delay 2 is one of the biggest changes I had to make, otherwise the script would put both telnet commands into the same tab.
[code lang=”bash”]
— 2016-12-20
— Jud Bishop
on run argv
— last argument should be the window title
set windowtitle to item (the count of argv) of argv as text
— all but last argument go into CLI parameters
set cliargs to ""
repeat with arg in items 1 thru -2 of argv
set cliargs to cliargs & " " & arg as text
end repeat
delay 2
tell application "iTerm"
activate
set the bounds of the first window to {1000, 500, 1900, 1200}
if (count of windows) = 0 then
set t to (create window with default profile)
else
set t to current window
end if
tell t
create tab with default profile
set s to current session
tell s
write text cliargs
set name to windowtitle
end tell
end tell
end tell
end run
[/code]