Is there a way to get the information about connected monitors and displays and their resolutions via the terminal in OS X?
I have some installations that run on multiple monitors and sometimes with a GFLW window that seem to not open if a monitor is not attached - I would like to have a check for whether a monitor is attached properly and maybe dump that to a log file, but I haven't found a programmatic way to do that without getting deep into Obj-C/Cocoa
You can use
system_profiler SPDisplaysDataType
ordefaults read /Library/Preferences/com.apple.windowserver.plist
: