Jack, Welcome to the discussion area!
Which iMac are you asking about? You posted in the G3 iMac CRT discussion area.
Your system preference indicated iMac G5.
The response from spudnuty was in reference to a G3 iMac CRT. This requires dismantling the G3 iMac and modifying it.
If you are asking about an iMac G5, the iMac does not have any direct video inputs. However
ScreenRecycler might do what you want.