To make a long story short, as part of the OpenSIMH Project (
opensimh.org), we have simulators for classic computers from DEC, IBM, DG, HP, and the like. MacOS is one of the preferred target hosts, and many of us recommend iTerm2 manually and life is good in simple cases. But we've started to write some scripts to make it a tad easier for users to start up and experience some of the old systems, and I'm running into an interesting problem for which I do not seem to have a good solution.
With xterm(1) or lxterminal(1), we can put in a start-up script something like:
OS=`uname -s`
...
case ${OS} in
...
Linux)
nohup lxterminal --command="telnet localhost 1025" > /dev/null 2>&1 &
Darwin)
nohup xterm -e telnet localhost 1025 > /dev/null 2>&1 &
...
esac
To start up a terminal window on the console of the simulated system (or to any simulated serial port, for that matter), running an xterm(1) works for macOS fine, but we would like to be able to use an iterm2 window if we detect that is what the user is running.
There doesn't seem to be a UNIX man page which describes the switches like xterm(1) or the like [which for a 50+ year UNIX guy is sad]. However, poking at the docs and Internet search, we have failed with different attempts using Applescript and like and have not found something that seems to work analogous to the above simple line.
We are doing something wrong / missing something obvious.
Any help to an old hacker would be useful.
Thanks,
Clem Cole