Viewing external video input over mini displayport [duplicate]

I use an iMac as a nice large external display for a laptop on occasion. However swapping between the external input and the OSX desktop view means I can't view both at the same time (Cmd+F2).

I wonder if it is possible to have that external display viewed inside an app's window (sort of picture in picture, with the normal OSX desktop displayed at the same time).

Any ideas if this is even feasible, and if so, what solutions may exist?

  • Late 2009 27" iMac

Screen sharing https://support.apple.com/en-gb/guide/mac-help/mh14066/mac or you could use a VNC solution. Have a look at Real VNC: https://www.realvnc.com/en/