Search code examples
macosretinahidpi

"Open in Low Resolution" from command line


Mac OS provides the handy functionality of rendering an application in in low non-retina resolution by setting a checkbox "Open in Low Resolution" in the application info. However, for development, I start my application using a run configuration from my IDE.

How can I start the application in low resolution with a command I can put into the run configurations, or from the command line?


Solution

  • Add -AppleMagnifiedMode YES to your command line, or to “Arguments Passed On Launch” in your scheme.

    scheme screen shot

    This works for most apps, which put command-line arguments into the NSUserDefaults “registration domain” and otherwise ignore them.

    However, some apps, in particular those that were originally Linux apps and that use cross-platform toolkits, do not ignore their command-line arguments. For example, Inkscape uses the Gnome GIO toolkit to parse the command line arguments. Since it doesn't explicitly tell GIO about the AppleMagnifiedMode option, GIO rejects it. There is no particularly good workaround for such an app.