Recently, I had the problem that the TFT display module of an 2008 17″ Intel iMac refused to work properly: The whole image was inverted and the right half stayed completely grey. I thought that it would be a nice solution to use the iMac as a headless computer by attaching an external display and switching off the integrated display module. However, I found no software solution to switch off the integrated display and no further information on the Internet if this was possible.
Thus, I decided to open up the iMac and remove the plug of the internal display module from the mainboard and to attach an external display to try out if this works. Fortunately, there is a very nice iMac disassembly manual by ifixit.com that I followed up to step 9. Removing the display cable from the mainboard is pretty straightforward: You have to remove 8 screws and unplug 3 cables. Subsequently, you reassemble everything and leave the display module cable unplugged (this is what you see in the picture above).
And: IT WORKS!!! You can use the iMac with detached display module cable and an external display smoothly without any problems. The iMac than just works like, for instance, a Mac Mini.