Where is the “Open in Low Resolution” setting stored for an app?
-
29-05-2021 - |
質問
I'd like to script the opening of an app - which is normally used in retina resolution - to open in low resolution.
- set low resolution setting
- open app
- clear low resolution setting
But where is the "Open in Low Resolution" setting stored for an app?
It seems different macOS store it in different places. I'm using Mojave.
解決
Where is the “Open in Low Resolution” setting stored for an app?
When checking/unchecking the Open in Low Resolution checkbox on an App's Get Info window in Finder, an entry is created/modified under LSHighResolutionModeIsMagnified in the following file:
~/Library/Preferences/com.apple.LaunchServices/com.apple.LaunchServices.plist
In the image below, Item 1 showing a value of 3 is when checked, and 2 when unchecked.
Update to address comment.
From Terminal:
$ defaults read ~/Library/Preferences/com.apple.LaunchServices/com.apple.LaunchServices.plist
{
LSHighResolutionModeIsMagnified = {
"com.adobe.adobeconnect.app" = (
<626f6f6b ...>,
3
);
};
}
$
Note in the above output that the value of the first item of the array is truncated to <626f6f6b ...>
for brevity.
Also note the difference in how Xcode displays the contents of the PLIST file verses the defaults
command in Terminal.
If using the PlistEdit Pro application, it will show the elements of an array with just a numerical value as its label while omitting the word item.
In either case using a GUI both labels are virtual and do not exist in the actual data structure of the array. Only the output of the defaults
command represents an accurate data structure of the data itself.
Tested on macOS High Sierra.