I’m using a new Mac mini runing OS X 10.14.6 now and using my mid-2011 27" iMac running OS X 10.13.6 in Target Display Mode as it’s main display (with a 22" hp display as its secondary screen). Getting this rig up and running in the morning is a bit of a pain – both machines have to be wakened, logged into, and then on the iMac keyboard I press Control-F2 to get Target Display Mode running on the iMac. This brings the clutter of two keyboards, of course, and the cascade of errors introduced by typing on the wrong one.
I keep thinking that if I were a clever enough with a bash script on the mini, I should be able to wake the iMac, log into it, and then invoke Command-F2 to have the iMac come alive as my main screen. Given all the enhanced security these days though, I’m wondering if this is even possible.