28

I would like to configure the 'Scaled' property of my Macbook Pro display using the command line. How could I do that?

1
  • 2
    display_manager.py works for me. I use this command to get scaled 1920x1080 @60fps on my 4K monitor: /path/to/display_manager.py res 1920 1080 60
    – rinogo
    Jun 3, 2020 at 1:08

4 Answers 4

8

Note: This answer is obsolete.

I have an early 2013 MacBook Pro with Retina Display running OS X 10.8.5 and I've tested cscreen command line utility and it works to change resolution via the command line. You can download the cscreenIntel.dmg from the link provided. In a terminal use cscreen -h to output the internal help information. An example of use: cscreen -d 32 -x 1680 -y 1050

BTW As far as I know Intel based versions of OS X do not include a native executable and why I'm pointing you to a third-party utility.

2
  • 1
    Did not work for me on os x yosemite 10.10.5 desktop.
    – user674669
    Jan 25, 2016 at 19:03
  • 1
    Use displayplacer for new macOS versions and for multi-monitor setups. More info in my answer below. May 26, 2019 at 17:20
21

To set multi-display resolutions, rotations, mirroring, and positioning via terminal use displayplacer.

Execute displayplacer list to view the possible resolutions for your screen. You'll want to use the ones marked as scaling:on

Then, execute a command similar to this to set the config displayplacer "id:A46D2F5E-487B-CC69-C588-ECFD519016E5 res:1920x1080 scaling:on origin:(0,0) degree:0"

Also available via Homebrew: brew tap jakehilborn/jakehilborn && brew install displayplacer

2
  • your tool works great! also combines very well with ShortCuts on Monterey
    – akira
    Jan 9, 2022 at 10:29
  • Like a fool, I'd set a display to 75 Hz (why? read my comment from the beginning again). I could access the display when plugged into a different HDMI port, but the ID changed. displayplacer worked for me in that it allowed me to first identify the display id, then run a displayplacer command every 2 seconds in a loop, then plug the display into the HDMI port—after 60 seconds or so, my display reset back to 60 Hz. <3
    – Emeraldo
    Apr 27, 2022 at 16:18
16

Use screenresolution on newer os versions

 git clone https://github.com/jhford/screenresolution.git
 cd screenresolution
 make dmg
 ./screenresolution set 1920x1080x32@60

csreen did not do any thing for me on os x 10.10.5. These steps worked for me.

2
  • 2
    Just FYI that this tool is also now available on Homebrew for a super easy install: brew install screenresolution but unfortunately it does not support Retina resolutions.
    – James
    Sep 3, 2019 at 16:05
  • screenresolution didn't work well for me with a custom added screen resolution whereas displayplacer did
    – paul_h
    Mar 4, 2021 at 10:19
9

See RDM, which can be installed with brew:

brew install avibrazil-rdm

It's not well documented, but the same executable which launches the GUI can also be used via the command line, so after installing you can run...

/Applications/RDM.app/Contents/MacOS/SetResX --modes

...will list all available options, including a "scale" factor for Retina/HiDPI modes. You can then set your desired mode e.g...

/Applications/RDM.app/Contents/MacOS/SetResX -w 1680 -h 1050 -s 2.0

If you execute the binary via command line without an argument it will list all command line options and then start the GUI. Or you an take a look at the source directly to see them: https://github.com/avibrazil/RDM/blob/master/main.mm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .