View Full Version : Disable 2nd Display via Command Line?


Confused Amused
06-16-07, 02:12 PM
Right now I have a setup of a 24" iMac connected to my Samsung 56" TV via the Mini-DVI out > VGA port on the Mac. It works beautifully.

So I can fire up the Mac, turn on the TV and voila - Front Row on the big screen via screen spanning and a script using cscreen. But this is also our main PC and I would like to be able to turn off the secondary display (TV) at times. I only want this because the screen spanning stays enabled and stuff ends up lost far to the side of the main display when I turn the TV off or just want to use the iMac.

Is there a command line or GUI application that can do this? I've found plenty that can change resolutions, but short of simply unplugging the VGA connection and running "detect displays", nothing that will turn off the 2nd display.

Confused Amused
06-24-07, 04:02 PM
Never been done? :( I figured this was something that could be AppleScripted...

When the TV is on the PC input, the video resolution is correctly displayed. The problem is if I want to switch the TV to a different input or go back to using just the iMac.

If I switch the TV to a different input, the iMac detects this and tries to detect the new displays. The problem is that when the TV is on another input, the iMac still detects a crappy resolution VGA connection and I end up with 2 screens still. Is there any way to prevent it from sensing that connection even though the TV is not on the PC input? The only way I've found so far is unplugged the actual connection to the iMac, which I want to avoid.