Hi Seth, >Has anyone got a clean solution for running a background SIMH process >that doesn't involve `screen` or `tmux`?
My solution is pretty clean and doesn't require any kind of virtual TTY. I have SIMH running under Ubuntu Linux 18.04 on an Intel i3 NUC box. It took a little trial and error to get it all working (mostly due to Ubuntu's use of 'netplan' and 'systemd') but it works well enough for me. It's configured so that my SIMH VAX starts up when Linux starts up. I don't have it configured to shutdown VAX/VMS or SIMH when Linux is shutting down, but for my purposes it doesn't need to. (Or I just haven't gotten around to it yet; the machine is only rebooted when I want it to.) Here is my SIMH VAX initialisation script ('eric.ini') between the dashes ... ------------------------------------------------------------------------------ ; Set memory to 128M set cpu 128m ; : Set CPU emulation characteristics set cpu idle=vms set cpu autoboot set cpu model=MicroVAX set cpu conhalt ; ; change the 'escape' character from ^E to ^P set console wru=10 ; ; create/load a Non-Volatile RAM file attach NVR ka655.NVR ; ; disable devices we don't want/need set LPT disable set TQ disable ; ; Create and attach two RA80 variant disks set -l rq0 rauser=4213968 attach rq0 eric_SYSTEM.dsk set -l rq1 rauser=8427936 attach rq1 eric_USER.dsk ; ; Disable remaining disk devices set rq2 disable set rq3 disable set RL disable ; ; Attach a network interface attach xq eth0 show xq ; ; Start the VAX console subsystem, show the attached devices and boot VMS sleep 1s expect ">>>" send "init\r"; continue expect ">>>" send "show devices\r"; continue expect ">>>" send "boot\r"; continue b cpu ------------------------------------------------------------------------------ SIMH is started at Linux boot by this script ('start_eric.sh') ... ------------------------------------------------------------------------------ #!/bin/sh # # start_eric.sh -- invoked by systemd to start ERIC the half-a-VAX at boot # whoami cd /home/eric/ LOGFILE=`date +%Y%m%d-%H%M%S` simh/vax eric.ini > ${LOGFILE}.log ------------------------------------------------------------------------------ It should be pretty easy to turn start_eric.sh into an INIT script for BSD. For those who are using a recent Linux like me, here is my systemd script ('/etc/systemd/system/simh-eric.service') ... ------------------------------------------------------------------------------ # /etc/systemd/system/simh-eric.service # Starts SIMH at system boot to run ERIC the Half-a-VAX # Created 21-Jul-2019 by Jeremy Begg [Unit] Description=ERIC the half-a-VAX Requires=network-online.target After=network-online.target [Service] User=eric ExecStart=/home/eric/start_eric.sh ExecStop=/home/eric/stop_eric.sh RemainAfterExit=yes [Install] WantedBy=multi-user.target ------------------------------------------------------------------------------ Once the simulator is running, I can 'tail -f' the log file to watch the VMS console messages. However there's no way to enter commands to the VMS console. I tried using SIMH's "remote console" feature (SIMH listens for incoming TELNET session on a user-configured TCP port) but found that SIMH stopped listening if no connection was received within a timeout (not sure how long, it was only a few minutes at most). Regards, Jeremy Begg +---------------------------------------------------------+ | VSM Software Services Pty. Ltd. | | http://www.vsm.com.au/ | |---------------------------------------------------------| | P.O.Box 402, Walkerville, | E-Mail: jer...@vsm.com.au | | South Australia 5081 | Phone: +61 8 8221 5188 | |---------------------------| Mobile: 0414 422 947 | | A.C.N. 068 409 156 | FAX: +61 8 8221 7199 | +---------------------------------------------------------+ _______________________________________________ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh