Force a screen resolution on boot

Macs R We <[email protected]> Tue, 20 Dec 2022 00:06:57 -0700
Newsgroups gmane.comp.macosx.general
Message-ID <[email protected]>
I have a headless Mini server. When I have to interact with it, I use Screen Sharing from another Mac. 

If the Mini has rebooted in the meanwhile, it always comes up in "default" resolution, where the windows all hodgepodge overlap one another. I have to manually go to Display Preferences and choose the 1920 x 1080 resolution of the screen used in conjunction with it. I have to do this every time.

I am looking for a way to get the Mini to assert this resolution at boot time, or account login time, either would work.

I tried making an Applescript, but apparently you can't record things you do in System Preferences.

Looking on the web, I found editing /Library/Preferences/SystemConfiguration/com.apple.Boot.plist, which looked great, except in recent releases it's SIP-protected and so can't be edited.

Does anybody have any suggestions?