So recently I was working on a and I ran into a problem setting the correct display resolution for the tv that makes up the “reflective” surface of the mirror. Basically the computer would think it was smarter than me and set a stretched resolution instead of a native one on reboot creating more of a fun house mirror effect than anything else.
To solve the problem I knew I was going to have to script something so I started poking around in applescript and quickly realized that there was no library to change the resolution, and I’d have to default to using click actions and menu items. Needless to say, this is terrible idea so I gave up on applescript and started looking around for some command line tools.
I found cscreen, but the project has been closed up and the developer took down the app. Shucks. Then I asked the venerable for a hand. After some google-ing we found
this post in which a guy shares his code for a small C app to change the resolution. A few moments and a compile later and we had an app! An app that is super simple and works really well, in leopard even!
Here’s a usage example: newscreen -h 1440 -v 900
The other beautiful thing about this is that you can set custom resolutions. For instance, I have a Mac Mini at home that I use as a media hub and it’s hooked to an HDTV. The Mac Mini doesn’t have a decent recommended resolution for the TV so I was able to use this tool to set a custom res, and again it worked like a charm! Now it looks great and actually fits on the screen.
Oh and standard disclaimer here, this works for me but might not for you. Use at your own discretion, this is provided as-is no warranty implied or otherwise at all, ever. And I’m not responsible if it destroys your computer or files. Or if it murders anyone in your family.
UPDATE: as pointed out in the comments, this is intel only! for now. I’ll see if I can compile a universal version later.