3

Purchased an M1 Mac Mini. Running it headless. In the OS for my user, I have the screen saver set to "never." However, when I connect via remote desktop, the screen saver comes on after some period of time.

Where is the plist or setting to completely disable the screen saver for remote desktop sessions?

0

1 Answer 1

4

I think I found the solution. I noticed an energy saver plist with a UID appended to it.

 /Library/Preferences/com.apple.PowerManagement.{UID}.plist 

In addition to the default

/Library/Preferences/com.apple.PowerManagement.plist

Reading the default plist with my correct system settings gave me

{
"AC Power" =     {
    "Automatic Restart On Power Loss" = 1;
    DarkWakeBackgroundTasks = 1;
    "Disk Sleep Timer" = 10;
    "Display Sleep Timer" = 0;
    "System Sleep Timer" = 0;
    "Wake On LAN" = 1;
};
SystemPowerSettings =     {
    "Update DarkWakeBG Setting" = 1;
};
}

Reading the plist with the UID gave me

{
"AC Power" =     {
    PrioritizeNetworkReachabilityOverSleep = 0;
    "Sleep On Power Button" = 1;
    "Standby Enabled" = 0;
    TCPKeepAlivePref = 1;
    TTYSPreventSleep = 1;
};
}

So I added the "System Sleep Timer" = 0 and "Display Sleep Timer" 0 by the following linesp.

sudo defaults write /Library/Preferences/com.apple.PowerManagement.{UID}.plist "AC Power" -dict-add "System Sleep Timer" 0

sudo defaults write /Library/Preferences/com.apple.PowerManagement.{UID}.plist "AC Power" -dict-add "Display Sleep Timer" 0
1
  • Note that you need to reboot for the settings to take effect. As for the Hardware UUID in the .plist file name, you can get it with UUID=$(system_profiler SPHardwareDataType | awk '/UUID/ {print $NF}')
    – mivk
    Aug 6, 2022 at 14:28

You must log in to answer this question.

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